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

Allow upgrading unmanaged local DBs #116

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

glatterf42
Copy link
Member

As noticed by @meksor, it would be good to allow initializing locals DBs. Currently, this is only possible for managed DBs. This PR also allows upgrading/initializing unmanaged local DBs. Though please check: settings.manager_url and settings.secret_hs256 have default versions, so we could also write:

    utils.echo(
        f"Establishing self-signed admin connection to '{settings.manager_url}'."
    )
    manager_conf = ManagerConfig(
        str(settings.manager_url),
        SelfSignedAuth(settings.secret_hs256),
        remote=False,
    )
    platform_list = manager_conf.list_platforms() if settings.managed else settings.toml.list_platforms()

which might safe us from writing a test to cover these lines specifically, but introduces slight overhead costs for running ManagerConfig().__init__ even for unmanaged instances. Not sure which is preferable here.

@glatterf42 glatterf42 added the enhancement New feature or request label Oct 1, 2024
@glatterf42 glatterf42 requested a review from meksor October 1, 2024 13:07
@glatterf42 glatterf42 self-assigned this Oct 1, 2024
@glatterf42 glatterf42 marked this pull request as ready for review October 1, 2024 13:07
Copy link
Contributor

@meksor meksor left a comment

Choose a reason for hiding this comment

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

I think this is good as it is, thanks!

@glatterf42 glatterf42 merged commit 4b0e421 into main Oct 1, 2024
10 checks passed
@glatterf42 glatterf42 deleted the enh/upgrade-local-dbs-cli branch October 1, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants