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

Client: Run client without configuration file; Fix #6410 #6520

Merged
merged 1 commit into from Apr 8, 2024

Conversation

voetberg
Copy link
Contributor

Changes:
* Change RuntimeError(Config Not Found) to ConfigNotFound Error, config_get correctly handles those and returns a default client config. The RuntimeError was being caught in different places and causing conflict.
* Added typing for baseclient, initialization broken into functions to avoid typing conflicts for optionals, including an error check for the missing config.
* Added test to run multiple client commands without configuration file in place, including func decorator for extended testing if that's desired.

@voetberg voetberg force-pushed the feature-6410-configless_client branch 2 times, most recently from 1e4e862 to 2482b12 Compare February 29, 2024 14:27
@voetberg voetberg force-pushed the feature-6410-configless_client branch 2 times, most recently from 3da2528 to cf7717f Compare March 22, 2024 20:29
@voetberg voetberg force-pushed the feature-6410-configless_client branch from cf7717f to f87b69d Compare March 25, 2024 14:07
    Changes:
                * Change `RuntimeError(Config Not Found)` to `ConfigNotFound`
                  Error, config_get correctly handles those and returns a
    default client config
                * Added typing for baseclient, initialization broken into
                  functions to avoid typing conflicts for optionals.
                * Aded test to run multiple client commands without
                  configuration file in place, include func dectorator for extended testing
@voetberg voetberg force-pushed the feature-6410-configless_client branch from f87b69d to 6ccb841 Compare March 26, 2024 19:33
@rdimaio
Copy link
Contributor

rdimaio commented Mar 26, 2024

I checked the type errors (https://github.com/rucio/rucio/actions/runs/8441860751/job/23121972309?pr=6520) - in my opinion, they can be ignored. Both errors existed before this change (verified on master branch) and they are due to not properly checking if a variable exists before accessing it. They can be fixed later on when type hints are added to those parts of the code.

@voetberg
Copy link
Contributor Author

I checked the type errors (https://github.com/rucio/rucio/actions/runs/8441860751/job/23121972309?pr=6520) - in my opinion, they can be ignored. Both errors existed before this change (verified on master branch) and they are due to not properly checking if a variable exists before accessing it. They can be fixed later on when type hints are added to those parts of the code.

I'm of this opinion too, I was considering fixing them but figured it outside the scope of this PR. Annoying errors, but trying to trace a blame and ending up at this unrelated pr would be more annoying.

@rdimaio
Copy link
Contributor

rdimaio commented Mar 27, 2024

LGTM but I think it's best if someone with more experience on the repository has a look as well

@bari12 bari12 merged commit ab8dfce into rucio:master Apr 8, 2024
26 of 27 checks passed
@bari12 bari12 linked an issue Apr 8, 2024 that may be closed by this pull request
@voetberg voetberg deleted the feature-6410-configless_client branch April 23, 2024 19:33
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.

Using Python client without configuration file
3 participants