Skip to content

fix(backstage): GitHub integration and token for publish (#2354) - #2586

Merged
paruff merged 1 commit into
mainfrom
fix/2354-backstage-github-integration
Dec 3, 2026
Merged

paruff merged 1 commit into
mainfrom
fix/2354-backstage-github-integration

Conversation

@paruff

@paruff paruff commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Summary

Third scaffolder run on AKS (task a8409433-8e5b-4716-92ad-5ea7f116e3a8, python-service): the render passed and publish:github failed with No token available for host: github.com. Root cause, from the live cluster:

  • the Application's GITHUB_TOKEN env sits in a top-level extraEnvVars, which the chart ignores (the deployment has no such variable);
  • the running config has no integrations block;
  • the Secret backstage-github-credentials does not exist, and nothing provides it.

Adds the github.com integration to appConfig, GITHUB_TOKEN to backstage.extraEnvVars (optional: true, so a missing Secret cannot stop the portal starting), and an ExternalSecret over OpenBao fawkes/backstage-github-credentials. Refs #2354; does not close it.

SECURITY-SENSITIVE: needs manual review. Do not auto-merge. Secrets and an ArgoCD Application manifest.

A person must supply the token

A GitHub token that can create repos cannot be generated here. Recommended: a fine-grained PAT for the owner with Administration and Contents write (Metadata read) on only the repos Backstage may create. Then:
./scripts/put-secret.sh fawkes backstage-github-credentials token=-
I did not reuse tekton-gitops-github-token or dora-metrics-github-token; they were issued for other jobs.

Tests

tests/unit/test_backstage_github_integration.py (3 cases): red first, now green; 22 related tests pass.

Judgment calls for review

  • The dead top-level extraEnvVars (including its GITHUB_TOKEN, AUTH_GITHUB_*, ARGOCD_* entries) is left alone; fixing it is out of scope and may change behaviour. Worth its own issue.
  • The ExternalSecret reports not-ready until the token is stored; the optional env keeps Backstage up meanwhile.

AI-generated; needs human review.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Comment on lines +60 to +63
dataFrom: [{extract: {key: fawkes/backstage-github-credentials}}]
---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
Comment on lines +60 to +63
dataFrom: [{extract: {key: fawkes/backstage-github-credentials}}]
---
apiVersion: external-secrets.io/v1
kind: ExternalSecret
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

📊 Code Quality Report

Check Status
Python Quality success
Python BDD Acceptance success
Python Integration Collect success
TypeScript Quality skipped
Go Quality skipped
Shell Quality skipped
Shell Tests (BATS) skipped
YAML Quality success
Security Integration skipped
Security Scanning skipped

📈 Quality Gates

✅ Passed: All checks completed successfully
⚠️ Warning: Some checks have warnings
❌ Failed: Critical issues found

🔧 How to Fix

Run locally before pushing:

make pre-commit-setup  # Install pre-commit hooks
make lint              # Run all linters
make test-bats         # Run shell script tests
pytest --cov=. --cov-report=term-missing  # Check coverage

See Code Quality Standards for more details.

@paruff
paruff marked this pull request as ready for review December 3, 2026 13:20
@paruff
paruff merged commit 6a1785a into main Dec 3, 2026
34 checks passed
@paruff
paruff deleted the fix/2354-backstage-github-integration branch December 3, 2026 13:20
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