Skip to content

runners: Go go-github (GOG-1–12), Octokit.NET (CS-1–8), hub4j (JAV-1–7), Terraform (TF-1–8) - #4

Open
tamnd wants to merge 1 commit into
mainfrom
feat/runners-compiled
Open

tamnd wants to merge 1 commit into
mainfrom
feat/runners-compiled

Conversation

@tamnd

@tamnd tamnd commented Jun 10, 2026

Copy link
Copy Markdown
Owner

What

Compiled-language runners and the Terraform runner covering 35 gates across Go, C#, Java, and Terraform.

Go runner (runners/go/)

Standalone Go module (go 1.24). Deps: go-github v66, githubv4, ghinstallation/v2, oauth2.

Key quirks baked in:

  • WithEnterpriseURLs(restBase, uploadBase) — both need trailing slash (/api/v3/, /api/uploads/)
  • GetDefaultBranch(), GetMergeable() nil-safe getters throughout
  • ETag/304: raw http.Client If-None-Match round-trip (G9)
  • githubv4.NewEnterpriseClient("https://HOST/api/graphql", httpClient) (no trailing slash)
  • ghinstallation.itr.BaseURL = restBase (trailing slash)
  • GOG-7 (Merge), GOG-8 (CheckRun), GOG-12 (App token) skip when app creds absent

Run:

cd runners/go && go mod tidy && go run .

.NET runner (runners/dotnet/)

net9.0, Octokit 14.0.0. Top-level statements, TAP to stdout.

Key quirk: new GitHubClient(header, new Uri("https://HOST/")) — host root URI, Octokit.NET appends /api/v3 internally.

Run:

dotnet run --project runners/dotnet/CompatTest.csproj

Java runner (runners/java/)

Java 21, JUnit 5, Maven, hub4j 1.321.

Key quirk: withEndpoint("https://HOST/api/v3") — no trailing slash (different from Octokit.rb).

Each gate = one @Test method in sequential @TestMethodOrder. JAV-7 (CheckRun) uses Assumptions.assumeTrue(false) to skip.

Run:

mvn -pl runners/java test -Dsurefire.useFile=false

Terraform runner (runners/shell/terraform_test.sh)

terraform-provider-github 6.6.0.

Key quirk: base_url = "https://HOST/api/v3/" — trailing slash required (provider builds URLs with url.PathEscape).

TF-1 exercises data.github_repository; TF-2 exercises github_repository create + destroy. TF-3–8 are skipped pending dedicated app auth setup.

make run-terraform

…1–8)

runners/go/main.go (separate go.mod, go 1.24):
  - go-github v66: Users, Repositories, Issues, RateLimit, PullRequests, Checks
  - WithEnterpriseURLs("https://HOST/api/v3/", "https://HOST/api/uploads/") — both trailing slashes
  - ETag/304 tested via raw http.Client with If-None-Match header
  - githubv4: NewEnterpriseClient("https://HOST/api/graphql", httpClient)
  - ghinstallation v2: itr.BaseURL = restBase (trailing slash)
  - GOG-7 (PullRequests.Merge) skipped to preserve fixture PR

runners/dotnet/OctokitNetTest.cs:
  - Octokit.NET 14.0.0: new GitHubClient(header, new Uri("https://HOST/"))
  - Host root URI (not /api/v3) — Octokit.NET appends it internally
  - Top-level statements + async/await; outputs TAP to stdout

runners/java/src/test/java/dev/githome/compat/HubApiTest.java:
  - hub4j 1.321: GitHubBuilder().withEndpoint("https://HOST/api/v3")
  - JUnit 5 @TestMethodOrder; each test = one gate
  - JAV-7 (CreateCheckRun) skipped via Assumptions.assumeTrue(false)

runners/shell/terraform_test.sh:
  - terraform-provider-github 6.6.0
  - base_url = "https://HOST/api/v3/" (trailing slash required)
  - TF-1: data.github_repository reads default_branch
  - TF-2: github_repository create + destroy
  - TF-3–8: skipped pending full app auth setup
@tamnd
tamnd force-pushed the feat/runners-compiled branch from cfcc01c to 790f39d Compare June 10, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant