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 small bug in ns-registry auto creation #75

Merged

Conversation

jhiemstrawisc
Copy link
Member

@jhiemstrawisc jhiemstrawisc commented Aug 31, 2023

We talked this morning about config variables that specify "Location" and how they should specify the actual filename. I had previously tried to implement some logic that if a file location was passed such as /foo/bar/, the namespace registry would auto create the registry database as /foo/bar/ns-registry.sqlite. Instead of fixing the bug in that logic, let's just say whatever is passed should be considered the file name. A side effect of this is that if the user configures NSRegistryLocation = /foo/bar/, the file will be created as /foo/bar/.sqlite because the code automatically adds a file extension when none is provided and in this case, the actual filename is empty.

This fixes #67

@jhiemstrawisc jhiemstrawisc requested a review from bbockelm August 31, 2023 14:51
Copy link
Collaborator

@bbockelm bbockelm left a comment

Choose a reason for hiding this comment

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

I don't particularly love the "magic addition of the .sqlite extension" here. If the user wants to call it foo, it should be foo -- don't surprise them with foo.sqlite.

That said, my gripe isn't part of this PR... so approving. Just wanted to share the "philosophy" here for the future.

@bbockelm bbockelm merged commit 11c2303 into PelicanPlatform:main Sep 1, 2023
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.

Auto-create the NS registry database
2 participants