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

DM-22364: Now must explicitly specify where a fake posix datastore exists #35

Merged
merged 2 commits into from Nov 26, 2019

Conversation

timj
Copy link
Member

@timj timj commented Nov 26, 2019

No description provided.

@timj timj requested a review from andy-slac November 26, 2019 16:39
Copy link
Collaborator

@andy-slac andy-slac left a comment

Choose a reason for hiding this comment

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

Looks OK but I have few questions.

"""
args = argparse.Namespace()
args.butler_config = None
args.butler_config = Config()
args.butler_config.configFile = "." # Lie about where the datastore is located
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm against lying in general. Could you rephrase it to something like "configFile must be specified but it does not matter in this case"? Could you specify configFile in a constructor? If empty Config constructor is not useful for cases like this maybe it should be disabled entirely?

Copy link
Member Author

Choose a reason for hiding this comment

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

In this particular case you only want access to registry and don't care where datastore is located. An empty Config to construct a Butler in theory could be fine since defaults are picked up, but in the specific case the default is to use a relocatable datastore configuration so you then have a bit of a chicken and egg problem. I don't think it's the fault of Config that it's not usable to construct a Butler if it's empty.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK to merge.

Now that Butler gets upset if a relocatable config is supplied
without a specific location, we need to say in the test
where we are going to write the datastore, even though
no datastore is being used.
@timj timj merged commit 4d8e854 into master Nov 26, 2019
@timj timj deleted the tickets/DM-22364 branch November 26, 2019 18:41
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.

None yet

2 participants