Fix: GH Action schedule failed to create promotion ticket (#8041)#8110
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8110 +/- ##
========================================
Coverage 84.35% 84.35%
========================================
Files 166 166
Lines 24460 24460
========================================
Hits 20633 20633
Misses 3827 3827 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
268e612 to
05a0ec8
Compare
f7e524d to
76a32f7
Compare
76a32f7 to
138a360
Compare
138a360 to
cdf2f14
Compare
9b567ee to
b2ce00a
Compare
| - Optionally, [GitHub CLI], which is used by the scheduled GitLab job, | ||
| `github_schedule`, to create the GitHub issues from templates. You may install | ||
| the version set at `azul_ghcli_version` in [environment.py](environment.py), | ||
| or any compatible recent version. |
There was a problem hiding this comment.
| - Optionally, [GitHub CLI], which is used by the scheduled GitLab job, | |
| `github_schedule`, to create the GitHub issues from templates. You may install | |
| the version set at `azul_ghcli_version` in [environment.py](environment.py), | |
| or any compatible recent version. | |
| - Optionally, the [GitHub CLI]. You should install | |
| the version set at `azul_ghcli_version` in [environment.py](environment.py), | |
| or a more recent, compatible version. |
|
|
||
| Next, confirm with the SA that the ``azul_github_access_token`` used in both | ||
| instances' ``environment.local.py`` is set, and that its permissions are | ||
| equivalent to the ``AZUL_GITHUB_TOKEN`` in the GitHub Action secrets. |
There was a problem hiding this comment.
| equivalent to the ``AZUL_GITHUB_TOKEN`` in the GitHub Action secrets. | |
| equivalent to that of the token deposited in the ``AZUL_GITHUB_TOKEN`` GitHub Action secret. |
| 2) Set the interval pattern to ``0 * * * *`` on ``dev`` and ``30 * * * *`` on | ||
| ``anvildev``. | ||
|
|
||
| 3) Set the cron timezone to ``Pacific Time (US & Canada)`` |
There was a problem hiding this comment.
| 3) Set the cron timezone to ``Pacific Time (US & Canada)`` | |
| 3) Set the Cron timezone to ``Pacific Time (US & Canada)`` |
| instances' ``environment.local.py`` is set, and that its permissions are | ||
| equivalent to the ``AZUL_GITHUB_TOKEN`` in the GitHub Action secrets. | ||
|
|
||
| Lastly, remove ``AZUL_GITHUB_TOKEN`` from the GitHub Action secrets. |
There was a problem hiding this comment.
I'm not sure that operators have the necessary permissions to do this.
|
(Posted by Claude Code)
Security Design ReviewPR Summary: This PR migrates the scheduled GitHub issue creation from a GitHub Action to a GitLab CI job. It installs the GitHub CLI ( Findings1. No integrity verification for GitHub CLI binary download (Moderate) The Dockerfile ( RUN set -o pipefail \
&& curl --fail --silent --location \
https://github.com/cli/cli/releases/download/v${azul_ghcli_version}/gh_${azul_ghcli_version}_linux_${TARGETARCH}.tar.gz \
| tar -xzf - -C /usr/local/bin --strip-components=2 --wildcards "*/bin/gh" --occurrence=1This contrasts with other tool installations in the same Dockerfile:
The 2. Token scope and credential migration (Low) The The credential migration path is sound: Verified items (no concerns)
ConclusionThe migration from GitHub Actions to GitLab CI is architecturally sound and the Python script is well-defended against injection and permission issues. The main recommendation is to add checksum or signature verification for the GitHub CLI download in the Dockerfile to match the integrity verification standard established for other tools in the same image. |
|
(Posted by Claude Code) Security Design ReviewPR Summary: This PR migrates the scheduled GitHub issue creation from a GitHub Action to a GitLab CI job. It installs the GitHub CLI ( Findings1. Token scope and credential migration (Low) The The credential migration path is sound: Verified items (no concerns)
ConclusionNo security concerns. The migration from GitHub Actions to GitLab CI is architecturally sound, the Python script is well-defended against injection and permission issues, and the GitHub CLI download is integrity-verified via committed SHA-256 checksums. |
Security design review
|
|
The |
| You may need to ask a system administrator to perform these changes on your | ||
| behalf. | ||
|
|
||
| Add a new ``github_schedule`` pipeline schedule on the ``dev`` and ``anvildev`` |
There was a problem hiding this comment.
It would have been helpful to describe where in the UI this is.
|
|
||
| 1) Set the description to "Create Azul scheduled issues on GitHub". | ||
|
|
||
| 2) Set the interval pattern to ``0 * * * *`` on ``dev`` and ``30 * * * *`` on |
There was a problem hiding this comment.
2) and 3) should have been swapped since that's the order in which they occur in the UI
|
|
||
| 4) Set the variable ``azul_gitlab_schedule`` to ``github_schedule`` | ||
|
|
||
| Next, confirm with the SA that the ``azul_github_access_token`` used in both |
There was a problem hiding this comment.
This should occur first in the instructions, as it needs to be done before the schedule is created.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Linked issues: #8041
Checklist
Author
developissues/<GitHub handle of author>/<issue#>-<slug>1 when the issue title describes a problem, the corresponding PR
title is
Fix:followed by the issue titleAuthor (partiality)
ptag to titles of partial commitspartialor completely resolves all linked issuespartiallabelAuthor (reindex)
rtag to commit title or the changes introduced by this PR will not require reindexing of any deploymentreindex:devor the changes introduced by it will not require reindexing ofdevreindex:anvildevor the changes introduced by it will not require reindexing ofanvildevreindex:anvilprodor the changes introduced by it will not require reindexing ofanvilprodreindex:prodor the changes introduced by it will not require reindexing ofprodreindex:partialand its description documents the specific reindexing procedure fordev,anvildev,anvilprodandprodor requires a full reindex or carries none of the labelsreindex:dev,reindex:anvildev,reindex:anvilprodandreindex:prodAuthor (mirror)
mirror:devor the changes introduced by it will not require mirroring ofdevmirror:anvildevor the changes introduced by it will not require mirroring ofanvildevmirror:anvilprodor the changes introduced by it will not require mirroring ofanvilprodmirror:prodor the changes introduced by it will not require mirroring ofprodmirror:partialand its description documents the specific mirroring procedure fordev,anvildev,anvilprodandprodor requires a full mirroring or carries none of the labelsmirror:dev,mirror:anvildev,mirror:anvilprodandmirror:prodAuthor (API changes)
APIor this PR does not modify a REST APIa(A) tag to commit title for backwards (in)compatible changes or this PR does not modify a REST APIapp.pyor this PR does not modify a REST APIAuthor (upgrading deployments)
make docker_images.jsonand committed the resulting changes or this PR does not modifyazul_docker_images, or any other variables referenced in the definition of that variableutag to commit title or this PR does not require upgrading deploymentsupgradeor does not require upgrading deploymentsdeploy:sharedor does not modifydocker_images.json, and does not require deploying thesharedcomponent for any other reasondeploy:gitlabor does not require deploying thegitlabcomponentdeploy:runneror does not require deploying therunnerimageAuthor (hotfixes)
Ftag to main commit title or this PR does not include permanent fix for a temporary hotfixanvilprodandprod) have temporary hotfixes for any of the issues linked to this PRAuthor (before every review)
develop, squashed fixups from prior reviewsmake requirements_updateor this PR does not modifyDockerfile,environment,requirements*.txt,common.mk,Makefileorenvironment.bootRtag to commit title or this PR does not modifyrequirements*.txtreqsor does not modifyrequirements*.txtmake integration_testpasses in personal deployment or this PR does not modify functionality that could affect the IT outcomePeer reviewer (after approval)
Note that after requesting changes, the PR must be assigned to only the author.
System administrator (after approval)
demoorno demono demono sandboxN reviewslabel is accuratedevanvildevOperator
reindex:…labels andrcommit title tagmirror:…labelsno demodevelopOperator (deploy
.sharedand.gitlabcomponents)_select dev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select dev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlab_select anvildev.shared && CI_COMMIT_REF_NAME=develop make -C terraform/shared apply_keep_unusedor this PR is not labeleddeploy:shared_select anvildev.gitlab && CI_COMMIT_REF_NAME=develop make -C terraform/gitlab applyor this PR is not labeleddeploy:gitlabdeploy:gitlabdeploy:gitlabSystem administrator (post-deploy of
.gitlabcomponent)dev.gitlabare complete or this PR is not labeleddeploy:gitlabanvildev.gitlabare complete or this PR is not labeleddeploy:gitlabOperator (deploy runner image)
_select dev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runner_select anvildev.gitlab && make -C terraform/gitlab/runneror this PR is not labeleddeploy:runnerOperator (sandbox build)
sandboxlabel or PR is labeledno sandboxdevor PR is labeledno sandboxanvildevor PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxdeployment or PR is labeledno sandboxanvilboxdeployment or PR is labeledno sandboxsandboxor this PR is not labeledupgrade, or upgrade instructions do not apply tosandboxanvilboxor this PR is not labeledupgrade, or upgrade instructions do not apply toanvilboxsandboxor this PR does not remove catalogs or otherwise causes unreferenced indices insandboxanvilboxor this PR does not remove catalogs or otherwise causes unreferenced indices inanvilboxsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevsandboxor this PR is not labeledreindex:devanvilboxor this PR is not labeledreindex:anvildevsandboxor this PR is not labeledmirror:devanvilboxor this PR is not labeledmirror:anvildevsandboxor this PR is not labeledmirror:devanvilboxor this PR is not labeledmirror:anvildevOperator (merge the branch)
pif the PR is also labeledpartialOperator (main build)
devanvildevdevdevanvildevanvildevdevor this PR is not labeledupgrade, or upgrade instructions do not apply todevanvildevor this PR is not labeledupgrade, or upgrade instructions do not apply toanvildevupgrade, or upgrade instructions do not apply to personal deploymentstempdevowner hibernated the deployment_select dev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shared</sub>
_select anvildev.shared && make -C terraform/shared applyor this PR is not labeleddeploy:shareddevanvildevOperator (reindex)
devor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR is neither labeledreindex:partialnorreindex:devanvildevor this PR is neither labeledreindex:partialnorreindex:anvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdevor this PR does not require reindexingdevdevor this PR does not require reindexingdevdeploy_browserjob in the GitLab pipeline for this PR indevor this PR does not require reindexingdevanvildevor this PR does not require reindexinganvildevdeploy_browserjob in the GitLab pipeline for this PR inanvildevor this PR does not require reindexinganvildevOperator (mirroring)
devor this PR is not labelledmirror:devanvildevor this PR is not labelledmirror:anvildevdevor this PR is not labelledmirror:devanvildevor this PR is not labelledmirror:anvildevdevor this PR is not labelledmirror:devanvildevor this PR is not labelledmirror:anvildevOperator
upgradeandAPIlabels to the next promotion PRs or this PR carries neither of these labelsdeploy:shared,deploy:gitlab,deploy:runner,reindex:partial,reindex:anvilprod,reindex:prod,mirror:partial,mirror:anvilprodandmirror:prodlabels to the next promotion PRs or this PR carries none of these labelsdeploy:shared,deploy:gitlab,deploy:runner,reindex:partial,reindex:anvilprod,reindex:prod,mirror:partial,mirror:anvilprodandmirror:prodlabels, from the description of this PR to that of the next promotion PRs or this PR carries none of these labelsShorthand for review comments
Lline is too longWline wrapping is wrongQbad quotesFother formatting problem