Skip to content

[release-4.12] OCPBUGS-3837: fix service account token secret reference (#2862)#412

Merged
openshift-merge-robot merged 1 commit intoopenshift:release-4.12from
openshift-cherrypick-robot:cherry-pick-396-to-release-4.12
Nov 18, 2022
Merged

[release-4.12] OCPBUGS-3837: fix service account token secret reference (#2862)#412
openshift-merge-robot merged 1 commit intoopenshift:release-4.12from
openshift-cherrypick-robot:cherry-pick-396-to-release-4.12

Conversation

@openshift-cherrypick-robot
Copy link
Copy Markdown

This is an automated cherry-pick of #396

/assign awgreene

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-robot
Copy link
Copy Markdown

@openshift-cherrypick-robot: Jira Issue OCPBUGS-1428 has been cloned as Jira Issue OCPBUGS-3837. Retitling PR to link against new bug.
/retitle [release-4.12] OCPBUGS-3837: fix service account token secret reference (#2862)

Details

In response to this:

This is an automated cherry-pick of #396

/assign awgreene

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 openshift-ci Bot changed the title [release-4.12] OCPBUGS-1428: fix service account token secret reference (#2862) [release-4.12] OCPBUGS-3837: fix service account token secret reference (#2862) Nov 17, 2022
@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 17, 2022
@openshift-ci-robot
Copy link
Copy Markdown

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

6 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.12.0) matches configured target version for branch (4.12.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • dependent bug Jira Issue OCPBUGS-1428 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-1428 targets the "4.13.0" version, which is one of the valid target versions: 4.13.0
  • bug has dependents

Requesting review from QA contact:
/cc @jianzhangbjz

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

Details

In response to this:

This is an automated cherry-pick of #396

/assign awgreene

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 openshift-ci Bot requested a review from jianzhangbjz November 17, 2022 16:22
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 17, 2022

@openshift-cherrypick-robot: No Bugzilla bug is referenced in the title of this pull request.
To reference a bug, add 'Bug XXX:' to the title of this pull request and request another bug refresh with /bugzilla refresh.

Retaining the bugzilla/valid-bug label as it was manually added.

Details

In response to this:

[release-4.12] OCPBUGS-3837: fix service account token secret reference (#2862)

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

/retest

@awgreene
Copy link
Copy Markdown
Contributor

/approve

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 18, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: awgreene, openshift-cherrypick-robot

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:

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 18, 2022
@ankitathomas
Copy link
Copy Markdown
Contributor

/lgtm

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

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 18, 2022

@openshift-cherrypick-robot: 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 e9792f6 into openshift:release-4.12 Nov 18, 2022
@openshift-ci-robot
Copy link
Copy Markdown

@openshift-cherrypick-robot: All pull requests linked via external trackers have merged:

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

Details

In response to this:

This is an automated cherry-pick of #396

/assign awgreene

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

/cherry-pick release-4.11

@openshift-cherrypick-robot
Copy link
Copy Markdown
Author

@awgreene: new pull request created: #416

Details

In response to this:

/cherry-pick release-4.11

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

awgreene commented Dec 2, 2022

/cherry-pick release-4.11

@openshift-cherrypick-robot
Copy link
Copy Markdown
Author

@awgreene: new pull request could not be created: failed to create pull request against openshift/operator-framework-olm#release-4.11 from head openshift-cherrypick-robot:cherry-pick-412-to-release-4.11: status code 422 not one of [201], body: {"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for openshift-cherrypick-robot:cherry-pick-412-to-release-4.11."}],"documentation_url":"https://docs.github.com/rest/reference/pulls#create-a-pull-request"}

Details

In response to this:

/cherry-pick release-4.11

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
Upstream-repository: api
Upstream-commit: 4107e571675fccb2336cc13a43dd382fc1dab867
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants