Skip to content

CMR-10723 bump up urllib to a modern version - #2282

Merged
jceaser merged 14 commits into
masterfrom
cmr-10723-urllib
Aug 19, 2025
Merged

CMR-10723 bump up urllib to a modern version#2282
jceaser merged 14 commits into
masterfrom
cmr-10723-urllib

Conversation

@jceaser

@jceaser jceaser commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

Overview

url lib3 was outdated

What is the feature/fix?

  • Bumped up the version number.
  • Tool was not running, so minor changes to fix the code:
    • Moved output to logging api
    • added command line flag for running just one job as a test
    • added localhost to the url
  • added .editorconfig because all tools should use it.

Checklist

  • I have updated/added unit and int tests that prove my fix is effective or that my feature works
  • New and existing unit and int tests pass locally and remotely
  • clj-kondo has been run locally and all errors corrected
  • I have removed unnecessary/dead code and imports in files I have changed
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have cleaned up integration tests by doing one or more of the following:
    • migrated any are2 tests to are3 in files I have changed
    • de-duped, consolidated, removed dead int tests
    • transformed applicable int tests into unit tests
    • refactored to reduce number of system state resets by updating fixtures (use-fixtures :each (ingest/reset-fixture {})) to be :once instead of :each

@jceaser
jceaser requested a review from TylerHeald1 August 19, 2025 15:53
@@ -1,2 +1,2 @@
urllib3==1.26.19
urllib3~=2.5.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should support future versions as well


pool_manager = urllib3.PoolManager(headers={"Authorization" : "mock-echo-system-token"})
pool_manager = urllib3.PoolManager(headers={"Authorization" : "mock-echo-system-token",
"client-id": f'{__file__}'})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

everything we do should have a client-id so we can tell our traffic from random users.

Takes the job details and builds the local job endpoint
"""
url = "http://{}:{}"
url = "http://{}:{}/{}"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no idea how this was working before

hours = job_details["scheduling"]["timing"].get("hours", 0)
total_minutes = minutes + hours*60
print("Scheduling job for every " + str(total_minutes) + " minutes")
logger.info("Scheduling job for every %d minutes", total_minutes)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pylint made me do it

help='Do a test run of RefreashKMSCache and exit.')
args = parser.parse_args()

if args.test:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I needed a quick and dirty way to run the code and verify that urllib3 was functioning on the new version.

@jceaser
jceaser requested review from jmaeng72 and zimzoom August 19, 2025 15:57
@jceaser
jceaser merged commit d2ca1fd into master Aug 19, 2025
6 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.

3 participants