Repository navigation
fix: update deps and v3 release routing #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| @@ | ||
| @@ | ||
| -"cel.dev/cel-go/cel" | ||
| +"github.com/google/cel-go/cel" | ||
|
|
||
| @@ | ||
| @@ | ||
| -"cel.dev/cel-go/common/types/ref" | ||
| +"github.com/google/cel-go/common/types/ref" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Release policy | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main, 3.x] | ||
| push: | ||
| branches: [main, 3.x] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | ||
| with: | ||
| node-version: 24 | ||
| - name: Install release verification dependencies | ||
| run: npm install --prefix .tmp/release-check --package-lock=false --no-audit --no-fund semantic-release@25.0.9 @semantic-release/commit-analyzer@13.0.1 yaml@2.8.1 semver@7.7.2 | ||
| - name: Verify candidate release and branch range | ||
| env: | ||
| RELEASE_BRANCH: ${{ github.base_ref || github.ref_name }} | ||
| run: node hack/verify-release.mjs "$RELEASE_BRANCH" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Dependency security | ||
| on: | ||
| push: | ||
| branches: [main, 3.x] | ||
| pull_request: | ||
| schedule: | ||
| - cron: '0 6 * * *' | ||
| workflow_dispatch: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| scan: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ref: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && fromJSON('["main", "3.x"]') || fromJSON(format('[{0}]', toJSON(github.ref))) }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | ||
| with: | ||
| ref: ${{ matrix.ref }} | ||
| - uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 | ||
| with: | ||
| go-version-file: go.mod | ||
| - name: Scan Go dependencies | ||
| run: go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./... | ||
| - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d | ||
| with: | ||
| package_json_file: web/package.json | ||
| - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b | ||
| with: | ||
| node-version: 24 | ||
| - run: pnpm -C web install --frozen-lockfile | ||
| - name: Scan production web dependencies | ||
| run: pnpm -C web audit --prod --audit-level low |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Supported versions and security maintenance | ||
|
|
||
| | Branch | Go module | CEL module | Support | | ||
| | --- | --- | --- | --- | | ||
| | main (before v4 publication) | github.com/flanksource/gomplate/v3 | github.com/google/cel-go | Active v3 publication | | ||
| | main (after v4 publication) | github.com/flanksource/gomplate/v4 | cel.dev/cel-go | Active development | | ||
| | 3.x | github.com/flanksource/gomplate/v3 | github.com/google/cel-go | Security fixes only | | ||
|
|
||
| The v3 maintenance line starts at v3.24.90. There is no announced end-of-support date. Security patches preserve the v3 API, expression behavior, and CEL import path. Each patch must identify its advisory and use the lowest compatible fixed dependency version. Ordinary feature and dependency refreshes belong on main. Security fixes should be applied to every affected supported branch. | ||
|
|
||
| Renovate processes both branches. Routine updates are disabled on 3.x, while vulnerability fixes require review. OSV checks direct dependencies; daily Go vulnerability and production web dependency scans supplement them, including transitive dependencies. A scheduled scan runs from main and explicitly checks out both supported branches. Failed scans require investigation; scanner errors are not passing results. | ||
|
|
||
| Until main publishes v4.0.0, publish v3 security fixes from main and keep the 3.x branch synchronized with that published history. Semantic-release does not allow a maintenance branch to publish a version newer than the active main release line. After main publishes v4, v3.x patch releases are published from 3.x. Existing downstream v3 dependency-update PR automation runs only for v3 releases. Consumers must migrate explicitly to v4. | ||
|
|
||
| ## Migrating to v4 | ||
|
|
||
| The initial security maintenance patch updates Go to 1.26.10 (including GO-2026-6809), x/net to 0.62.0 (GO-2026-6860 and GO-2026-6866), OpenTelemetry to 1.42.0 (GO-2026-5158), and their required dependency graph. This includes fixed x/text and x/mod versions. The web lockfile resolves DOMPurify 3.4.17, addressing the five advisories reported for 3.4.13. CEL remains at 0.31.0 on 3.x. | ||
|
|
||
| Change Go imports from github.com/flanksource/gomplate/v3 to github.com/flanksource/gomplate/v4. When supplying CEL environment options or using AST, evaluation, or value types, change CEL imports from github.com/google/cel-go to cel.dev/cel-go. Do not mix the old and new CEL types. | ||
|
|
||
| The initial v4 migration must use a Conventional Commit with a BREAKING CHANGE footer (or the existing MAJOR RELEASE footer) so semantic-release selects v4.0.0. The release analyzer and notes generator recognize both. Local preparation does not publish a release; publishing happens only after the reviewed migration is merged to main. | ||
|
|
||
| ## Verify release configuration without publishing | ||
|
|
||
| Run from the repository root: | ||
|
|
||
| ```sh | ||
| npm install --prefix .tmp/release-check --package-lock=false --no-audit --no-fund semantic-release@25.0.9 @semantic-release/commit-analyzer@13.0.1 yaml@2.8.1 semver@7.7.2 | ||
| node hack/verify-release.mjs main | ||
| go test ./internal/releasepolicy | ||
| ``` | ||
|
|
||
| This checks the actual unreleased commits against the target branch's normalized semantic-release range and verifies that the candidate version matches the Go module major. Pass 3.x instead of main when validating a maintenance release. It also checks synthetic breaking and security-fix commits, workflow syntax, and the v3 downstream-update guard. The Release policy workflow runs this check before PRs are merged. It does not create commits, tags, releases, or external PRs. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| module github.com/flanksource/gomplate/v3 | ||
|
|
||
| go 1.26.0 | ||
| go 1.26.10 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| require ( | ||
| github.com/Masterminds/goutils v1.1.1 | ||
|
|
@@ -28,8 +28,8 @@ require ( | |
| github.com/stretchr/testify v1.11.1 | ||
| github.com/timberio/go-datemath v0.1.0 | ||
| github.com/ugorji/go/codec v1.3.1 | ||
| golang.org/x/text v0.37.0 | ||
| golang.org/x/tools v0.44.0 | ||
| golang.org/x/text v0.43.0 | ||
| golang.org/x/tools v0.51.0 | ||
| google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af | ||
| gopkg.in/yaml.v3 v3.0.1 | ||
| gotest.tools/v3 v3.5.1 | ||
|
|
@@ -96,15 +96,15 @@ require ( | |
| github.com/tidwall/sjson v1.2.5 // indirect | ||
| github.com/x448/float16 v0.8.4 // indirect | ||
| github.com/yuin/gopher-lua v1.1.1 // indirect | ||
| go.opentelemetry.io/otel v1.41.0 // indirect | ||
| go.opentelemetry.io/otel/trace v1.41.0 // indirect | ||
| go.opentelemetry.io/otel v1.42.0 // indirect | ||
| go.opentelemetry.io/otel/trace v1.42.0 // indirect | ||
| go.yaml.in/yaml/v2 v2.4.3 // indirect | ||
| go.yaml.in/yaml/v3 v3.0.4 // indirect | ||
| golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect | ||
| golang.org/x/mod v0.35.0 // indirect | ||
| golang.org/x/net v0.55.0 // indirect | ||
| golang.org/x/sync v0.20.0 // indirect | ||
| golang.org/x/sys v0.45.0 // indirect | ||
| golang.org/x/mod v0.41.0 // indirect | ||
| golang.org/x/net v0.62.0 // indirect | ||
| golang.org/x/sync v0.24.0 // indirect | ||
| golang.org/x/sys v0.49.0 // indirect | ||
| google.golang.org/genproto/googleapis/api v0.0.0-20260226221140-a57be14db171 // indirect | ||
| google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect | ||
| gopkg.in/inf.v0 v0.9.1 // indirect | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: flanksource/gomplate
Length of output: 3863
Script executed:
Repository: flanksource/gomplate
Length of output: 12203
Gate the semantic-release job on the module-major check.
The release workflow publishes from
3.xon push without waiting for the release-policy workflow. The module-major check runs only in that separate workflow. A push to3.xthat changes the Go module path can therefore be tagged as a v3 release even when the policy job fails. Add a job that runshack/verify-release.mjsand makesemantic-releasedepend on it withneeds.Suggested approach
Copy the verification steps from
.github/workflows/release-policy.ymlinto a job in.github/workflows/release.yml. Usegithub.ref_nameasRELEASE_BRANCH, because this workflow runs only on push. Addneeds: [<verification job>]to thesemantic-releasejob. The bump job already depends onsemantic-release, so its behavior does not change.