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

improvement: using a new release endpoint for self-update #5229

Merged
merged 6 commits into from Oct 13, 2023

Conversation

mkhq
Copy link
Contributor

@mkhq mkhq commented Oct 11, 2023

What this PR does / why we need it:

Update to use a new endpoint to check for releases.

Which issue(s) this PR fixes:

Fixes #4893

Special notes for your reviewer:

@gitguardian

This comment was marked as resolved.

@mkhq mkhq requested a review from stefreak October 11, 2023 11:09
@vvagaytsev
Copy link
Collaborator

Would this PR fix #4893?

@mkhq mkhq force-pushed the improvement-self-update-version-check branch from 0a6b643 to 6e0d9d0 Compare October 11, 2023 18:58
@mkhq mkhq marked this pull request as ready for review October 12, 2023 09:00
@mkhq mkhq requested a review from a team October 12, 2023 09:01
TimBeyer
TimBeyer previously approved these changes Oct 12, 2023
Copy link
Collaborator

@twelvemo twelvemo left a comment

Choose a reason for hiding this comment

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

Good stuff! Just had one question about a test.

})

it(`aborts cleanly if desired version isn't found`, async () => {
const scope = nock("https://get.garden.io")
scope.get("/releases/latest").reply(200, { tag_name: "0.13.0" })

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why would 0.13.0 not exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test is for checking that foo cannot be downloaded. It resolves to a local server with the files in the data/self-update directory.

@mkhq mkhq enabled auto-merge October 13, 2023 14:17
@mkhq mkhq added this pull request to the merge queue Oct 13, 2023
Merged via the queue into main with commit 33cfebc Oct 13, 2023
43 checks passed
@mkhq mkhq deleted the improvement-self-update-version-check branch October 13, 2023 19:27
mkhq added a commit that referenced this pull request Oct 15, 2023
* improvement: using a new release endpoint for self-update

* test: fixed self-update tests to mock the release endpoint

* docs: architecture flag in self-update command

* improvement: better error handling when retrieving releases

* test: releases endpoint failure and clarifying comments on desired version

---------

Co-authored-by: Anna Mager <78752267+twelvemo@users.noreply.github.com>
mkhq added a commit that referenced this pull request Oct 15, 2023
* improvement: using a new release endpoint for self-update

* test: fixed self-update tests to mock the release endpoint

* docs: architecture flag in self-update command

* improvement: better error handling when retrieving releases

* test: releases endpoint failure and clarifying comments on desired version

---------

Co-authored-by: Anna Mager <78752267+twelvemo@users.noreply.github.com>
mkhq added a commit that referenced this pull request Oct 16, 2023
#5236)

* improvement: using a new release endpoint for self-update (#5229)

* improvement: using a new release endpoint for self-update

* test: fixed self-update tests to mock the release endpoint

* docs: architecture flag in self-update command

* improvement: better error handling when retrieving releases

* test: releases endpoint failure and clarifying comments on desired version

---------

Co-authored-by: Anna Mager <78752267+twelvemo@users.noreply.github.com>

* fix: docs base url

---------

Co-authored-by: Anna Mager <78752267+twelvemo@users.noreply.github.com>
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.

[Bug]: github API rate-limiting can occur in garden self-update
4 participants