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 bug from moving credentials into config subdir #1239

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

reidsunderland
Copy link
Member

fixes this problem when you try to use a credential in a config that doesn't have a password/entry in credentials.conf

2024-09-27 13:14:51,421 2023550 [ERROR] sarracenia.config.credentials isValid credential not found
2024-09-27 13:14:51,421 2023550 [CRITICAL] root validate_urlstr bad credential amqp://[email protected]/
Traceback (most recent call last):
  File "/net/local/home/sunderlandr/.local/bin/sr3", line 8, in <module>
    sys.exit(main())
  File "/net/local/home/sunderlandr/sr3/sarracenia/sr.py", line 3089, in main
    gs = sr_GlobalState(cfg, cfg.configurations)
  File "/net/local/home/sunderlandr/sr3/sarracenia/sr.py", line 1324, in __init__
    self._read_configs()
  File "/net/local/home/sunderlandr/sr3/sarracenia/sr.py", line 333, in _read_configs
    cfgbody.parse_file(cfg,c)
  File "/net/local/home/sunderlandr/sr3/sarracenia/config/__init__.py", line 1539, in parse_file
    self.parse_line( component, cfg, cfname, lineno, l.strip() )
  File "/net/local/home/sunderlandr/sr3/sarracenia/config/__init__.py", line 1755, in parse_line
    setattr(self, k, v)
  File "/net/local/home/sunderlandr/sr3/sarracenia/config/__init__.py", line 994, in broker
    ok, cred_details = self.credentials.validate_urlstr(v)
  File "/net/local/home/sunderlandr/sr3/sarracenia/config/credentials.py", line 504, in validate_urlstr
    cred_details = credentials.Credential()
NameError: name 'credentials' is not defined. Did you mean: 'Credential'?

Copy link

Test Results

249 tests   246 ✅  1m 22s ⏱️
  1 suites    1 💤
  1 files      2 ❌

For more details on these failures, see this check.

Results for commit 7ec0bac.

@petersilva petersilva merged commit 0a13250 into development Sep 27, 2024
27 of 59 checks passed
@reidsunderland reidsunderland deleted the issue35_bugfix_config_refactor branch November 20, 2024 18:28
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