Repository navigation
test(conftest): deployed_pr reads the frontend's X-Git-Sha header - #179
Merged
Merged
Conversation
Replaces the workflow-runs lookup, which GitHub served from a weeks-old snapshot for minutes at a time. The live site's own header is the commit actually served, rollbacks included (DataSpaceFrontend#496).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needs DataSpaceFrontend#496, which makes the frontend send
X-Git-Sha: <commit it was built from>. It's safe to merge before that deploys: until then the gated tests skip withreports no deployed commit.Why
deployed_pr(..., workflow=...)(#175, #177) inferred the live frontend commit from the GitHub workflow-runs API. During some windows of a minute or more, that endpoint returned a weeks-old run list, so after DataSpaceFrontend#493 deployed, its tests still skipped some of the time. The re-reads added in #177 couldn't outlast those windows.Change
deployed_pr("Repo#N", site="HOME_URL_DEV")(or"HOME_URL_PROD") sends a HEAD request to that site and compares itsX-Git-Shawith the PR's merge commit. This mirrors the backend's/health/git_shamode, which is unchanged.workflow=andbranch=options and the run-list lookup (net -14 lines).test_api_006: the #493 dev tests usesite="HOME_URL_DEV", and the #495 prod aimodels case usessite="HOME_URL_PROD".The header reports the commit actually being served, so it also stays correct after an automatic rollback, which the run-list approach did not.
Verified
reports no deployed commitnext startbuilt withGITHUB_SHA=f7da2839…(#495's merge commit), #493 / #495not merged yetHOME_URL_PRODunsetHOME_URL_PROD is not setruns abce96fa, which doesn't include 0fe942bc yet(unchanged)test_api_006/013/014/018vs dev + prod