Skip to content

STAC-25142 Add GitHub Actions lint + unit-test workflow (agent CI migration phase 1)#444

Open
LouisParkin wants to merge 1 commit into
stackstate-7.78.2from
STAC-25142-agent-lint-unit
Open

STAC-25142 Add GitHub Actions lint + unit-test workflow (agent CI migration phase 1)#444
LouisParkin wants to merge 1 commit into
stackstate-7.78.2from
STAC-25142-agent-lint-unit

Conversation

@LouisParkin

Copy link
Copy Markdown

What

Phase 1 of the stackstate-agent GitLab → GitHub CI migration (STAC-25142): ports the lint + unit-test jobs from .gitlab-ci-agent.yml to a GitHub Actions workflow, .github/workflows/lint-and-unit-tests.yml.

Job Runner Ported from
filename-linting docker filename_linting — cheap gate; only needs git ls-files, so the GitLab job's inv deps/go work vendor boilerplate is dropped
unbranded-unit-tests xlarge unbranded_unit_tests — full inv agent.build --race + inv test, DataDog branding
branded-unit-tests xlarge branded_unit_tests — same + ./fix_branding.sh, StackState branding

All three run inside container: <proxy>/quay/stackstate/datadog_build_linux_x64:0cd01a13 — the same BUILD_IMAGE the GitLab pipeline uses (produced by datadog-agent-buildimages, pulled via the read-only quay proxy). No new runner class is needed: xlarge (6 CPU / 40Gi, DinD) maps to GitLab sts-k8s-xl-runner.

Test-execution policy (architect directive — minimize redundant runs)

Each suite runs once on the path to master:

  • filename-linting on every PR (fast).
  • The two ~2h suites run on pull_request, deduped via concurrency: cancel-in-progress.
  • Follow-up (Phase 6): when the merge queue is enabled, the heavy suites move to merge_group (run once at land) and drop from pull_request; master/version-branch pushes then build + publish without re-running tests.

Open question raised for architects (biggest compute lever, tracked in the migration scope doc): unbranded and branded are nearly the same ~2h job twice — do we need both on every path, or branded-as-gate + unbranded on the queue only?

Prerequisite for green checks

This is a public repo, so the read-only registry-proxy credentials must be available to it for the container: image pull: vars.REGISTRY_HOST, vars.REGISTRY_USER, secrets.REGISTRY_PASSWORD. If the first run fails on the image pull, these need scoping to this repo (org secret scope, or a repo-level read robot as done for datadog-agent-buildimages). Org secrets are never exposed to fork PRs, so fork PRs skip these jobs by design.

Security

contents: read only, SHA-pinned actions/checkout, persist-credentials: false, no PATs, registry secret only via container.credentials. Zizmor: clean. actionlint: clean apart from expected self-hosted-runner label warnings (docker, xlarge).

Validation

  • YAML parses; Zizmor clean; actionlint clean (self-hosted labels aside).
  • CI (the heavy suites) will exercise the container:-on-xlarge (manual DinD) path for the first time — that's the main thing this PR validates.

Jira: https://stackstate.atlassian.net/browse/STAC-25142

🤖 Generated with Claude Code

…ration phase 1)

Ports filename_linting + unbranded/branded unit_tests from .gitlab-ci-agent.yml
to GitHub Actions, tracking the active stackstate-7.78.2 pipeline.

- filename-linting on `docker` (cheap gate; only needs `git ls-files`).
- unbranded/branded unit tests on `xlarge` inside the datadog_build image
  (tag 7af9194f), pulled via the read-only quay proxy.
- 7.78.2 deltas vs 7.71.2: `--major-version` dropped from agent.build/inv test
  (removed upstream in DD 7.78), and branded runs scripts/verify_branding_literals.sh
  after fix_branding.sh.

Test-execution policy (architect directive — minimize redundant runs): each
suite runs once. filename-lint on every PR; the two heavy ~2h suites on
pull_request, deduped via concurrency cancel-in-progress. They move to
merge_group (run once at land) at phase 6; master/version-branch pushes then
build+publish without re-running tests.

Security: minimal contents: read, SHA-pinned checkout, persist-credentials
false, no PATs, registry-proxy secret only via container.credentials, fork PRs
skipped. Zizmor clean; actionlint clean apart from self-hosted labels.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@LouisParkin LouisParkin changed the base branch from stackstate-7.71.2 to stackstate-7.78.2 July 10, 2026 15:20
@LouisParkin LouisParkin force-pushed the STAC-25142-agent-lint-unit branch from 3cd1a54 to 7308812 Compare July 10, 2026 15:22
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