Skip to content

feat: dbc auth license install#352

Merged
amoeba merged 5 commits intocolumnar-tech:mainfrom
amoeba:amoeba/install-local-license
Apr 15, 2026
Merged

feat: dbc auth license install#352
amoeba merged 5 commits intocolumnar-tech:mainfrom
amoeba:amoeba/install-local-license

Conversation

@amoeba
Copy link
Copy Markdown
Member

@amoeba amoeba commented Apr 10, 2026

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 install sub-subcommand to handle this. I tucked it under dbc auth.

@amoeba
Copy link
Copy Markdown
Member Author

amoeba commented Apr 10, 2026

(I still need to review this with fresh eyes tomorrow)

amoeba and others added 2 commits April 9, 2026 17:56
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>
Comment thread auth/credentials.go Outdated
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
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah that's fine. Simplified in b7d1d65.

Copy link
Copy Markdown
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

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

Looks good to me, anything else to make it ready for review rather than just a draft?

@amoeba amoeba marked this pull request as ready for review April 15, 2026 23:15
@amoeba
Copy link
Copy Markdown
Member Author

amoeba commented Apr 15, 2026

That's it. Thanks for the review, I'll merge this.

@amoeba amoeba merged commit 50baa27 into columnar-tech:main Apr 15, 2026
12 checks passed
@amoeba
Copy link
Copy Markdown
Member Author

amoeba commented Apr 15, 2026

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.
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.

2 participants