Skip to content

ci: fix cache-related issues#37761

Merged
silverwind merged 5 commits into
go-gitea:mainfrom
silverwind:ci-cache-seeder-lint-bindata
May 18, 2026
Merged

ci: fix cache-related issues#37761
silverwind merged 5 commits into
go-gitea:mainfrom
silverwind:ci-cache-seeder-lint-bindata

Conversation

@silverwind
Copy link
Copy Markdown
Member

@silverwind silverwind commented May 18, 2026

Fixes two recurring CI failures:

  1. cache-seeder.yml lint-backend missing a make generate-go before linting with TAGS=bindata, and pull-compliance.yml lint-on-demand failing its post-step pnpm cache save when no pnpm-using conditional step runs.
  2. Drops cache: pnpm from lint-on-demand and adds make generate-go to cache-seeder's lint job.

This PR was written with the help of Claude Opus 4.7

The lint-go pass typechecks with TAGS=bindata, which requires
bindata.dat to exist for the //go:embed directive in
modules/options/options_bindata.go. Without generate-go, the seeder lint
job fails with: pattern bindata.dat: no matching files found (typecheck).

Mirrors the existing fix in pull-compliance.yml's lint-backend job.

Regression introduced by go-gitea#37674 (3738809), which added
`--build-tags=linux,bindata` to the golangci-lint invocation and patched
pull-compliance.yml but missed the matching cache-seeder.yml job.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 18, 2026
Comment thread .github/workflows/cache-seeder.yml Outdated
Signed-off-by: silverwind <me@silverwind.io>
The `lint-on-demand` job sets up `actions/setup-node` with
`cache: pnpm`, but the only unconditional step (`make lint-spell`) is
pure Go. The pnpm-using steps (`make deps-frontend lint-md lint-swagger
lint-json`, `lint-templates`) only run when files-changed reports
matching paths. When all conditionals skip and the cache restore is a
miss, `pnpm install` never runs, the pnpm store path stays empty, and
`Post Run actions/setup-node` fails with:

  Path Validation Error: Path(s) specified in the action for caching
  do(es) not exist, hence no cache is being saved.

This has been latent since 1721c23 (go-gitea#37487) merged the per-target
lint jobs into a single conditional one. It surfaces whenever the
pnpm-lock cache key gets invalidated (e.g. after go-gitea#37753 bumped
pnpm-lock.yaml on 2026-05-18) and the failing PR happens not to
trigger any pnpm-using step.

Drop the pnpm cache here. When the docs/swagger/json/templates branch
fires, `make deps-frontend` still runs `pnpm install --frozen-lockfile`
against the registry — a small one-time cost on those PRs in exchange
for eliminating the failure mode entirely.

Co-Authored-By: Claude (Opus 4.7) <noreply@anthropic.com>
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 18, 2026
@silverwind silverwind changed the title ci(cache-seeder): generate-go before lint-backend ci: fix cache-related issues May 18, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 18, 2026
@silverwind silverwind enabled auto-merge (squash) May 18, 2026 15:36
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 18, 2026
@silverwind silverwind merged commit 985ca76 into go-gitea:main May 18, 2026
22 checks passed
@silverwind silverwind deleted the ci-cache-seeder-lint-bindata branch May 18, 2026 16:21
@GiteaBot GiteaBot added this to the 1.27.0 milestone May 18, 2026
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 18, 2026
silverwind added a commit to silverwind/gitea that referenced this pull request May 19, 2026
* origin/main: (104 commits)
  fix(deps): update module github.com/go-git/go-git/v5 to v5.19.1 [security] (go-gitea#37786)
  fix(pull): handle empty pull request files view to allow reviews (go-gitea#37783)
  fix(markup): make RenderString never fail (go-gitea#37779)
  fix(markup): wrap indented code blocks for the code-copy button (go-gitea#37748)
  fix(permissions): Fix reading permission (go-gitea#37769)
  fix: add natural sort to sortTreeViewNodes (go-gitea#37772)
  fix: package creation unique conflict (go-gitea#37774)
  fix(deps): update npm dependencies (go-gitea#37768)
  fix(deps): update module gitlab.com/gitlab-org/api/client-go/v2 to v2.26.0 (go-gitea#37771)
  ci: split giteabot workflow (go-gitea#37770)
  [skip ci] Updated translations via Crowdin
  fix: Unify public-only token filtering in API queries and repo access checks (go-gitea#37118)
  fix(deps): update module google.golang.org/grpc to v1.81.1 (go-gitea#37762)
  chore: make DefaultTitleSource default to auto to match GitHub (go-gitea#37767)
  ci: fix cache-related issues (go-gitea#37761)
  chore: fix tests (go-gitea#37760)
  refactor(waitgroup): replace Add/Done goroutines with WaitGroup.Go (go-gitea#37764)
  fix(deps): update go dependencies (go-gitea#37752)
  chore(deps): update action dependencies (go-gitea#37751)
  fix(deps): update module github.com/google/go-github/v85 to v86 (go-gitea#37754)
  ...

# Conflicts:
#	.github/workflows/pull-db-tests.yml
#	modules/storage/s3_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants