Skip to content

Conversation

@rexagod
Copy link
Member

@rexagod rexagod commented Dec 17, 2024

Until now, CMO did not reconcile existing secrets, even if their data changed. This changes that behavior.

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 17, 2024
@openshift-ci-robot
Copy link
Contributor

@rexagod: This pull request references Jira Issue OCPBUGS-45895, which is invalid:

  • expected the bug to target the "4.19.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Until now, CMO did not reconcile existing secrets, even if their data changed. This changes that behavior.

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2024
@rexagod
Copy link
Member Author

rexagod commented Dec 17, 2024

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Dec 17, 2024
@openshift-ci-robot
Copy link
Contributor

@rexagod: This pull request references Jira Issue OCPBUGS-45895, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rexagod
Copy link
Member Author

rexagod commented Jan 13, 2025

I'm currently having some problems with make versions generate on MacOS. I'll rebase for the time being.

@rexagod
Copy link
Member Author

rexagod commented Jan 20, 2025

/retest-required

Copy link
Contributor

@machine424 machine424 left a comment

Choose a reason for hiding this comment

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

thanks for the test, some suggestions.

@juzhao
Copy link
Contributor

juzhao commented Feb 5, 2025

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Feb 5, 2025
@openshift-ci-robot
Copy link
Contributor

@rexagod: This pull request references Jira Issue OCPBUGS-45895, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.19.0) matches configured target version for branch (4.19.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @juzhao

In response to this:

Until now, CMO did not reconcile existing secrets, even if their data changed. This changes that behavior.

  • I added CHANGELOG entry for this change.
  • No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rexagod

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rexagod rexagod force-pushed the OCPBUGS-45895 branch 5 times, most recently from 34754e6 to b088579 Compare March 19, 2025 09:00
@rexagod
Copy link
Member Author

rexagod commented Mar 20, 2025

okd-scos-e2e-aws-ovn errors are unrelated, so this is good for reviews.

Copy link
Contributor

@machine424 machine424 left a comment

Choose a reason for hiding this comment

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

Thanks again, we're almost ready to merge this, just some final suggestions

`)
f.MustCreateOrUpdateConfigMap(t, userWorkloadConfigMap)
defer f.MustDeleteConfigMap(t, userWorkloadConfigMap)
for _, secret := range []types.NamespacedName{
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can just check that len(syncedSecrets)>5 or something to be sure the check isn't no-op?

Copy link
Member Author

Choose a reason for hiding this comment

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

Used a require.NotEmpty(t, syncedSecrets) right after we fill syncedSecrets to ensure it's not empty.

Copy link
Contributor

Choose a reason for hiding this comment

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

then I don't see why this f.AssertSecretExists is needed.

require.NotEmpty(t, syncedSecrets)

// Update the aforementioned secrets' data.
for _, secret := range append(syncedSecrets, unsyncedSecrets...) {
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can just have secrets instead of syncedSecrets with all the secrets and only do the skipping below.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure what this means, could you please elaborate a bit? There's no secrets IIUC but only syncedSecrets and unsyncedSecrets.

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant we can only have secrets with all secrets and loop over them only once and then use the slices.Contains check to see whether we want to // Check if the secrets were reconciled as expected. or // Check if the secrets were reconciled unexpectedly.. so we only have one check loop.
(this is a nit, I just find it more readable that way)

@rexagod
Copy link
Member Author

rexagod commented Apr 16, 2025

🤦🏼 So I just noticed I had a patch on local for this that I never pushed, I did that now, and I think some of the review comments are addressed by it. I'll go over them again to make sure I act on them.

@rexagod rexagod force-pushed the OCPBUGS-45895 branch 3 times, most recently from c2589f3 to b5e48bd Compare April 16, 2025 10:18
@rexagod rexagod requested a review from machine424 April 16, 2025 10:23
"k8s.io/apimachinery/pkg/types"
)

func TestSecretsReconciliation(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

let's add a short comment about the overall logic in the test

func TestSecretsReconciliation(t *testing.T) {
// Create assets under both scenarios for us to work with.
setupUserWorkloadAssetsWithTeardownHook(t, f)
userWorkloadConfigMap := f.BuildUserWorkloadConfigMap(t, `alertmanager:
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch, I think this config should make CMO produce all/most of the secrets.

@rexagod
Copy link
Member Author

rexagod commented Apr 17, 2025

Need to test this out on a cluster, will request a review once that's green.

@rexagod
Copy link
Member Author

rexagod commented Apr 17, 2025

/retest

1 similar comment
@juzhao
Copy link
Contributor

juzhao commented Apr 22, 2025

/retest

@machine424
Copy link
Contributor

/retest-required

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2025
@rexagod
Copy link
Member Author

rexagod commented May 6, 2025

This needs to be updated a bit, will request a review once I clean this up.

Until now, CMO did not reconcile existing secrets, even if their data
changed. This changes that behavior.

Signed-off-by: Pranshu Srivastava <[email protected]>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 21, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 16, 2025

@rexagod: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/generate 1846128 link true /test generate
ci/prow/e2e-agnostic-operator 1846128 link true /test e2e-agnostic-operator
ci/prow/e2e-aws-ovn 1846128 link true /test e2e-aws-ovn
ci/prow/ginkgo-tests 1846128 link true /test ginkgo-tests

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 16, 2025
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants