Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check_branch.py fails on chained PRs #6906

Open
achave11-ucsc opened this issue Feb 13, 2025 · 4 comments
Open

check_branch.py fails on chained PRs #6906

achave11-ucsc opened this issue Feb 13, 2025 · 4 comments
Assignees
Labels
+ [priority] High demo [process] To be demonstrated at the end of the sprint infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team spike:2 [process] Spike estimate of two points

Comments

@achave11-ucsc
Copy link
Member

achave11-ucsc commented Feb 13, 2025

[edit: @hannes-ucsc]

This is a regression from 64b1419 (Fix: GitHub CI workflow selects dev when building prod branch (#5428, #6823, PR #6818)).

@achave11-ucsc achave11-ucsc added orange [process] Done by the Azul team infra [subject] Project infrastructure like CI/CD, build and deployment scripts + [priority] High spike:2 [process] Spike estimate of two points labels Feb 13, 2025
@achave11-ucsc
Copy link
Member Author

Spike to diagnose.

@nadove-ucsc
Copy link
Contributor

The script expects that the PR's target branch is associated with a shared deployment, as configured in azul_shared_deployments:

'azul_shared_deployments': json.dumps({
    'develop': ['dev', 'sandbox', 'anvildev', 'anvilbox'],
    'prod': ['prod'],
    'anvilprod': ['anvilprod', 'hammerbox']
}),

When creating a chained PR, the ideal behavior would be for the script to select the deployment associated with the target branch of the base PR (if the base PR is also chained, repeat this process until a non-chained base PR is reached). I presume this is possible via the GitHub API, but it might be overkill to go about implementing it.

My impression is that most chained PR's eventually lead to develop. Promotions being chained would be very unusual; I'm not sure about hotfixes though. If my impression is correct, it might be acceptable to just assume that dev is the appropriate deployment when the target branch isn't recognized.

@achave11-ucsc
Copy link
Member Author

achave11-ucsc commented Feb 14, 2025

@hannes-ucsc: "Agreed, we can assume that chained PRs always target develop, albeit indirectly."

@hannes-ucsc
Copy link
Member

For demo, attempt to reproduce.

@hannes-ucsc hannes-ucsc changed the title Chained PRs fail immediatly on GH after or in check_branch.py check_branch.py fails on chained PRs Feb 27, 2025
@hannes-ucsc hannes-ucsc added the demo [process] To be demonstrated at the end of the sprint label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
+ [priority] High demo [process] To be demonstrated at the end of the sprint infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team spike:2 [process] Spike estimate of two points
Projects
None yet
Development

No branches or pull requests

3 participants