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

chore: Updating GK -> opa versions #3537

Merged
merged 14 commits into from
Sep 19, 2024

Conversation

JaydipGabani
Copy link
Contributor

@JaydipGabani JaydipGabani commented Sep 10, 2024

What this PR does / why we need it:
Adding a step in release workflow to fetch opa versions with gatekeeper release and update the opa-versions.md file. This PR eliminates the need of updating opa-versions.md after every release.

Here is an example of successful release PR - JaydipGabani#115.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #

Special notes for your reviewer:

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
@JaydipGabani JaydipGabani requested a review from a team as a code owner September 10, 2024 02:58
| `v3.14.0` | `v0.57.1` |
| `v3.13.0` | `v0.54.0` |
| `v3.12.0` | `v0.49.2` |
| `v3.11.1` | `v0.47.2` |
Copy link
Member

Choose a reason for hiding this comment

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

only need to add versions after v3.15.1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ritazh Updated the versions. I also added a script to automate this process. Because of the script you will see there are tags and opa version added in the file that are older than 3.15.1.

@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.03%. Comparing base (3350319) to head (076c44f).
Report is 147 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (3350319) and HEAD (076c44f). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3350319) HEAD (076c44f)
unittests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3537      +/-   ##
==========================================
- Coverage   54.49%   48.03%   -6.46%     
==========================================
  Files         134      218      +84     
  Lines       12329    15167    +2838     
==========================================
+ Hits         6719     7286     +567     
- Misses       5116     7066    +1950     
- Partials      494      815     +321     
Flag Coverage Δ
unittests 48.03% <ø> (-6.46%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

🤗

Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for automating this!

@ritazh
Copy link
Member

ritazh commented Sep 13, 2024

why is this PR adding opa version for 3.16 instead of 3.19?

@JaydipGabani
Copy link
Contributor Author

why is this PR adding opa version for 3.16 instead of 3.19?

@ritazh wdym by 3.19?

@ritazh
Copy link
Member

ritazh commented Sep 13, 2024

why is this PR adding opa version for 3.16 instead of 3.19?

@ritazh wdym by 3.19?

sorry I forgot to paste the link https://github.com/JaydipGabani/gatekeeper/pull/115/files#diff-7716142b7ef995ef204d6130d795699ce0509c9e4b060ba4375a7ad729194b58R10 this PR is bumping GK to 3.19 but the opa version update is for 3.16

@JaydipGabani
Copy link
Contributor Author

JaydipGabani commented Sep 13, 2024

why is this PR adding opa version for 3.16 instead of 3.19?

@ritazh wdym by 3.19?

sorry I forgot to paste the link https://github.com/JaydipGabani/gatekeeper/pull/115/files#diff-7716142b7ef995ef204d6130d795699ce0509c9e4b060ba4375a7ad729194b58R10 this PR is bumping GK to 3.19 but the opa version update is for 3.16

Sorry about confusion. I should have been clearer in the PR description. The confusion stems from a difference in the tags between my fork and the upstream Gatekeeper (GK) repository. For instance, my fork doesn't contain the 3.17 tags, so when I run git tag -l --sort=-v:refname, it doesn't return the 3.17 tags.

The PR I linked is a result of cutting the 3.18.0 release in my fork. Since the 3.18.0 tag doesn't exist in the upstream repo, running this command:
opa=$(curl https://raw.githubusercontent.com/open-policy-agent/gatekeeper/$tag/go.mod | grep /opa | awk '{print $2}')
fails to retrieve the OPA version for that tag. This is why the GK to OPA mappings for 3.17 and 3.18 are missing.

In short, the sample PR includes only the GK-to-OPA versions that are present in both the upstream repo and my fork, due to the tag differences between the two.

@JaydipGabani
Copy link
Contributor Author

@maxsmythe PTAL.

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

Thank you for automating this!

@ritazh ritazh merged commit 8d1d7b3 into open-policy-agent:master Sep 19, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants