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

ccl/cliccl: avoid opening Engine in debug encryption-decrypt #120547

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

jbowens
Copy link
Collaborator

@jbowens jbowens commented Mar 15, 2024

Adapt the debug encryption-decrypt command to avoid actually opening the Engine and instead only open the filesystem environment. This allows the command to be used even when missing or corrupt files prevent the Engine from being opened.

Epic: none
Fix #96699.
Release note: none

@jbowens jbowens requested review from a team and sumeerbhola March 15, 2024 14:48
@jbowens jbowens requested review from a team as code owners March 15, 2024 14:48
Copy link

blathers-crl bot commented Mar 15, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jbowens jbowens force-pushed the encryption-decrypt branch 3 times, most recently from 17d87b8 to 0b20a38 Compare March 15, 2024 15:22
Adapt the `debug encryption-decrypt` command to avoid actually opening the
Engine and instead only open the filesystem environment. This allows the
command to be used even when missing or corrupt files prevent the Engine from
being opened.

Epic: none
Fix cockroachdb#96699.
Release note: none
Copy link
Collaborator Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @sumeerbhola)


pkg/ccl/cliccl/ear_test.go line 163 at r1 (raw file):

		cmd.SetOut(&b)
		cmd.SetErr(&b)
		require.NoError(t, cmd.Flags().Set("enterprise-encryption", encSpecStr))

I'm really perplexed as to how this test ever passed without this?

Copy link
Collaborator Author

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @sumeerbhola)


pkg/ccl/cliccl/ear_test.go line 163 at r1 (raw file):

Previously, jbowens (Jackson Owens) wrote…

I'm really perplexed as to how this test ever passed without this?

Ah, right, the file registry is not encrypted. I think this is a fine additional restriction to require the --enterprise-encryption flag, but lemme know your thoughts

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @jbowens)


pkg/ccl/cliccl/ear_test.go line 163 at r1 (raw file):

Previously, jbowens (Jackson Owens) wrote…

Ah, right, the file registry is not encrypted. I think this is a fine additional restriction to require the --enterprise-encryption flag, but lemme know your thoughts

I don't really have an opinion

@jbowens
Copy link
Collaborator Author

jbowens commented Mar 15, 2024

TFTR!

bors r=sumeerbhola

@craig
Copy link
Contributor

craig bot commented Mar 15, 2024

@craig craig bot merged commit 1a6e93c into cockroachdb:master Mar 15, 2024
22 checks passed
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.

cli: allow debug encryption-decrypt command to ignore missing files
3 participants