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

Password field in loading XML files can be empty #221

Closed
7 of 23 tasks
TatianaBurek opened this issue Aug 7, 2023 · 2 comments · Fixed by #222
Closed
7 of 23 tasks

Password field in loading XML files can be empty #221

TatianaBurek opened this issue Aug 7, 2023 · 2 comments · Fixed by #222
Assignees
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue component: load Tasks related to the database loading priority: blocker Blocker requestor: NOAA/EMC NOAA Environmental Modeling Center type: bug Fix something that is not working

Comments

@TatianaBurek
Copy link
Collaborator

TatianaBurek commented Aug 7, 2023

Describe the Problem

This issue arose via METplus Discussions dtcenter/METplus#2291.

Currently if the password field in loading XML file is empty,

  <user>tatiana.burek</user>
    <password></password>

METdbLoad script throws an error:

if ((not self.connection['db_user']) or

In reality, password field can be empty - example the environment on AWS.
Because of this restriction, users can't load their data to AWS databases.

Recommend that Binbin Zhou and Ho-Chun Huang test and verify this fix.

Expected Behavior

The check the empty password field should be removed

Environment

Describe your runtime environment:
1. Machine: (e.g. HPC name, Linux Workstation, Mac Laptop)
2. OS: (e.g. RedHat Linux, MacOS)
3. Software version number(s)

To Reproduce

Describe the steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
Post relevant sample data following these instructions:
https://dtcenter.org/community-code/model-evaluation-tools-met/met-help-desk#ftp

Relevant Deadlines

Needs to be fixed, included in a 2.1.1 bugfix release, and redeployed on NOAA AWS no later than August 29, 2023.
This is critical for NOAA AQM plotting.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Organization level Project for support of the current coordinated release
  • Select Repository level Project for development toward the next official release or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next bugfix version

Define Related Issue(s)

Consider the impact to the other METplus components.

Bugfix Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of main_<Version>.
    Branch name: bugfix_<Issue Number>_main_<Version>_<Description>
  • Fix the bug and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Add any new Python packages to the METplus Components Python Requirements table.
  • Push local changes to GitHub.
  • Submit a pull request to merge into main_<Version>.
    Pull request: bugfix <Issue Number> main_<Version> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Organization level software support Project for the current coordinated release
    Select: Milestone as the next bugfix version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Complete the steps above to fix the bug on the develop branch.
    Branch name: bugfix_<Issue Number>_develop_<Description>
    Pull request: bugfix <Issue Number> develop <Description>
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Close this issue.
@TatianaBurek TatianaBurek added alert: NEED ACCOUNT KEY Need to assign an account key to this issue component: load Tasks related to the database loading priority: blocker Blocker type: bug Fix something that is not working alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle labels Aug 7, 2023
@TatianaBurek TatianaBurek changed the title Password field in loading/batch XML files can be empty Password field in loading XML files can be empty Aug 7, 2023
@bikegeek bikegeek self-assigned this Aug 7, 2023
@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle label Aug 7, 2023
@JohnHalleyGotway JohnHalleyGotway added the requestor: NOAA/EMC NOAA Environmental Modeling Center label Aug 7, 2023
@bikegeek
Copy link
Collaborator

bikegeek commented Aug 7, 2023

@TatianaBurek , should we still keep this check, except log a WARNING so non-cloud users still get notification of a missing password? (And continue without erroring out)

bikegeek added a commit that referenced this issue Aug 7, 2023
…rd is missing. This allows cloud-users to continue without a password.
bikegeek added a commit that referenced this issue Aug 7, 2023
…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.
@TatianaBurek
Copy link
Collaborator Author

I don't think so.
If the connection to the database was unsuccessful we can print an error message that would include the warning. But with the successful database connection it is irrelevant.

@TatianaBurek TatianaBurek linked a pull request Aug 7, 2023 that will close this issue
14 tasks
bikegeek added a commit that referenced this issue Aug 16, 2023
* Issue #221 Replace the ERROR with a WARNING and proceed when a password is missing.  This allows cloud-users to continue without a password.

* Issue #221 Do a separate check, one for username, the other for password.
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.

* Fixed extraneous parenthesis in if-statement.

* Issue #221 Removed check for missing password.

* update warning message, and verified that the check for password no longer exists
bikegeek added a commit that referenced this issue Aug 16, 2023
* Issue #221 Replace the ERROR with a WARNING and proceed when a password is missing.  This allows cloud-users to continue without a password.

* Issue #221 Do a separate check, one for username, the other for password.
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.

* Fixed extraneous parenthesis in if-statement.

* Issue #221 Removed check for missing password.

* update warning message, and verified that the check for password no longer exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue component: load Tasks related to the database loading priority: blocker Blocker requestor: NOAA/EMC NOAA Environmental Modeling Center type: bug Fix something that is not working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants