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

Provider downloads from a third party fails #11013

Open
jaxxstorm opened this issue Oct 13, 2022 · 6 comments
Open

Provider downloads from a third party fails #11013

jaxxstorm opened this issue Oct 13, 2022 · 6 comments
Labels
area/automation-api impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec

Comments

@jaxxstorm
Copy link
Contributor

jaxxstorm commented Oct 13, 2022

What happened?

When trying to test the download of third-party plugins from GitHub, we get a 403 error.

These commands work fine locally.

Steps to reproduce

Enable the

await ws.installPluginFromServer("scaleway", "v1.2.0", "github://api.github.com/lbrlabs");

Test

Expected Behavior

It downloads the plugin

Actual Behavior

We get a 403

Output of pulumi about

No response

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@jaxxstorm jaxxstorm added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 13, 2022
@Frassle
Copy link
Member

Frassle commented Oct 13, 2022

This might just have been rate limits? I wonder if we can pull the request body text off for that error to make it a bit more clear.

@RobbieMcKinstry
Copy link
Contributor

Hey Lee! Do I understand this issue correctly?

  1. Your goal is to programmatically download and install a plugin.
  2. You can successfully install the plugin using local CLI commands.
  3. This issue is about a related pull request.
  4. Specifically, the above code await ws.installPluginFromServer("scaleway", "v1.2.0", "github://api.github.com/lbrlabs"); refers to this function defined in the PR.

@RobbieMcKinstry RobbieMcKinstry added kind/enhancement Improvements or new features impact/usability Something that impacts users' ability to use the product easily and intuitively area/automation-api and removed kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 17, 2022
@Frassle
Copy link
Member

Frassle commented Oct 17, 2022

I think you could quibble over this being a bug or enhancement, I don't think we want to auto-retry all 403's in plugin install but that error message could be a lot better. Rather than just saying 403, github would have given some details in the http response as well but we don't bother looking at that.

@RobbieMcKinstry
Copy link
Contributor

Ah, I see what you're getting at re: bug vs feature. I interpreted this issue as specifically a bug in the behavior of the AA function that Lee added in the linked PR. Whoops, I get it now.

@RobbieMcKinstry RobbieMcKinstry added kind/bug Some behavior is incorrect or out of spec and removed kind/enhancement Improvements or new features labels Oct 17, 2022
@RobbieMcKinstry
Copy link
Contributor

@Frassle would you agree that this is a usability consideration we could fix? It feels like the domain of "First 48H"-style usability and error message issues (I know that epic is done with, just trying to draw an analogy).

@Frassle
Copy link
Member

Frassle commented Oct 17, 2022

Yes, it's just a very unhelpful error message.

bors bot added a commit that referenced this issue Mar 2, 2023
12307: Retry 403 rate limit errors from github r=Frassle a=Frassle

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->

Adding a small retry loop to the github downloader to retry 403 errors _iff_ they're due to rate limits. We can't just retry all 403 errors because that code could be returned for other errors as well.

Fixes #11013

## Checklist

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [x] I have added tests that prove my fix is effective or that my feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Service,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Fraser Waters <fraser@pulumi.com>
bors bot added a commit that referenced this issue Mar 2, 2023
12307: Retry 403 rate limit errors from github r=Frassle a=Frassle

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -->

Adding a small retry loop to the github downloader to retry 403 errors _iff_ they're due to rate limits. We can't just retry all 403 errors because that code could be returned for other errors as well.

Fixes #11013

## Checklist

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [x] I have added tests that prove my fix is effective or that my feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Service,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Service API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Fraser Waters <fraser@pulumi.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation-api impact/usability Something that impacts users' ability to use the product easily and intuitively kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants