Skip to content

Skip missing history item ids in job exports#22563

Open
guerler wants to merge 6 commits intogalaxyproject:devfrom
guerler:fix_22562
Open

Skip missing history item ids in job exports#22563
guerler wants to merge 6 commits intogalaxyproject:devfrom
guerler:fix_22562

Conversation

@guerler
Copy link
Copy Markdown
Contributor

@guerler guerler commented Apr 25, 2026

Fixes #22562. Branched from: #22561.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@guerler guerler added this to the 26.0 milestone Apr 25, 2026
@guerler guerler requested a review from mvdbeek April 25, 2026 07:44
@guerler guerler marked this pull request as ready for review April 25, 2026 07:50
@mvdbeek
Copy link
Copy Markdown
Member

mvdbeek commented Apr 25, 2026

That seems really very strange and I don't think we ca just silently ignore this. Can you reproduce this ?

Comment thread lib/galaxy/managers/model_stores.py Outdated
model_store_format,
export_files=export_files,
user_context=user_context,
tolerate_missing_data=True,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should always default to False

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.

The default is already False. Here it's set explicitly only for the archival path. If we set it to False here too, we can remove the flag entirely, since it won't be used anywhere, and then exports would continue to fail.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How's that a flag ? You need to expose this in the API so the batch exporter can do a best-effort version of the export, but regular history exports should fail, not pretend they worked.

Comment thread test/unit/data/model/test_model.py Outdated
assert options.get_identifier_for_id(id_encoder=None, obj_id=None) is None
assert options.get_identifier_for_id(id_encoder=None, obj_id=0) == 0
assert options.get_identifier_for_id(id_encoder=None, obj_id=42) == 42
def test_get_identifier_for_id_null_handling():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think this test proves anything but the literal change you made doesn't crash. Nothing there proves downstream work actually works.

Comment thread test/unit/data/model/test_model.py Outdated
def test_get_identifier_for_id_null_handling():
"""Null job-param ids raise in strict mode and pass through in
tolerate_missing_data mode."""
def test_job_serialize_with_null_param_ids():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have a ton of existing model store unit tests. Use one of those and delete the relevant item before export.

Comment thread client/src/api/schema/schema.ts Outdated
* @description Best-effort export: skip unresolved references instead of failing.
* @default false
*/
tolerate_missing_data: boolean;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it isn't missing data though, it's missing provenance. The job is very old, i think it probably predates collections. i would just call it ignore_errors and document that this is a last resort, exported data may be corrupt.

@guerler guerler changed the base branch from release_26.0 to dev April 25, 2026 10:39
@github-actions github-actions Bot changed the title [26.0] Skip missing history item ids in job exports Skip missing history item ids in job exports Apr 25, 2026
@guerler guerler modified the milestones: 26.0, 26.1 Apr 25, 2026
@guerler
Copy link
Copy Markdown
Contributor Author

guerler commented Apr 25, 2026

Switched to targeting dev, since this seems to only impact gxarchiver and is likely limited to older histories.

@guerler guerler force-pushed the fix_22562 branch 3 times, most recently from a46ee16 to 73c7c77 Compare April 25, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

NotImplementedError

2 participants