pulumi / actions

Deploy continuously to your cloud of choice, using your favorite language, Pulumi, and GitHub!
Apache License 2.0
240 stars 73 forks source link

pulumi/actions@v4 failing in pulumi/examples repo #886

Open justinvp opened 1 year ago

justinvp commented 1 year ago

https://github.com/pulumi/examples/actions/runs/4429366670/jobs/7769722048#step:16:1

Run pulumi/actions@v4
Configured range: 3.58.0
Error: Could not find a version that satisfied the version range
RobbieMcKinstry commented 1 year ago

Agh! That error message (Could not find a version that satisfied the version range) occurs in two locations. We should disambiguate those to make debugging easier.

RobbieMcKinstry commented 1 year ago

Two suspicions: first, the API appears to return semver tags with a preceding v: v3.58.0, and the API indicates we might need to call semver.coerce() to marshal this format into the expected format.

Second, it looks like this error can occur if we fail to look up the version list (which could occur if we're rate limited by GH). That's one possible explanation. But this feels extremely unlikely because we're getting this error _very consistently. It's worth calling out however, because we don't seem to validate the response code of the HTTP request.

RobbieMcKinstry commented 1 year ago

Looks like we already have a test case asserting we can handle both formats.

RobbieMcKinstry commented 1 year ago

With neither of my suspicions panning out, I added some extra debug information to the error messages. Maybe with better observability, we'll have some greater insight into the failure.

justinvp commented 1 year ago

Should we close as dupe of https://github.com/pulumi/actions/issues/916?

RobbieMcKinstry commented 1 year ago

Probably not; I think fixing #916 will likely resolve this issue (because the way we're pulling versions will change), but technically this issue is more likely related to our semver parsing itself than it is where we get the data from.