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

Enhance SSA ignoreChanges by having better field manager path comparisons #2828

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

rquitales
Copy link
Contributor

Proposed changes

This PR enhances the field manager checks to ensure we do not take control of fields manager by other owners during a Patch Resource update. Previously, our set of managed fields only contains that the child node of a path. We now add the parent fields into the set as well.

Example:

Previously:
Set containing currently managed path(s): .spec.metadata.template.labels
Path we want to check if present in set: .spec.metadata.template

Using set.Has(path) will return false. However, this is not wanted since adding .spec.metadata.template as an ignoreChanges path means we don't care about children fields as well.

Now:
set.Has(path) will now return true, which indicates to our provider that we need to ignore spec.metadata.template

Related issues (optional)

Fixes: #2714

Copy link

Does the PR have any schema changes?

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

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 25.46%. Comparing base (2edaad8) to head (6eee4b5).

Files Patch % Lines
provider/pkg/await/await.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2828      +/-   ##
==========================================
- Coverage   25.48%   25.46%   -0.03%     
==========================================
  Files          48       48              
  Lines        7526     7533       +7     
==========================================
  Hits         1918     1918              
- Misses       5450     5457       +7     
  Partials      158      158              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rquitales rquitales merged commit 53f0563 into master Feb 29, 2024
20 checks passed
@rquitales rquitales deleted the rquitales/fix-patch branch February 29, 2024 18:34
lumiere-bot bot added a commit to coolguy1771/home-ops that referenced this pull request Mar 7, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@pulumi/kubernetes](https://pulumi.com)
([source](https://togithub.com/pulumi/pulumi-kubernetes)) | dependencies
| minor | [`4.8.1` ->
`4.9.0`](https://renovatebot.com/diffs/npm/@pulumi%2fkubernetes/4.8.1/4.9.0)
|

---

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

---

### Release Notes

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

###
[`v4.9.0`](https://togithub.com/pulumi/pulumi-kubernetes/blob/HEAD/CHANGELOG.md#490-March-4-2024)

[Compare
Source](https://togithub.com/pulumi/pulumi-kubernetes/compare/v4.8.1...v4.9.0)

- Fix SSA ignoreChanges by enhancing field manager path comparisons
([pulumi/pulumi-kubernetes#2828)
- Update nodejs SDK dependencies
([pulumi/pulumi-kubernetes#2858,
[pulumi/pulumi-kubernetes#2861)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMjcuMSIsInVwZGF0ZWRJblZlciI6IjM3LjIyNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

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.

DaemonSetPatch taking ownership of fields unexpectedly upon an update operation with ignoreChanges set
2 participants