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

Fix aws.s3.Bucket tag drift detection #3910

Merged
merged 3 commits into from
May 10, 2024
Merged

Fix aws.s3.Bucket tag drift detection #3910

merged 3 commits into from
May 10, 2024

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented May 8, 2024

Make sure that pulumi refresh detects changes to bucket tagging.

The implementation restores aws_s3_legacy_bucket resource participation in the generic tags interceptor.

Fixes #3674

Make sure that `pulumi refresh` detects changes to bucket tagging.

The implementation restores aws_s3_legacy_bucket resource participation in the generic tags interceptor.
@t0yv0 t0yv0 requested review from corymhall and flostadler May 8, 2024 21:47
Copy link

github-actions bot commented May 8, 2024

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

Copy link

github-actions bot commented May 8, 2024

Is README.md missing any configuration options?

assumeRoleWithWebIdentity not found in Configuration section
customCaBundle not found in Configuration section
defaultTags not found in Configuration section
ec2MetadataServiceEndpoint not found in Configuration section
ec2MetadataServiceEndpointMode not found in Configuration section
httpProxy not found in Configuration section
httpsProxy not found in Configuration section
ignoreTags not found in Configuration section
noProxy not found in Configuration section
retryMode not found in Configuration section
s3UsEast1RegionalEndpoint not found in Configuration section
sharedConfigFiles not found in Configuration section
skipRequestingAccountId not found in Configuration section
stsRegion not found in Configuration section
tokenBucketRateLimiterCapacity not found in Configuration section
useDualstackEndpoint not found in Configuration section

Please add a description for each of these options to README.md. Details about them can be found in either the upstream docs or schema.json.

@t0yv0
Copy link
Member Author

t0yv0 commented May 9, 2024

The randomized tagging tests flagged legacy-bucket not behaving correctly which is very relevant to this change. Specifically the randomized state transition defying the expectation is:

     {"defaultTags":{"x":"","y":"s"},"resourceTags":{"x":"s","y":"s"}}
 --> {"defaultTags":{},"resourceTags":{"x":"","y":"s"}

      expected: map[string]string{"x":"", "y":"s"}
      actual  : map[string]string{"x":"s", "y":"s"}

We have seen flakes here before due to tag retrieval eventual consistency but I'm going to double check since this very well may be an actual problem.

@t0yv0
Copy link
Member Author

t0yv0 commented May 9, 2024

Doesn't reproduce locally, must have been a flake.

Copy link
Contributor

@corymhall corymhall left a comment

Choose a reason for hiding this comment

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

@t0yv0 I'm assuming that adding the legacy bucket as a ServicePackage is what enrolls it into the generic tags? Is there any other implications of doing this, I'm not very familiar with what ServicePackage does.

@t0yv0
Copy link
Member Author

t0yv0 commented May 10, 2024

I think yes that's it. https://github.com/hashicorp/terraform-provider-aws/blob/master/internal/provider/provider.go#L39 walks through all ServicePackage defined resources and https://github.com/hashicorp/terraform-provider-aws/blob/master/internal/provider/provider.go#L329 installs the interceptor. It looks like it does a few checks. I think it's reasonable for the legacy bucket to participate here.

@t0yv0 t0yv0 merged commit 53df635 into master May 10, 2024
23 checks passed
@t0yv0 t0yv0 deleted the t0yv0/fix-3674 branch May 10, 2024 17:38
Copy link
Contributor

@flostadler flostadler left a comment

Choose a reason for hiding this comment

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

LGTM

lumiere-bot bot added a commit to coolguy1771/home-ops that referenced this pull request May 15, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@pulumi/aws](https://pulumi.io)
([source](https://togithub.com/pulumi/pulumi-aws)) | dependencies |
minor | [`6.34.1` ->
`6.35.0`](https://renovatebot.com/diffs/npm/@pulumi%2faws/6.34.1/6.35.0)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>pulumi/pulumi-aws (@&#8203;pulumi/aws)</summary>

###
[`v6.35.0`](https://togithub.com/pulumi/pulumi-aws/releases/tag/v6.35.0)

[Compare
Source](https://togithub.com/pulumi/pulumi-aws/compare/v6.34.1...v6.35.0)

##### Changelog

- Fix aws.s3.Bucket tag drift detection by
[@&#8203;t0yv0](https://togithub.com/t0yv0) in
[pulumi/pulumi-aws#3910
- Fix empty retry_strategy of Batch JobDefinition causing panics by
[@&#8203;flostadler](https://togithub.com/flostadler) in
[pulumi/pulumi-aws#3921
- Combined dependencies PR by
[@&#8203;pulumi-bot](https://togithub.com/pulumi-bot) in
[pulumi/pulumi-aws#3928
- Bump the go_modules group across 3 directories with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pulumi/pulumi-aws#3894

**Full Changelog**:
pulumi/pulumi-aws@v6.34.1...v6.35.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTYuMSIsInVwZGF0ZWRJblZlciI6IjM3LjM1Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL21pbm9yIl19-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
lumiere-bot bot added a commit to coolguy1771/home-ops that referenced this pull request May 15, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@pulumi/aws](https://pulumi.io)
([source](https://togithub.com/pulumi/pulumi-aws)) | dependencies |
minor | [`6.34.1` ->
`6.35.0`](https://renovatebot.com/diffs/npm/@pulumi%2faws/6.34.1/6.35.0)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>pulumi/pulumi-aws (@&#8203;pulumi/aws)</summary>

###
[`v6.35.0`](https://togithub.com/pulumi/pulumi-aws/releases/tag/v6.35.0)

[Compare
Source](https://togithub.com/pulumi/pulumi-aws/compare/v6.34.1...v6.35.0)

##### Changelog

- Fix aws.s3.Bucket tag drift detection by
[@&#8203;t0yv0](https://togithub.com/t0yv0) in
[pulumi/pulumi-aws#3910
- Fix empty retry_strategy of Batch JobDefinition causing panics by
[@&#8203;flostadler](https://togithub.com/flostadler) in
[pulumi/pulumi-aws#3921
- Combined dependencies PR by
[@&#8203;pulumi-bot](https://togithub.com/pulumi-bot) in
[pulumi/pulumi-aws#3928
- Bump the go_modules group across 3 directories with 2 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[pulumi/pulumi-aws#3894

**Full Changelog**:
pulumi/pulumi-aws@v6.34.1...v6.35.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTYuMSIsInVwZGF0ZWRJblZlciI6IjM3LjM1Ni4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL21pbm9yIl19-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@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.

Bucket(V1): pulumi refresh does not detect tag changes
3 participants