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

refactor(IDX): update CI env vars #1703

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

refactor(IDX): update CI env vars #1703

wants to merge 5 commits into from

Conversation

cgundy
Copy link
Member

@cgundy cgundy commented Sep 26, 2024

Github Actions does not expose job_id, so we were using job_id and job_name interchangeably. To simplify, we replace CI_JOB_ID with what was previously ROOT_PIPELINE_ID and remove ROOT_PIPELINE_ID.

@cgundy cgundy marked this pull request as ready for review September 26, 2024 14:03
@cgundy cgundy requested a review from a team as a code owner September 26, 2024 14:03
@github-actions github-actions bot added the @idx label Sep 26, 2024
mkdir -p "/cache/job/${CI_JOB_ID}/${ROOT_PIPELINE_ID}/artifacts"
ln -s "/cache/job/${CI_JOB_ID}/${ROOT_PIPELINE_ID}/artifacts" /__w/$REPO_NAME/$REPO_NAME/artifacts
buildevents cmd "$ROOT_PIPELINE_ID" "$CI_JOB_ID" build-command -- \
rm -rf "/cache/job/${CI_JOB_NAME}/${ROOT_PIPELINE_ID}"
Copy link
Member

@marko-k0 marko-k0 Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use github.run_id. What we have now is actually not safe and we're prone to issues if two jobs are in the same machine and overlap.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use that for ROOT_PIPELINE_ID

ROOT_PIPELINE_ID: ${{ github.run_id }}
- do you think we should replace CI_JOB_ID with ROOT_PIPELINE_ID here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We can do that. Probably as well rename ROOT_PIPELINE_ID.

@cgundy cgundy changed the title refactor(IDX): remove CI_JOB_ID var refactor(IDX): update CI env vars Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants