feat: dbc auth license install#352
Merged
amoeba merged 5 commits intocolumnar-tech:mainfrom Apr 15, 2026
Merged
Conversation
Member
Author
|
(I still need to review this with fresh eyes tomorrow) |
System-level tests run under sudo in CI, so root bypasses Unix file permissions. Skip the unreadable/unwritable tests at ConfigSystem using the project's parameterized test level pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zeroshade
reviewed
Apr 15, 2026
Comment on lines
+276
to
+284
| src, err := os.Open(srcPath) | ||
| if err != nil { | ||
| return fmt.Errorf("failed to read license file: %w", err) | ||
| } | ||
| defer src.Close() | ||
|
|
||
| if !force && filepath.Base(srcPath) != "columnar.lic" { | ||
| return ErrLicenseWrongFilename | ||
| } |
Member
There was a problem hiding this comment.
Couldn't we just use os.ReadFile and os.WriteFile? Seems like it would be simpler.
Something along the line of:
destPath := LicensePath()
if !force {
// check with os.Stat
}
// os.MkdirAll....
src, err := os.ReadFile(srcPath)
if err != nil {
return err
}
return os.WriteFile(destPath, src, 0o700)
zeroshade
approved these changes
Apr 15, 2026
Member
zeroshade
left a comment
There was a problem hiding this comment.
Looks good to me, anything else to make it ready for review rather than just a draft?
Member
Author
|
That's it. Thanks for the review, I'll merge this. |
Member
Author
|
I should have pulled the docs changes out into a separate PR so we can update the docs separately so I filed a PR to revert those: #358. |
amoeba
added a commit
that referenced
this pull request
Apr 16, 2026
I should have pulled the docs change in #352 out into a separate PR so we can merge just the docs changes once the next version of dbc is released. This PR reverts just the docs changes in that PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think we could make the steps in https://docs.columnar.tech/dbc/guides/private_drivers/#downloading-your-license even simpler if dbc handled putting your license in the right place for the user. This PR is a proposal for adding a
dbc auth license installsub-subcommand to handle this. I tucked it underdbc auth.