fix: occasional minified JSON from GitHub release API#6164
fix: occasional minified JSON from GitHub release API#6164kubernetes-prow[bot] merged 3 commits into
Conversation
|
|
|
Welcome @EdwardCooke! |
|
Hi @EdwardCooke. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: EdwardCooke The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the kustomize install helper to extract the latest matching asset download URL more reliably from the GitHub releases payload.
Changes:
- Extract
browser_download_urlvalues explicitly instead of grepping whole JSON lines. - Filter extracted URLs by
${opsys}_${arch}before selecting the latest via version-sort.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
FYI, the response from github to a similar question about minified vs not. https://github.com/orgs/community/discussions/189605 |
|
/ok-to-test |
|
I think we need to fix this problem. |
|
@koba1t i ran a bunch of tests against both minified and non-minified json on Mac and Linux. They all produced the same result. Do you want it automated so it runs everytime a build kicks off? |
|
Up until now, simply running While it may not be necessary to run it during every CI execution, we do need a way to verify that this functionality remains intact whenever the script is modified. |
|
I’ll work on that over the next few days. How would you like me to go about it? One idea I have is keep a copy of both minified and unminified files in the repo and use an environment variable to tell it to read the files instead of downloading them. Trying to reproduce the problem was very time consuming and didn’t always work so my recommendation is we find at least someway to read both good and bad release files. |
|
This PR has multiple commits, and the default merge method is: merge. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@koba1t I have added a way of testing the releases file through an environment variable. I also added a github action that will run only when the test files or the install_kustomize script are modified. |
3056b9a to
f602af3
Compare
|
@koba1t this latest commit should have fixed the test workflow. |
|
@EdwardCooke /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: EdwardCooke, koba1t The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The github releases API occasionally returns a minified JSON object. The original grep command works when each
browser_download_urlwas on the same line, but with a minified blob it returns the last quoted string, which is the URL to the release itself.Fixes #6163