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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: integrate builtin_metadata.json handling in release process #4763

Merged
merged 1 commit into from Jun 20, 2022

Conversation

srenatus
Copy link
Contributor

@srenatus srenatus commented Jun 9, 2022

Fixes #4754.

Rule number one of release-script changes: it'll break the next release. 馃

This is more convoluted than it has to be, but it's because of this outline of our release process:

  • A clean checkout is used to generate the release patch,
    1. it'll update the version/version.go file
    2. it'll copy the capabilities files
  • go isn't available in the docker container running that script (we're using python there)
  • the golang script generate builtin_metadata.json consumes the capabilities files

So now, we'll bump the version in version/version.go and run make generate before handing stuff off to the python container with its release patch generation. With an extra conditional in the script generating the builtin_metadata.json when its version doesn't end in -dev, we'll add the currently-to-be-released version to each builtin's "available_versions".

This is a bit of a mess. If anyone has a better idea, I'm all ears. I'd eventually love to drop all our custom code in favor of something like ko, but that's for another day.

ashutosh-narkar
ashutosh-narkar previously approved these changes Jun 9, 2022
Copy link
Member

@ashutosh-narkar ashutosh-narkar left a comment

Choose a reason for hiding this comment

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

Have you tested this flow on your fork so we know what to expect when we create the next release. Also do you think we should add a note about this in RELEASE.md ?

@srenatus
Copy link
Contributor Author

@ashutosh-narkar thanks, good points. Will do.

Fixes open-policy-agent#4754.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
@srenatus
Copy link
Contributor Author

鉁旓笍 Worked OK on my branch: https://github.com/srenatus/opa/actions/runs/2527597669

@srenatus srenatus merged commit 687beb7 into open-policy-agent:main Jun 20, 2022
@srenatus srenatus deleted the sr/fix-metadata branch June 20, 2022 08:57
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.

build: include currently-released version in builtin_metadata
2 participants