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 unreleased bugs with labels_include_any feature #23734

Merged
merged 5 commits into from
Nov 14, 2024

Conversation

gillespi314
Copy link
Contributor

@gillespi314 gillespi314 commented Nov 12, 2024

Issue #23539

Checklist for submitter

If some of the following don't apply, delete the relevant line.

  • Added/updated tests
  • Manual QA for all new/changed functionality

@gillespi314 gillespi314 changed the base branch from main to feat-include-any-label November 12, 2024 18:01
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (feat-include-any-label@aed3c3f). Learn more about missing BASE report.

Additional details and impacted files
@@                    Coverage Diff                    @@
##             feat-include-any-label   #23734   +/-   ##
=========================================================
  Coverage                          ?   63.10%           
=========================================================
  Files                             ?     1556           
  Lines                             ?   147306           
  Branches                          ?     3724           
=========================================================
  Hits                              ?    92963           
  Misses                            ?    46979           
  Partials                          ?     7364           
Flag Coverage Δ
frontend 52.39% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Comment on lines +1012 to +1013
// FIXME: At what point are we deleting all labels for a profile (e.g., the user might
// remove all labels from an existing profile)?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is another released bug that I found while testing. In the interest of keeping this feature branch moving, I'll file a separate bug ticket for this issue.

Comment on lines +535 to +539
// FIXME: equivalent of no label condition, should clear all labels slice?
// p.Labels = nil
// p.LabelsIncludeAll = nil
// p.LabelsIncludeAny = nil
// p.LabelsExcludeAny = nil
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is another released bug found while testing. In the interest of keeping this feature branch moving, I'll file a separate bug ticket for this issue.

Comment on lines +1870 to +1871
// FIXME: At what point are we deleting label associations for existing profiles (e.g. if the user
// removes all labels from a profile in gitops, shouldn't we remove the old associations)?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is another released bug found while testing. In the interest of keeping this feature branch moving, I'll file a separate bug ticket for this issue.

@@ -333,6 +368,67 @@ func TestMDMProfileSpecUnmarshalJSON(t *testing.T) {
require.Equal(t, "oldpath", p.Path)
require.Empty(t, p.Labels)
})

t.Run("changing labels", func(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a released bug found during testing. I opted to fix this one, but there are a few others that I'm planning to file as separate issues to keep this feature branch moving forward.

@gillespi314 gillespi314 marked this pull request as ready for review November 13, 2024 22:18
@gillespi314 gillespi314 requested review from a team as code owners November 13, 2024 22:18
@gillespi314 gillespi314 merged commit 16d0d8d into feat-include-any-label Nov 14, 2024
21 of 23 checks passed
@gillespi314 gillespi314 deleted the sg-labels-include-any-integration branch November 14, 2024 14:30
@gillespi314
Copy link
Contributor Author

Failing test is unrelated and known to be flaky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants