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

Version the Task Registry API #43

Open
6 tasks
anneschuth opened this issue Sep 6, 2024 · 0 comments
Open
6 tasks

Version the Task Registry API #43

anneschuth opened this issue Sep 6, 2024 · 0 comments

Comments

@anneschuth
Copy link
Member

anneschuth commented Sep 6, 2024

Add an optional version parameter to the Task Registry API.
The version refers to the version of the task.
If the version is not specified in a request, the instrument with the latest version is returned (as it is right now).

We will need to introduce a version field / version per task (and thus adapt the schema).
Versions will be bumped any time the instrument changes.
Instruments can change because a) the schema changes and the instrument needs to follow the new schema b) there is a minor update to the instrument that fixes a typo or c) a major update that for instances adds a task to an instrument.
We use semantic versioning to make a separation between these types of changes.
Urns of instruments stay the same over all these changes.

Old versions of the instrument need to be kept around. This means that we probably keep multiple files per instrument around (in a folder per instrument). The latest version is the highest major version.
Old versions of a schema will also need to be kept around in the same way.

Technical notes

  • Add a pre-commit hook that checks the above: no changes to instruments are allowed unless also the version is bumped (and accordingly, a new file is added). The simplest way to do this is by checking that versioned instrument files are immutable (see for an example line 27 here: https://github.com/MinBZK/amt/blob/main/.pre-commit-config.yaml#L27).
  • We should start doing the same for schemas: version their filenames and check that they don't change either (only adding is allowed)
  • Update the schema validation script to use the correct schema for each versioned instrument.
  • Implement a check that verifies that for each instrument we have a version that implements the latest schema, this can be added to the script that currently validates instruments to the schema
  • Add all versions of instruments to the index
  • Change the API /urn/ to accept versioning

This ticket is required by MinBZK/amt#175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ♻ To Do
Development

No branches or pull requests

1 participant