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

Change secrets Replace to modify the ID #1532

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Jun 28, 2023

We decided that podman secret create --replace should match behaviour of podman container create --replace, so the ID should change.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhatdan

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

@ashley-cui
Copy link
Member

Angry linter but otherwise LGTM

@ashley-cui
Copy link
Member

/lgtm
/hold

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Let's stick to the 2 LGTM rule please. No need to rush things through so close to a release.

@vrothberg
Copy link
Member

Test isn't happy yet

--- FAIL: TestAddSecretAndLookupData (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0x5c8263]
goroutine 19 [running]:
testing.tRunner.func1.2({0x5f11c0, 0x7cc170})
/usr/lib/golang/src/testing/testing.go:1526 +0x24e
testing.tRunner.func1()
/usr/lib/golang/src/testing/testing.go:1529 +0x39f
panic({0x5f11c0, 0x7cc170})
/usr/lib/golang/src/runtime/panic.go:884 +0x213
github.com/containers/common/pkg/secrets.(*SecretsManager).Store(0xc00014c2a0, {0x6278e6, 0x8}, {0xc00012e838, 0x6, 0x6}, {0x6269c5, 0x4}, {0xc00011d740, 0xc00011d7a0, ...})
/var/tmp/go/src/github.com/containers/common/pkg/secrets/secrets.go:209 +0x363
github.com/containers/common/pkg/secrets.TestAddSecretAndLookupData(0xc000103380)
/var/tmp/go/src/github.com/containers/common/pkg/secrets/secrets_test.go:47 +0x24e
testing.tRunner(0xc000103380, 0x6528e8)
/usr/lib/golang/src/testing/testing.go:1576 +0x10b
created by testing.(*T).Run
/usr/lib/golang/src/testing/testing.go:1629 +0x3ea

We decided that podman secret create --replace should match behaviour
of podman container create --replace, so the ID should change.

Signed-off-by: Daniel J Walsh <[email protected]>
@rhatdan
Copy link
Member Author

rhatdan commented Jun 29, 2023

@vrothberg PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Code LGTM

Can we rename Replace to Update?

@ashley-cui
Copy link
Member

I think in this case it's replace, where the ID is modified. If the secret ID is not modified, then update is the correct verbiage.

@ashley-cui
Copy link
Member

LGTM for replace, we can look at update in a separate patch if needed later on.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jun 29, 2023
@rhatdan
Copy link
Member Author

rhatdan commented Jun 29, 2023

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit df1c936 into containers:main Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants