Skip to content

website: Use latest release rather than edge #7781

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

Merged

Conversation

charlieegan3
Copy link
Contributor

@charlieegan3 charlieegan3 commented Jul 17, 2025

⚠️ This should be merged after v1.7.0 is released as the v1.6.0 website is not going to have: #7783, which is needed by the versioned deployments to toggle their out of date state.

This is intended to make the default view of the OPA site and docs from the latest release, rather than from edge.

Deploy preview command will need to show edge, but using that to test the prod command atm.

When make netlify-latest was used on the preview, we see that the site was built from the latest release:

Screenshot 2025-07-17 at 11 16 43

@charlieegan3 charlieegan3 force-pushed the netlify-latest-release branch 6 times, most recently from c42c4ad to 1e76158 Compare July 17, 2025 09:54
Copy link

netlify bot commented Jul 17, 2025

Deploy Preview for openpolicyagent ready!

Name Link
🔨 Latest commit 2a3ba46
🔍 Latest deploy log https://app.netlify.com/projects/openpolicyagent/deploys/688b8407dd873d000823ce4a
😎 Deploy Preview https://deploy-preview-7781--openpolicyagent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@charlieegan3 charlieegan3 force-pushed the netlify-latest-release branch 6 times, most recently from 620b9b5 to 766c8a3 Compare July 17, 2025 10:30
Copy link
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

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

Thanks!

docs/Makefile Outdated
git diff-index --quiet HEAD -- || (echo "Latest release build must be done without working changes" && exit 1)
git fetch --tags origin
$(eval CURRENT_BRANCH := $(shell git branch --show-current))
git checkout $$(git describe --tags --abbrev=0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we assert the tag format here. I.e. that it fits the v<semver> structure we use for release tags?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that makes sense. I have created a new tag locally to check:

$ git tag --sort=-version:refname | head -n 3
v2.15.0-fffff
v1.6.0
v1.5.1
$ git tag --sort=-version:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1
v1.6.0

@charlieegan3 charlieegan3 force-pushed the netlify-latest-release branch 6 times, most recently from 53482ee to f39d2ac Compare July 17, 2025 11:07
@srenatus
Copy link
Contributor

💭 Does this mean we'll stop building the website on code pushes to main, but only build it on tag pushes, if the tag also is the latest one?

@charlieegan3 charlieegan3 force-pushed the netlify-latest-release branch from f39d2ac to a952ed4 Compare July 17, 2025 11:12
@charlieegan3
Copy link
Contributor Author

charlieegan3 commented Jul 17, 2025

The site will still be built on pushed to main, but only the latest tag will be used. This is because it's 'easier' and more robust than sending events at the correct time to build the site. In theory.

@charlieegan3 charlieegan3 force-pushed the netlify-latest-release branch 3 times, most recently from e349088 to bc9c208 Compare July 17, 2025 11:17
Copy link
Contributor

@johanfylling johanfylling left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@charlieegan3 charlieegan3 force-pushed the netlify-latest-release branch from bc9c208 to 8f724be Compare July 28, 2025 16:27
@srenatus srenatus mentioned this pull request Jul 31, 2025
@charlieegan3 charlieegan3 force-pushed the netlify-latest-release branch from 8f724be to 2a3ba46 Compare July 31, 2025 14:56
@charlieegan3 charlieegan3 enabled auto-merge (squash) July 31, 2025 15:09
@charlieegan3 charlieegan3 merged commit 3546780 into open-policy-agent:main Jul 31, 2025
55 of 57 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.

3 participants