Skip to content

Merge dcs-base-v1.25 into release/dcs/v1.25#411

Merged
richmahn merged 12 commits into
release/dcs/v1.25from
dcs-base-v1.25
Mar 15, 2026
Merged

Merge dcs-base-v1.25 into release/dcs/v1.25#411
richmahn merged 12 commits into
release/dcs/v1.25from
dcs-base-v1.25

Conversation

@richmahn

Copy link
Copy Markdown
Member

Summary

  • Fix context cancellation in Door43Metadata notifier goroutines
  • Add ConvertRC2SB service to convert RC repos to Scripture Burrito format

Test plan

  • Verify build succeeds
  • Run DCS integration tests
  • Test catalog and metadata features

🤖 Generated with Claude Code

richmahn and others added 2 commits March 13, 2026 08:47
Adds a new service that converts Resource Container (RC) repositories to
Scripture Burrito (SB) format and pushes the result to a "main" branch.

Conversion is triggered three ways:
- Automatically via notification hooks when a release is created/updated
- Manually via the admin dashboard "Convert RC to Scripture Burrito" button
- Via CLI command: gitea convertrc2sb [--owner X --repo Y]

Qualifying repos must have: MetadataType="rc", DefaultBranch="master",
and a topic of "tc-create", "tc-ready", "pushing2sb", or "rc2sb".

New files:
- services/convertrc2sb/convertrc2sb.go (core conversion logic)
- services/convertrc2sb/convertrc2sb_notifier.go (notification hooks)
- cmd/convertrc2sb.go (CLI command)

Modified files:
- cmd/main.go, routers/init.go (wire up new service)
- services/cron/tasks_dcs.go, tasks_basic.go (cron task registration)
- templates/admin/dashboard.tmpl (admin button)
- options/locale/locale_en-US.ini (locale string)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Several notification handlers (ChangeDefaultBranch, SyncPushCommits,
MigrateRepository, TransferRepository, ForkRepository, RenameRepository)
were passing the HTTP request context directly to goroutines. When the
HTTP response completes, the request context is cancelled, which could
kill the goroutine before ProcessDoor43MetadataForRepo finishes.

Fix: use graceful.GetManager().ShutdownContext() for all goroutine-based
handlers, matching the pattern already used by PushCommits. Also fixed a
missing err argument in the ChangeDefaultBranch log.Error call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… and unit tests

- Fix 113 Go lint issues across ~35 DCS files (modernize, perfsprint,
  errcheck, staticcheck, revive, nilnil, usestdlibvars, govet, gofumpt,
  ineffassign, unparam, nakedret)
- Fix 3 spelling errors (hexidecimal, transfered, langauges)
- Fix template lint: HTTP→HTTPS links, javascript: hrefs, entity refs,
  orphan tags in 5 template files
- Fix swagger: /catalog/bp/{owner}/{repo} ref param changed from path
  to query parameter
- Fix markdown lint in dcs-customizations.md: table separator spacing
  and blank lines around headings/lists
- Fix unit tests: door43metadata_test.go function signature,
  blockexpensive_test.go DCS expectations, gitref.go vet error
- Regenerate go-licenses.json (add go-rc2sb) and swagger

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
richmahn and others added 5 commits March 14, 2026 15:10
…pectations, markdown

- Fix copyright headers in DCS routes.go files (require "Gitea" per gitea-vet)
- Fix MSSQL duplicate ORDER BY in GetLatestReleaseByRepoID (remove
  redundant Desc() call that other DBs silently accepted)
- Replace custom contains() with slices.Contains in catalog.go
- Update TestAPICron/List expected count from 29 to 33 (DCS adds 4 cron tasks)
- Update TestRequireSignInView/BlockAnonymousAccessExpensive to use
  src/commit/ path (DCS makes broad src/ non-expensive)
- Fix CLAUDE.md markdown lint errors (blank lines, trailing punctuation,
  table separators)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Document the full DCS fork branching model, including:
- ASCII diagram of branch topology and merge flow
- Day-to-day development workflow (dcs-base-v#.## first)
- How to handle API differences between release and main targets
- Step-by-step procedure for creating new dcs-base for new Gitea versions
- Localization conventions (dcs. prefix, override keys, INI vs JSON)
- Tips for working with Claude Code on this fork

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
richmahn and others added 2 commits March 14, 2026 19:58
The background goroutines were passing the shared *Repository pointer
directly. ProcessDoor43MetadataForRepo then called LoadLatestDMs()
which writes to repo fields, racing with other notifiers reading the
same repo concurrently.

Fix: extract processInBackground() helper that captures only repo ID
and name, then loads a fresh Repository inside the goroutine via
GetRepositoryByID(), eliminating shared mutable state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@richmahn richmahn merged commit f00d7ff into release/dcs/v1.25 Mar 15, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant