Skip to content

Commit

Permalink
Fixing Read failure of 404 from Pulumi Service
Browse files Browse the repository at this point in the history
  • Loading branch information
IaroslavTitov committed Jun 10, 2024
1 parent c3e5632 commit c5dc636
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fixed environment tests breaking due to name collision [#296](https://github.com/pulumi/pulumi-pulumiservice/issues/296)
- Fixed import for Schedules [#270](https://github.com/pulumi/pulumi-pulumiservice/issues/270)
- Fixed Read failure on 404 from Pulumi Service [#312](https://github.com/pulumi/pulumi-pulumiservice/issues/312)

### Miscellaneous

Expand Down
5 changes: 3 additions & 2 deletions provider/pkg/provider/environment_version_tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"path"
"strings"

pbempty "google.golang.org/protobuf/types/known/emptypb"

Expand Down Expand Up @@ -163,8 +164,8 @@ func (evt *PulumiServiceEnvironmentVersionTagResource) Read(req *pulumirpc.ReadR
}

tag, err := evt.client.GetEnvironmentRevisionTag(ctx, input.Organization, input.Environment, input.TagName)
if err != nil {
return nil, fmt.Errorf("failed to read StackTag (%q): %w", req.Id, err)
if err != nil && !strings.Contains(err.Error(), "404") {
return nil, fmt.Errorf("failed to read EnvironmentVersionTag (%q): %w", req.Id, err)
}
if tag == nil {
// if the tag doesn't exist, then return empty response
Expand Down

0 comments on commit c5dc636

Please sign in to comment.