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

HRQB 18 - Data warehouse and Quickbase connection tests #27

Merged
merged 2 commits into from
May 28, 2024

Conversation

ghukill
Copy link
Collaborator

@ghukill ghukill commented May 23, 2024

Purpose and background context

This application requires connectivity to the Data Warehouse and Quickbase. A dedicated CLI command for testing those connections is helpful for debugging environments in Dev, Stage and Prod.

How this addresses that need:

  • Adds test_connection() method on DWClient and QBClient classes
  • Adds CLI command test-connections that runs this method and logs output

How can a reviewer manually see the effects of these changes?

Set invalid credentials as local env vars:

WORKSPACE=dev
SENTRY_DSN=None
DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH
LUIGI_CONFIG_PATH=hrqb/luigi.cfg
QUICKBASE_API_URL=https://api.quickbase.com/v1
QUICKBASE_API_TOKEN=qb-api-acb123
QUICKBASE_APP_ID=qb-app-def456
DATA_WAREHOUSE_CONNECTION_STRING=bad-protocol://user1:pass1@example.org:1521/ABCDE

Run CLI command:

pipenv run hrqb --verbose test-connections

Note the output that both DW and QB connections fail. If both successful, would see "All connections OK" in logs.

Includes new or updated dependencies?

NO

Changes expectations for external applications?

NO

What are the relevant tickets?

Developer

  • All new ENV is documented in README
  • All new ENV has been added to staging and production environments
  • All related Jira tickets are linked in commit message(s)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer(s)

  • The commit message is clear and follows our guidelines (not just this PR message)
  • There are appropriate tests covering any new functionality
  • The provided documentation is sufficient for understanding any new functionality introduced
  • Any manual tests have been performed or provided examples verified
  • New dependencies are appropriate or there were no changes

Why these changes are being introduced:

This application requires connectivity to the Data
Warehouse and Quickbase.  A dedicated CLI command for testing
those connections is helpful for debugging environments in Dev,
Stage and Prod.

How this addresses that need:
* Adds test_connection() method on DWClient and QBClient classes
* Adds CLI command test-connections that runs this method and logs
output

Side effects of this change:
* None

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/HRQB-18
Copy link

@ehanson8 ehanson8 left a comment

Choose a reason for hiding this comment

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

Great addition to the repo, 2 non-blocking comments, approved!

hrqb/cli.py Outdated Show resolved Hide resolved
hrqb/cli.py Outdated Show resolved Hide resolved
hrqb/cli.py Show resolved Hide resolved
@ghukill ghukill merged commit 2fbe3f0 into main May 28, 2024
5 checks passed
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

3 participants