Skip to content

OCPBUGS-1428: fix service account token secret reference (#2862)#396

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
awgreene:ocpbugs-1428
Nov 17, 2022
Merged

OCPBUGS-1428: fix service account token secret reference (#2862)#396
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
awgreene:ocpbugs-1428

Conversation

@awgreene
Copy link
Copy Markdown
Contributor

Problem: The filterSecretsBySAName function attempts to identify all service account token secrets related to a serviceAccount. To do so, the filterSecretsBySAName function uses a range-for loop to iterate over entries in the secrets argument. If a valid service account token secret is found, a pointer to the range-for loop's value variable is added to a map of results. Unfortunately, if a valid entry is found in the middle of the list of secrets, the value returned by the range-for loop is updated, causes the entry in the map to change.

Solution: Add a pointer to the actual secret instead of the range-for loop's value variable.

Signed-off-by: Alexander Greene greene.al1991@gmail.com

Upstream-repository: operator-lifecycle-manager
Upstream-commit: caab6c52ec532dc82c7178eebb0377bd80d1e82a

Problem: The filterSecretsBySAName function attempts to identify all
service account token secrets related to a serviceAccount. To do so,
the filterSecretsBySAName function uses a range-for loop to iterate
over entries in the secrets argument. If a valid service account token
secret is found, a pointer to the range-for loop's value variable is
added to a map of results. Unfortunately, if a valid entry is found in
the middle of the list of secrets, the value returned by the range-for
loop is updated, causes the entry in the map to change.

Solution: Add a pointer to the actual secret instead of the range-for
loop's value variable.

Signed-off-by: Alexander Greene <greene.al1991@gmail.com>

Upstream-repository: operator-lifecycle-manager
Upstream-commit: caab6c52ec532dc82c7178eebb0377bd80d1e82a
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 30, 2022
@awgreene awgreene changed the title (bug) Fix service account token secret reference (#2862) OCPBUGS-1428: fix service account token secret reference (#2862) Sep 30, 2022
@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Sep 30, 2022
@openshift-ci-robot
Copy link
Copy Markdown

@awgreene: This pull request references Jira Issue OCPBUGS-1428, which is invalid:

  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead

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.

Details

In response to this:

Problem: The filterSecretsBySAName function attempts to identify all service account token secrets related to a serviceAccount. To do so, the filterSecretsBySAName function uses a range-for loop to iterate over entries in the secrets argument. If a valid service account token secret is found, a pointer to the range-for loop's value variable is added to a map of results. Unfortunately, if a valid entry is found in the middle of the list of secrets, the value returned by the range-for loop is updated, causes the entry in the map to change.

Solution: Add a pointer to the actual secret instead of the range-for loop's value variable.

Signed-off-by: Alexander Greene greene.al1991@gmail.com

Upstream-repository: operator-lifecycle-manager
Upstream-commit: caab6c52ec532dc82c7178eebb0377bd80d1e82a

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/test-infra repository.

@Xia-Zhao-rh
Copy link
Copy Markdown
Contributor

/label qe-approved

@openshift-ci openshift-ci Bot added the qe-approved Signifies that QE has signed off on this PR label Oct 8, 2022
@Xia-Zhao-rh
Copy link
Copy Markdown
Contributor

/retest

3 similar comments
@awgreene
Copy link
Copy Markdown
Contributor Author

/retest

@Xia-Zhao-rh
Copy link
Copy Markdown
Contributor

/retest

@Xia-Zhao-rh
Copy link
Copy Markdown
Contributor

/retest

@jianzhangbjz
Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@jianzhangbjz: This pull request references Jira Issue OCPBUGS-1428, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

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.

Details

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 kubernetes/test-infra repository.

@jianzhangbjz
Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@jianzhangbjz: This pull request references Jira Issue OCPBUGS-1428, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

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.

Details

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 kubernetes/test-infra repository.

@jianzhangbjz
Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@jianzhangbjz: This pull request references Jira Issue OCPBUGS-1428, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

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.

Details

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 kubernetes/test-infra repository.

@jianzhangbjz
Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@jianzhangbjz: This pull request references Jira Issue OCPBUGS-1428, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

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.

Details

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 kubernetes/test-infra repository.

@jianzhangbjz
Copy link
Copy Markdown
Contributor

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@jianzhangbjz: This pull request references Jira Issue OCPBUGS-1428, which is invalid:

  • expected the bug to target the "4.13.0" version, but it targets "4.12.0" instead

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.

Details

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 kubernetes/test-infra repository.

@jianzhangbjz
Copy link
Copy Markdown
Contributor

/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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Nov 2, 2022
@openshift-ci-robot
Copy link
Copy Markdown

@jianzhangbjz: This pull request references Jira Issue OCPBUGS-1428, which is valid.

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

Requesting review from QA contact:
/cc @Xia-Zhao-rh

Details

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 kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot removed the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Nov 2, 2022
@openshift-ci openshift-ci Bot requested a review from Xia-Zhao-rh November 2, 2022 03:14
@awgreene
Copy link
Copy Markdown
Contributor Author

awgreene commented Nov 4, 2022

/retest

@Xia-Zhao-rh
Copy link
Copy Markdown
Contributor

/retest

1 similar comment
@awgreene
Copy link
Copy Markdown
Contributor Author

/retest

@awgreene
Copy link
Copy Markdown
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Copy Markdown

@awgreene: This pull request references Jira Issue OCPBUGS-1428, which is valid.

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

Requesting review from QA contact:
/cc @Xia-Zhao-rh

Details

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 kubernetes/test-infra repository.

@oceanc80
Copy link
Copy Markdown
Contributor

/lgtm

Copy link
Copy Markdown
Contributor

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, dinhxuanvu

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [awgreene,dinhxuanvu]

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

@Xia-Zhao-rh
Copy link
Copy Markdown
Contributor

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 17, 2022

@awgreene: all tests passed!

Full PR test history. Your PR dashboard.

Details

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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 104da7e into openshift:master Nov 17, 2022
@openshift-ci-robot
Copy link
Copy Markdown

@awgreene: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-1428 has been moved to the MODIFIED state.

Details

In response to this:

Problem: The filterSecretsBySAName function attempts to identify all service account token secrets related to a serviceAccount. To do so, the filterSecretsBySAName function uses a range-for loop to iterate over entries in the secrets argument. If a valid service account token secret is found, a pointer to the range-for loop's value variable is added to a map of results. Unfortunately, if a valid entry is found in the middle of the list of secrets, the value returned by the range-for loop is updated, causes the entry in the map to change.

Solution: Add a pointer to the actual secret instead of the range-for loop's value variable.

Signed-off-by: Alexander Greene greene.al1991@gmail.com

Upstream-repository: operator-lifecycle-manager
Upstream-commit: caab6c52ec532dc82c7178eebb0377bd80d1e82a

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/test-infra repository.

@awgreene
Copy link
Copy Markdown
Contributor Author

/cherry-pick release-4.12

@openshift-cherrypick-robot
Copy link
Copy Markdown

@awgreene: new pull request created: #412

Details

In response to this:

/cherry-pick release-4.12

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/test-infra repository.

openshift-bot pushed a commit to openshift-bot/operator-framework-olm that referenced this pull request Mar 15, 2025
)

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.19.4 to 0.20.0.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.19.4...v0.20.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Upstream-repository: api
Upstream-commit: 0879cf09fcb6d753d923363ba032ad70ceabdc1a
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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid 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. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants