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

GitHub CI workflow selects dev when building prod branch #5428

Open
hannes-ucsc opened this issue Jul 27, 2023 · 3 comments
Open

GitHub CI workflow selects dev when building prod branch #5428

hannes-ucsc opened this issue Jul 27, 2023 · 3 comments
Assignees
Labels
+ [priority] High debt [type] A defect incurring continued engineering cost demo [process] To be demonstrated at the end of the sprint easy [process] Good issue for new team members groomed [process] Issue was recently looked at during backlog grooming infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team

Comments

@hannes-ucsc
Copy link
Member

hannes-ucsc commented Jul 27, 2023

From a recent promotion:

https://github.com/DataBiosphere/azul/actions/runs/5674220102/job/15377359216#step:4:3

This is why we detected #5426 only after the merge commit had already been pushed, and the build failed on GitLab. It did not fail on GitHub, but should have.

When building the prod branch, or a PR branch based on it, the prod deployment should be selected.

When building the develop branch, or a PR branch based on it, the dev deployment should be selected, as is currently the case.

@hannes-ucsc hannes-ucsc added the orange [process] Done by the Azul team label Jul 27, 2023
@dsotirho-ucsc dsotirho-ucsc added bug debt [type] A defect incurring continued engineering cost infra [subject] Project infrastructure like CI/CD, build and deployment scripts -- [priority] Low labels Jul 27, 2023
@hannes-ucsc
Copy link
Member Author

Index: .github/workflows/ci.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml	(revision 3025429b8a6eb784dc7799340e4c775184109add)
+++ b/.github/workflows/ci.yml	(date 1735347224051)
@@ -24,8 +24,9 @@
 
       - name: 'Run unit tests and other checks'
         run: |
-          source environment
-          _link dev
+          source environment  # load global defaults
+          deployment=$(PYTHONPATH=src python scripts/check_branch.py --print)
+          _link $deployment
           _refresh
 
           make virtualenv

and add support for GITHUB_BASE_REF if set, or GITHUB_HEAD_REF otherwise, to check_branch.py, in addition to GitLab's CI_COMMIT_REF_NAME.

@hannes-ucsc hannes-ucsc added + [priority] High groomed [process] Issue was recently looked at during backlog grooming easy [process] Good issue for new team members and removed -- [priority] Low labels Dec 28, 2024
@achave11-ucsc achave11-ucsc self-assigned this Jan 6, 2025
@hannes-ucsc
Copy link
Member Author

For demo, show that

  1. when building the prod branch, or a PR branch based on it, the prod deployment is selected.

  2. when building the anvilprod branch, or a PR branch based on it, the anvilprod deployment is selected.

  3. when building the develop branch, or a PR branch based on it, the dev deployment is be selected.

@achave11-ucsc
Copy link
Member

Partially demoed for pull builds but it remains to be demoed for push builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
+ [priority] High debt [type] A defect incurring continued engineering cost demo [process] To be demonstrated at the end of the sprint easy [process] Good issue for new team members groomed [process] Issue was recently looked at during backlog grooming infra [subject] Project infrastructure like CI/CD, build and deployment scripts orange [process] Done by the Azul team
Projects
None yet
Development

No branches or pull requests

3 participants