-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bugfix 221 empty password #222
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rd is missing. This allows cloud-users to continue without a password.
…ord. If the username is missing, continue to log an error and raise a NameError. However, if the password is missing, log a warning and continue, to support cloud-based instances.
I successfully tested the new code. |
TatianaBurek
reviewed
Aug 7, 2023
METdbLoad/ush/read_load_xml.py
Outdated
raise NameError("Missing required user or password tag or both") | ||
|
||
if not self.connection['db_user']: | ||
logging.warning("!!! XML expecting user and password tags") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The warning message still contains word "password"
that is strange, I see this in the repo:
4c1ca2f
Updated the warning message and verified that the error check for password is not present in a "fresh" checkout. Re-committed.
I'll try re-committing and see if that works.
---------------
Minna Win
Pronouns: she/her
National Center for Atmospheric Research
Research Applications Lab
Developmental Testbed Center
Phone: 303-497-8423
Fax: 303-497-8401
---------------
…On Mon, Aug 7, 2023 at 12:28 PM Tatiana Burek ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In METdbLoad/ush/read_load_xml.py
<#222 (comment)>:
> @@ -239,10 +239,10 @@ def read_db_connect(self, root):
root.xpath('connection')[0].xpath('user')[0].text
self.connection['db_password'] = \
root.xpath('connection')[0].xpath('password')[0].text
- if ((not self.connection['db_user']) or
- (not self.connection['db_password'])):
- logging.error("!!! XML must include user and password tags")
- raise NameError("Missing required user or password tag or both")
+
+ if not self.connection['db_user']:
+ logging.warning("!!! XML expecting user and password tags")
The warning message still contains word "password"
—
Reply to this email directly, view it on GitHub
<#222 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4UJHSYFZUDOXJYWWZZQ7TXUEXU5ANCNFSM6AAAAAA3HI6L5A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
23 tasks
TatianaBurek
approved these changes
Aug 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Testing
Passes the Github workflow tests for METreformat, which use the code (but not the db loading aspect)
testing done on code in the bugfix_221_empty_password branch
Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
verify this works on an AWS instance using the bugfix_221_empty_password branch
Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? [NA]
Do these changes include sufficient testing updates? [NA]
Will this PR result in changes to the test suite? [No]
If yes, describe the new output and/or changes to the existing output:
Please complete this pull request review by At earliest convenience, since this is a blocker.
Pull Request Checklist
See the METplus Workflow for details.
Select: Reviewer(s)
Select: Organization level software support Project or Repository level development cycle Project
Select: Milestone as the version that will include these changes