Skip to content

fix add_history_entry validation to ignore custom schema#2044

Open
braingram wants to merge 4 commits into
asdf-format:mainfrom
braingram:bugfix_add_history_entry_validation
Open

fix add_history_entry validation to ignore custom schema#2044
braingram wants to merge 4 commits into
asdf-format:mainfrom
braingram:bugfix_add_history_entry_validation

Conversation

@braingram
Copy link
Copy Markdown
Contributor

@braingram braingram commented May 7, 2026

Description

This fixes a bug introduced by #2029 where if a user:

  • provides a custom schema that constrains the entire tree (like is the case for dkist)
  • calls add_history_entry

The call to add_history_entry can fail due to the validation:

  • not including the entire tree
  • (incorrectly) using the custom schema

This PR fixes the issue by providing a blank schema to validate (which will be used instead of the custom schema). The tagged entry will still be validated.

Hopefully we can get some confirmation from dkist that this fixes the issues they had with asdf 5.3.0. Unfortunately this was only revealed in tests for https://bitbucket.org/dkistdc/dkist-inventory/src which we did not have in our downstream. This PR also adds that to our downstream.

Tasks

  • run prek on your machine
  • run pytest on your machine
  • Does this PR add new features and / or 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 relevant docstrings and / or docs/ page
    • for any new features, add unit tests
news fragment change types...
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: bug fix
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change

@braingram braingram marked this pull request as ready for review May 7, 2026 12:50
@braingram braingram requested a review from a team as a code owner May 7, 2026 12:50
@braingram braingram requested a review from Cadair May 7, 2026 12:50
@braingram
Copy link
Copy Markdown
Contributor Author

From offline conversation with @Cadair this fixes the CI failures they are seeing with 3.5.0.

@sydduckworth any objection if we put this in a patch release (3.5.1)? Should we include the other changes on main?

Comment thread tox.ini Outdated
@sydduckworth
Copy link
Copy Markdown
Contributor

I'm fine with a patch release!

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.

3 participants