Skip to content

ci: fork-safe image builds, working chart lint, regenerated static manifests - #348

Merged
hardbyte merged 4 commits into
mainfrom
claude/pr-346-merge-review-4e573g
Sep 1, 2026
Merged

ci: fork-safe image builds, working chart lint, regenerated static manifests#348
hardbyte merged 4 commits into
mainfrom
claude/pr-346-merge-review-4e573g

Conversation

@hardbyte

@hardbyte hardbyte commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Follow-ups from #346.

Fork PRs no longer need ghcr write access

Every docker job on #346 failed with denied: installation not allowed to Write organization package — fork PRs run with a read-only GITHUB_TOKEN, but ci.yaml pushed to ghcr.io unconditionally, even on pull_request.

The push path is untouched for pushes, releases, and same-repo PRs. For fork (and dependabot) PRs, gated by github.event.pull_request.head.repo.full_name == github.repository:

  • probe_docker / operator_docker build the images locally (outputs: type=docker,dest=…tar) instead of pushing, and upload them as 1-day workflow artifacts.
  • operator_docker_merge is skipped (nothing was pushed, nothing to merge).
  • The k8s integration job downloads the artifacts, docker loads them, and kind loads the same sha-… tags it previously pulled — so fork PRs keep full integration-test coverage without granting forks any registry access. No pull_request_target, no secrets exposed to fork code.

Chart linting actually runs now

helm-chart.yaml ran ct lint --chart-dirs charts and filtered pushes on paths: charts/**, but the chart lives at operator/charts/netchecks — so the job has been finding zero charts and passing trivially. Fixed the paths, and two things that surfaced the moment linting became real:

  • ct needs the policy-reporter dependency repo registered (helm repo add step).
  • --validate-maintainers requires the maintainer name to be a GitHub username; changed Brian Thornehardbyte (email/url unchanged). Chart bumped 0.4.0 → 0.4.1 for the metadata change, which also satisfies ct's version-bump check.

Verified locally: ct lint --target-branch=main --chart-dirs operator/charts passes end to end (maintainer validation confirmed separately; this sandbox can't reach api.github.com).

Static manifests regenerated

manifests/deploy.yaml contained no CRDs at all (the old crds/ directory was invisible to helm template) and was rendered from a chart several versions old, while the installation docs present it as installing "the NetworkAssertion CRDs and the Netchecks operator". Regenerated from chart 0.4.1: it now carries all three CRDs plus current chart output. create-static-manifests.sh now builds chart dependencies itself, renders with --set crds.keep=false (the keep annotation is meaningless outside Helm, and the sed cleanup left a dangling annotations: key without it), and removes its .bak leftovers. All 24 rendered documents parse as valid YAML.

Noted, not fixed

ci.yaml:51 references matrix.python-version, which doesn't exist (the matrix key is python), so the Coveralls flag-name loses its Python suffix. Pre-existing and harmless; left alone to keep this focused.

https://claude.ai/code/session_01U71MHip9jr1QHckFbBL4Sp


Generated by Claude Code

…nerate static manifests

Follow-ups from #346:

- ci.yaml: fork PRs run with a read-only GITHUB_TOKEN, so every docker job
  failed with 'denied: installation not allowed to Write organization
  package'. Push jobs are now gated on the PR coming from this repository
  (and not dependabot); fork PRs instead build the images locally and hand
  them to the k8s integration job as workflow artifacts, keeping full test
  coverage without granting forks any registry access.
- helm-chart.yaml: 'ct lint --chart-dirs charts' pointed at a directory
  that doesn't exist (the chart lives at operator/charts/netchecks), so
  chart linting never ran. Fix the paths, register the policy-reporter
  dependency repo, and fix the maintainer entry to a GitHub username as
  ct's --validate-maintainers requires. Chart bumped 0.4.0 -> 0.4.1 for the
  metadata change.
- create-static-manifests.sh: build chart dependencies, render with
  crds.keep=false (the keep annotation is meaningless outside Helm and the
  sed left a dangling 'annotations:' key), and clean up the .bak file.
- manifests/deploy.yaml: regenerated. It previously contained no CRDs at
  all (helm template skips the old crds/ directory) even though the docs
  present it as installing them; it now carries all three, plus current
  chart output.

Claude-Session: https://claude.ai/code/session_01U71MHip9jr1QHckFbBL4Sp
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploying netchecks-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 11705d8
Status: ✅  Deploy successful!
Preview URL: https://72484ae6.netchecks-docs.pages.dev
Branch Preview URL: https://claude-pr-346-merge-review-4.netchecks-docs.pages.dev

View logs

check-linters is failing on main and on every branch push: the archived
chartboost/ruff-action installs the latest ruff, whose new rules flag 65
pre-existing findings that the repo's locked ruff (0.15.12, which passes
cleanly) does not. Switch to the official astral-sh/ruff-action pinned to
the locked version so lint results only change when the project chooses
to upgrade ruff.

Claude-Session: https://claude.ai/code/session_01U71MHip9jr1QHckFbBL4Sp
@coveralls

coveralls commented Sep 1, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 33508100448

Coverage remained the same at 87.654%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 648
Covered Lines: 568
Line Coverage: 87.65%
Coverage Strength: 5.26 hits per line

💛 - Coveralls

'Honours'/'honoured'/'behaviour' arrived in the chart comments via #346
and fail the typos check (locale en-us), which runs on push and is red on
main for the same reason. Also exclude the generated
operator/manifests/deploy.yaml from typos: it embeds upstream CRD
descriptions from the same files the config already excludes.

Claude-Session: https://claude.ai/code/session_01U71MHip9jr1QHckFbBL4Sp
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T12:26:36.258117Z 6e3b742 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The k8s integration job failed once it could finally reach the tests: the
workflow's smoke install into the 'netchecks' namespace leaves the CRDs
behind on uninstall (helm.sh/resource-policy: keep, the chart default
since #346) with that release's ownership metadata, so the pytest
fixture's install into a fresh netchecks-test-* namespace fails with
'invalid ownership metadata'. The two pytest sessions in the job would
hit the same conflict with each other.

Install with the chart's own crds.keep=false toggle in the smoke install
and the test fixture, so every uninstall removes the CRDs and the next
install starts clean. Production default is unchanged.

Claude-Session: https://claude.ai/code/session_01U71MHip9jr1QHckFbBL4Sp
@hardbyte
hardbyte merged commit 2c2039f into main Sep 1, 2026
23 checks passed
@hardbyte
hardbyte deleted the claude/pr-346-merge-review-4e573g branch September 1, 2026 19:45
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.

3 participants