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

fix(kvstoreentry/create): rework --dir #1371

Merged
merged 2 commits into from
Jan 24, 2025
Merged

fix(kvstoreentry/create): rework --dir #1371

merged 2 commits into from
Jan 24, 2025

Conversation

fgsch
Copy link
Member

@fgsch fgsch commented Jan 16, 2025

Simplify code and exclude directory when inserting keys into the KV store.

Before this change create --dir=foo, will create:

foo/abc
foo/def

After this change:

abc
def

@kpfleming
Copy link
Contributor

Ouch... the existing behavior was definitely broken. Thanks for fixing it! Thankfully the other 'entry' commands (config store, secret store) don't offer the --dir option so they don't have this problem.

Would you be willing to tackle improving the tests for this command to ensure that the behavior is correct? A proper test would have caught this originally, it would be great to have a way to avoid regressions.

@fgsch
Copy link
Member Author

fgsch commented Jan 16, 2025

Would you be willing to tackle improving the tests for this command to ensure that the behavior is correct? A proper test would have caught this originally, it would be great to have a way to avoid regressions.

Sure, I will have a look.

@fgsch
Copy link
Member Author

fgsch commented Jan 17, 2025

Would you be willing to tackle improving the tests for this command to ensure that the behavior is correct? A proper test would have caught this originally, it would be great to have a way to avoid regressions.

Sure, I will have a look.

Done. Not sure why the tests are failing. I need to have another look, but at first glance these looked unrelated.

@Integralist
Copy link
Collaborator

Not sure why the tests are failing.

FWIW the full test suite (running from this branch) passes for me locally.

So yeah, the fact CI is failing is weird.

@fgsch
Copy link
Member Author

fgsch commented Jan 17, 2025

I opened #1372 to test (it changes whitespace in a single file) and I'm getting the same errors so it looks like something is up with the CI / tests.

@kpfleming
Copy link
Contributor

I've never seen that test failure before, and the only recent change I can think of is that ubuntu-latest became Ubuntu 24.04 last week. I'll open a PR to use ubuntu-22.04 instead and see if the CI passes.

@kpfleming
Copy link
Contributor

Same failure with Ubuntu 22.04. This will require some investigation next week.

@kpfleming
Copy link
Contributor

Test suite in 'main' passes locally using Go 1.23.4 and Rust 1.83.0. Very strange.

fgsch added 2 commits January 23, 2025 16:57
Simplify code and exclude directory when inserting keys into the KV store.
Before this change `create --dir=foo`, will create:

	foo/abc
	foo/def

After this change:

	abc
	def
@fgsch fgsch force-pushed the fgsch/rework--dir branch from e16105d to 6a76e65 Compare January 23, 2025 16:57
@fgsch
Copy link
Member Author

fgsch commented Jan 24, 2025

I've updated this branch and the tests are passing now. PTAL.

@kpfleming kpfleming merged commit 8debc71 into main Jan 24, 2025
9 checks passed
@kpfleming kpfleming deleted the fgsch/rework--dir branch January 24, 2025 16:41
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.

3 participants