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

feat: implement CreateSecret and DeleteSecret operations #35

Merged

Conversation

michaelsauter
Copy link
Contributor

Closes #33.

I need this for the E2E tests of the External Secrets operator. My change is as minimal as possible, without touching e.g. TestSecret, though this may benefit from refactoring now that secrets can be created programmatically.

@michaelsauter
Copy link
Contributor Author

FYI I added 7fc6b7d to make the tests pass as a whole. Otherwise each test needs to run in isolation and requires cleanup in the vault. Let me know if you are fine with this direction or would like to go a different route.

@michaelsauter
Copy link
Contributor Author

@andrii-zakurenyi @sheldonhull How can I help move this forward?

vault/secret.go Outdated Show resolved Hide resolved
vault/secret.go Outdated Show resolved Hide resolved
@andrii-zakurenyi andrii-zakurenyi changed the title Implement CreateSecret and DeleteSecret operations feat: Implement CreateSecret and DeleteSecret operations Jun 19, 2023
@andrii-zakurenyi andrii-zakurenyi changed the title feat: Implement CreateSecret and DeleteSecret operations feat: implement CreateSecret and DeleteSecret operations Jun 19, 2023
@andrii-zakurenyi
Copy link
Contributor

LGTM 👍
@sheldonhull please review and help with merging this change

Copy link
Contributor

@sheldonhull sheldonhull left a comment

Choose a reason for hiding this comment

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

  • Please update from main as I pushed an update to add integration tags to the files as they integrate with the target dsv server and aren't purely local.
  • run trunk fmt and push (devcontainer included in project that sets that up automatically if you want). I tried to push those through but forgot it was a PR from a fork 😆
  • This won't tag a release, as this requires a change entry (we use changie), but I'll be glad to do that after merging to main so you don't have to do it.

vault/secret.go Outdated Show resolved Hide resolved
vault/secret.go Outdated Show resolved Hide resolved
vault/secret.go Outdated Show resolved Hide resolved
vault/secret_test.go Outdated Show resolved Hide resolved
vault/secret_test.go Outdated Show resolved Hide resolved
@michaelsauter michaelsauter force-pushed the feature/create-delete-endpoint branch from fd6a2a9 to 42cddf3 Compare June 21, 2023 08:19
@michaelsauter
Copy link
Contributor Author

  • Please update from main as I pushed an update to add integration tags to the files as they integrate with the target dsv server and aren't purely local.
  • run trunk fmt and push (devcontainer included in project that sets that up automatically if you want). I tried to push those through but forgot it was a PR from a fork 😆
  • This won't tag a release, as this requires a change entry (we use changie), but I'll be glad to do that after merging to main so you don't have to do it.

Sounds good. I updated this PR accordingly.

@andrii-zakurenyi
Copy link
Contributor

LGTM 👍

@michaelsauter michaelsauter force-pushed the feature/create-delete-endpoint branch from ab1d8e8 to 42cddf3 Compare June 23, 2023 06:07
@sheldonhull sheldonhull enabled auto-merge (squash) June 23, 2023 06:59
@sheldonhull
Copy link
Contributor

I have to fix the test so might need one more update from main after I do this. Pretty sure it’s just a CI issue not a test failure. Cheers

@sheldonhull
Copy link
Contributor

Haven’t forgotten about this. Thanks for your patience 🙏

@sheldonhull
Copy link
Contributor

Ok, since this won't trigger the release, I'm going to merge since the test is passing now. The test failure originally was due to upstream github action changing. It's now pinned to prevent that.

We test with go 1.20.3 (see .aqua/aqua.yaml for the go version setup in tests.
The failing lint conditions were the init I mentioned before. This can be changed apart from the PR to avoid blocking it.
The other was usage of rand not aligning with gosec for security.
Since this is used for tests, it's ok to bypass and we can update the .golangci-lint.yaml file to exclude that if needed in the future.

@michaelsauter thanks for your contribution, it's really appreciated. Thanks also for your patience 👍🏻

@sheldonhull sheldonhull merged commit 6f30855 into DelineaXPM:main Jun 26, 2023
3 of 6 checks passed
@michaelsauter
Copy link
Contributor Author

Thanks!

Do you have an estimate when you will be able to cut a release? And is there anything I can help with to make it happen? Asking because I want to move external-secrets/external-secrets#2415 forward :)

@michaelsauter michaelsauter deleted the feature/create-delete-endpoint branch June 27, 2023 06:57
@sheldonhull
Copy link
Contributor

Thanks!

Do you have an estimate when you will be able to cut a release? And is there anything I can help with to make it happen? Asking because I want to move external-secrets/external-secrets#2415 forward :)

just knocked it out: release. Cheers.

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

Successfully merging this pull request may close these issues.

Create / Delete secret is not supported
3 participants