aRustyDev / aRustyDev/helm-charts
W2 Atomization Workflow Cannot Reset Integration Branch
- Dominant language
- Go Template
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Description
The W2 atomization workflow (`atomize-integration-pr.yaml`) fails when attempting to reset the integration branch to main after atomization completes.
## Error
```
remote: error: GH013: Repository rule violations found for refs/heads/integration.
remote: - Changes must be made through a pull request.
remote: - Cannot force-push to this branch
```
## Root Cause
1. The `protected-branches-linear` ruleset includes a `non_fast_forward` rule that prevents force pushes
2. The workflow uses `github.token` which does not have admin bypass privileges
3. Even though admin bypass is now configured on the ruleset, `github.token` cannot utilize it
## Impact
- E2E-1 (Happy Path) test: W1 validation passes but W2 atomization fails
- The atomization pipeline is blocked at the reset step
- Manual intervention required to reset integration branch
## Proposed Solution
Update the workflow to use a Personal Access Token (PAT) with admin privileges:
1. Create a PAT with `repo` scope and admin access
2. Store the PAT as a repository secret (e.g., `ADMIN_TOKEN`)
3. Update the `Reset Integration` step in `atomize-integration-pr.yaml`:
```yaml
- name: Reset integration to main
env:
GH_TOKEN: ${{ secrets.ADMIN_TOKEN }} # Changed from github.token
run: |
git checkout integration
git reset --hard origin/main
git push origin integration --force-with-lease
```
## Related
- Ruleset: `protected-branches-linear` (ID: 11925113)
- Workflow: `.github/workflows/atomize-integration-pr.yaml`
- Documentation: `docs/src/troubleshooting/ci-known-issues.md`
- ADR: ADR-011 (Full Atomization Model)
## Workaround
Admins can manually reset the integration branch:
```bash
git checkout integration
git reset --hard origin/main
git push --force-with-lease origin integration
```
Contributor guide
Assessment
This issue has not been assessed yet.