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

fix curl getting of context #334

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Oct 9, 2024

Similar to:
spacetelescope/crds#1086

fixes the curl command to add the second required parameter.

Tasks

  • update or add relevant tests
  • update relevant docstrings and / or docs/ page
  • Does this PR change any API used downstream? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • run jwst regression tests with this branch installed ("git+https://github.com/<fork>/stdatamodels@<branch>")
news fragment change types...
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

@braingram braingram requested a review from a team as a code owner October 9, 2024 21:39
@braingram braingram added the no-changelog-entry-needed Trivial change that doesn't need an entry in the change log label Oct 9, 2024
@braingram braingram requested a review from tapastro October 9, 2024 21:41
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.55%. Comparing base (fd6be8d) to head (1be5049).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #334   +/-   ##
=======================================
  Coverage   66.55%   66.55%           
=======================================
  Files         102      102           
  Lines        5456     5457    +1     
=======================================
+ Hits         3631     3632    +1     
  Misses       1825     1825           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tapastro
Copy link
Collaborator

This looks good to me and I'm happy to merge, but out of curiosity I started a CI test. I didn't see any failures in past runs, and this run also passed: https://github.com/spacetelescope/stdatamodels/actions/runs/11264886442

I'm not sure I understand... are the downstream tests retrieving a context somehow?

@braingram
Copy link
Collaborator Author

braingram commented Oct 10, 2024

The setup here is a little different than jwst.

A similar curl command is used to get the latest context but unlike jwst this repo doesn't set the CRDS_CONTEXT environment variable to that value (it probably should). The same as jwst the context is used to generate the cache "key" (the identifier github actions uses to store and retrieve cached files which is used to allow the tests to re-use an already fetched context).

For the run you linked the key is crds-None: https://github.com/spacetelescope/stdatamodels/actions/runs/11264886442/job/31325721559#step:3:4
whereas for the run in this PR the key is crds-jwst_1293.pmap: https://github.com/spacetelescope/stdatamodels/actions/runs/11263496725/job/31321510542?pr=334#step:3:4
The caching helps with issues that can randomly pop up because of spacetelescope/crds#930 and running the tests in parallel. If 1 test decides to start downloading a file and a second test starts that uses the same file the 2nd test will see a partial file and try to use it (leading to erroneous test failures). I think this can still happen with the current setup (when a new context is released) but I have not seen that type of failure recently.

@braingram braingram merged commit 503320f into spacetelescope:main Oct 10, 2024
26 of 27 checks passed
@braingram braingram deleted the fix_context branch October 10, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-entry-needed Trivial change that doesn't need an entry in the change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants