Skip to content

🐛 fix(demo): run forgejo admin via su-exec git - #256

Merged
konih merged 1 commit into
mainfrom
fix/demo-forgejo-suexec
Aug 4, 2026
Merged

konih merged 1 commit into
mainfrom
fix/demo-forgejo-suexec

Conversation

@konih

@konih konih commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • forgejo admin user create fails as root (Forgejo is not supposed to be run as root)
  • Wrap with su-exec git (available in the Forgejo image)

Test plan

  • Live cluster: admin create + repo + token after INSTALL_LOCK
  • Contract test updated
  • CI hero-demo-smoke

Container exec is root; Forgejo refuses root for admin CLI.
Copilot AI lite review requested due to automatic review settings August 4, 2026 21:54
@konih
konih merged commit eb2374a into main Aug 4, 2026
2 checks passed
@konih
konih deleted the fix/demo-forgejo-suexec branch August 4, 2026 21:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Forgejo “hero demo” bootstrap flow to create the Forgejo admin user via su-exec git (instead of running the Forgejo CLI as root), and aligns the demo smoke/contract expectations with that behavior.

Changes:

  • Run forgejo admin user create under su-exec git in the Forgejo bootstrap script.
  • Update the hero smoke test’s contract assertion and failure message to reflect the su-exec git requirement.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
hack/test/demo_03_hero_smoke_test.sh Updates the contract assertion to expect admin creation via su-exec git.
hack/demo/hero/bootstrap-forgejo.sh Runs Forgejo admin user creation under su-exec git to avoid root execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +167 to +168
grep -Eq 'su-exec git forgejo admin user create|_ensure_admin' "${BOOTSTRAP}" ||
fail "bootstrap must create admin via su-exec git forgejo CLI (refuses root)"
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

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.

2 participants