-
Notifications
You must be signed in to change notification settings - Fork 23
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
Prevent CI from masking version problem bugs #143
Conversation
# If we passed a branch for cedar-policy, modify Cargo.toml to use that branch | ||
- name: Replace Crates dot IO with Github version | ||
if: "${{ inputs.cedar_policy_ref != '' }}" | ||
run: cd cedar-rust-hello-world && printf "\n[patch.crates-io]\ncedar-policy = { git = 'https://github.com/cedar-policy/cedar.git', rev = '${{ inputs.cedar_policy_ref }}'}" >> Cargo.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we should fix CI to detect a mistake in versioning, but I think this code is necessary.
The intent of this step is that we should be able to submit a PR to cedar-policy
and then check that cedar-examples
builds and passes tests with the changes in the PR branch, so just building against the crates.io release won't work.
Maybe try removing
cedar-examples/.github/workflows/ci.yml
Line 59 in f94b5df
cedar_policy_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} |
cedar-examples/.github/workflows/ci.yml
Line 67 in f94b5df
cedar_policy_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} |
and
cedar-examples/.github/workflows/ci.yml
Line 75 in f94b5df
cedar_policy_ref: refs/heads/${{ needs.get-branch-name.outputs.branch_name }} |
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the convention is to use git as the source in cargo.toml files. So this replacement is unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it needs to point to the correct git branch for a PR, not just the git main
or release branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to do this.
The *reusable.yml tasks take in two branch names, one for cedar-policy
and one for cedar-examples
. We want this so a change to cedar-policy:releases/3.2.x
can build against the 3.2
branch in cedar-examples
.
For changes to cedar-examples
, the ci.yaml
file can point to the correct cedar_policy_ref
.
This reverts commit 64cb5fe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to do this.
Let's use #149 |
The current CI hides version problems by overwriting the version of Cedar used.
This PR removes that functionality.