-
Notifications
You must be signed in to change notification settings - Fork 5
Switch USE_SHIFTER env var name; remove scary log #136
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
Conversation
* Switches USE_SHIFTER -> USE_EXTERNAL_URLS to better describe what the env var does * Swtiches an error() log to a log() log as it's not actually a error, it happens all the time and is normal.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 80.71% 80.84% +0.13%
==========================================
Files 13 13
Lines 1177 1180 +3
==========================================
+ Hits 950 954 +4
+ Misses 227 226 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
... other than the ee2 config Will need to be tested in situ
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.
Pull Request Overview
This PR refactors URL management for the NERSC environment by switching from the USE_SHIFTER environment variable to USE_EXTERNAL_URLS and consolidating URL replacement logic. It also changes an error log to an informational log for a common non-error condition.
- Renamed environment variable
USE_SHIFTERtoUSE_EXTERNAL_URLSfor clearer intent - Consolidated URL replacement logic into the Config class
- Changed Docker image not found error logging from error to info level
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/jobrunner.py | Removed URL replacement logic, moved to Config class |
| JobRunner/config.py | Added URL constants and URL replacement logic in Config constructor |
| JobRunner/JobRunner.py | Updated to use consolidated config and renamed variables for clarity |
| JobRunner/DockerRunner.py | Changed Docker image not found logging from error to info level |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
JobRunner/config.py
Outdated
| PROD_INTERNAL_URL_BASE = "https://services.kbase.us" | ||
| PROD_EXTERNAL_URL_BASE = "https://kbase.us" |
Copilot
AI
Sep 15, 2025
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.
Extra space before the equals sign in class constants. Should be single space for consistency with Python style guidelines.
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.
Fixed
JobRunner/JobRunner.py
Outdated
| ee2_config = self.ee2.list_config() | ||
| except Exception as e: | ||
| self.logger.error("Failed to config . Exiting.") | ||
| self.logger.error("Failed to get config . Exiting.") |
Copilot
AI
Sep 15, 2025
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.
Extra space before the period in the error message. Should be 'Failed to get config. Exiting.' for consistency.
| self.logger.error("Failed to get config . Exiting.") | |
| self.logger.error("Failed to get config. Exiting.") |
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.
Fixed
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.
Pull Request Overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Will need to be tested in situ at NERSC.