-
Notifications
You must be signed in to change notification settings - Fork 500
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
fix: Better addon downloads #15173
Merged
Merged
fix: Better addon downloads #15173
Conversation
This file contains 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
disq
commented
Nov 7, 2023
disq
commented
Nov 7, 2023
) | ||
|
||
switch targetDir { | ||
case "-": | ||
fileWriter = os.Stdout | ||
default: | ||
zipPath := filepath.Join(targetDir, addonFilename(teamName, addonType, addonName, version, format)) | ||
zipPath := filepath.Join(targetDir, path.Base(res.Request.URL.Path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we infer the filename from the final URL.
disq
commented
Nov 13, 2023
disq
commented
Nov 13, 2023
disq
commented
Nov 15, 2023
@@ -6,7 +6,7 @@ require ( | |||
github.com/apache/arrow/go/v14 v14.0.0-20231031200323-c49e24273160 | |||
github.com/bradleyjkemp/cupaloy/v2 v2.8.0 | |||
github.com/cenkalti/backoff/v4 v4.2.1 | |||
github.com/cloudquery/cloudquery-api-go v1.4.6 | |||
github.com/cloudquery/cloudquery-api-go v1.5.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now use 1.5.x
to infer if we need to use the /teams/* endpoint or not, depending on token type.
erezrokah
approved these changes
Nov 15, 2023
1 task
kodiakhq bot
pushed a commit
that referenced
this pull request
Nov 15, 2023
🤖 I have created a release *beep* *boop* --- ## [3.29.0](cli-v3.28.1...cli-v3.29.0) (2023-11-15) ### Features * Add `plugin docs` commands for doc updates ([#15264](#15264)) ([307d7bd](307d7bd)) * Add teamName to managed plugin configuration ([#15278](#15278)) ([b3cf9b8](b3cf9b8)) ### Bug Fixes * Better addon downloads ([#15173](#15173)) ([958483f](958483f)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.18.0 ([#15132](#15132)) ([81ee138](81ee138)) * **deps:** Update module github.com/cloudquery/plugin-sdk/v4 to v4.18.1 ([#15263](#15263)) ([a9a39ef](a9a39ef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Get addon downloads to work without making 2 extra api requests but still verifying checksum.
Needs https://github.com/cloudquery/cloud/pull/660 to be solved/merged first (internal issue)Also updates plugin-pb-go to verify the plugin downloads from the hub (PR)
We might keep this out and use the AddonWithTeam endpoint which is going to be implemented in the backend soon.