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 duplicate ancestors on UpstreamSettingsPolicy status #2937

Conversation

kate-osborn
Copy link
Contributor

Proposed changes

Problem: When an UpstreamSettingsPolicy targeted multiple Services, NGF would write duplicate ancestors to its status.

Solution: Only add unique ancestors to policy ancestors list.

Testing: Added unit tests and manually verified that only one ancestor is written to the status.

Closes #2935

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

None

@kate-osborn kate-osborn requested a review from a team as a code owner December 19, 2024 22:14
@github-actions github-actions bot added the bug Something isn't working label Dec 19, 2024
@kate-osborn kate-osborn merged commit 7617e26 into nginx:feature/upstream-settings-policy Dec 20, 2024
37 checks passed
kate-osborn added a commit to kate-osborn/nginx-gateway-fabric that referenced this pull request Dec 20, 2024
Problem: When an UpstreamSettingsPolicy targeted multiple Services, 
NGF would write duplicate ancestors to its status.

Solution: Only add unique ancestors to policy ancestors list.
kate-osborn added a commit that referenced this pull request Dec 20, 2024
Problem: When an UpstreamSettingsPolicy targeted multiple Services, 
NGF would write duplicate ancestors to its status.

Solution: Only add unique ancestors to policy ancestors list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants