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

Put okify results in unique subdirectories to avoid file overwrites #1456

Merged
merged 3 commits into from
Oct 14, 2024

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Oct 14, 2024

Fixes #1454

This PR modifies the organization of okify results uploaded to artifactory to avoid overwriting results if multiple tests fail which share the same name (such as parameterized tests). To provide an example, if test_rampfit_step is made to fail (by adding an assert False). 4 errors will be produced (from the 4 parametrizations of the test):
https://github.com/spacetelescope/RegressionTests/actions/runs/11325106885/job/31501401451#step:30:1020
as these 4 tests share the same name the results will be put into the same directory on artifactory "test_rampfit_step":
https://bytesalad.stsci.edu/ui/repos/tree/General/roman-pipeline-results/2024-10-14_GITHUB_CI_Linux-X64-py3.11-1145/test_rampfit_step
This can result in files being overwritten (if they share the same name).

This PR prefixes the artifactory subdirectory with a unique number (the index of the test for the test run) to avoid file overwrites. Here's an example run forcing the same test to fail:
https://bytesalad.stsci.edu/ui/repos/tree/General/roman-pipeline-results/2024-10-14_GITHUB_CI_Linux-X64-py3.11-1147
showing the 4 test results split into 4 subdirectories.

I was able to run a 'dry-run' okify on the above example and it picked up the 4 test failures in the newly named subdirectories.

Regression tests running here: https://github.com/spacetelescope/RegressionTests/actions/runs/11331347662

Tasks

  • request a review from someone specific, to avoid making the maintainers review every PR
  • add a build milestone, i.e. 24Q4_B15 (use the latest build if not sure)
  • Does this PR change user-facing code / API? (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)
    • update or add relevant tests
    • update relevant docstrings and / or docs/ page
    • start a regression test and include a link to the running job (click here for instructions)
      • Do truth files need to be updated ("okified")?
        • after the reviewer has approved these changes, run okify_regtests to update the truth files
  • if a JIRA ticket exists, make sure it is resolved properly
news fragment change types...
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change
  • changes/<PR#>.docs.rst
  • changes/<PR#>.stpipe.rst
  • changes/<PR#>.associations.rst
  • changes/<PR#>.scripts.rst
  • changes/<PR#>.mosaic_pipeline.rst
  • changes/<PR#>.patch_match.rst

steps

  • changes/<PR#>.dq_init.rst
  • changes/<PR#>.saturation.rst
  • changes/<PR#>.refpix.rst
  • changes/<PR#>.linearity.rst
  • changes/<PR#>.dark_current.rst
  • changes/<PR#>.jump_detection.rst
  • changes/<PR#>.ramp_fitting.rst
  • changes/<PR#>.assign_wcs.rst
  • changes/<PR#>.flatfield.rst
  • changes/<PR#>.photom.rst
  • changes/<PR#>.flux.rst
  • changes/<PR#>.source_detection.rst
  • changes/<PR#>.tweakreg.rst
  • changes/<PR#>.skymatch.rst
  • changes/<PR#>.outlier_detection.rst
  • changes/<PR#>.resample.rst
  • changes/<PR#>.source_catalog.rst

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.38%. Comparing base (52458fa) to head (a2804d7).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1456   +/-   ##
=======================================
  Coverage   78.38%   78.38%           
=======================================
  Files         118      118           
  Lines        7680     7680           
=======================================
  Hits         6020     6020           
  Misses       1660     1660           
Flag Coverage Δ *Carryforward flag
nightly 62.12% <ø> (ø) Carriedforward from 1945dad

*This pull request uses carry forward flags. Click here to find out more.

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

@braingram braingram marked this pull request as ready for review October 14, 2024 16:17
@braingram braingram requested a review from a team as a code owner October 14, 2024 16:17
@braingram braingram changed the title add test/item index Put okify results in unique subdirectories to avoid file overwrites Oct 14, 2024
Copy link
Collaborator

@schlafly schlafly left a comment

Choose a reason for hiding this comment

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

Thanks Brett!

@braingram braingram enabled auto-merge October 14, 2024 17:36
@braingram braingram merged commit 1ae172e into spacetelescope:main Oct 14, 2024
31 checks passed
@braingram braingram deleted the unique_rtdata branch October 14, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate test names can result in okify results being overwritten
4 participants