Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Versioning and extensions #42

Merged
merged 22 commits into from
Apr 11, 2024
Merged

Versioning and extensions #42

merged 22 commits into from
Apr 11, 2024

Conversation

roll
Copy link
Member

@roll roll commented Feb 23, 2024


Overview

It's the beginning of the pull request that might bring versioning to Data Package specification descriptors as well as simplify and fix some other parts of the standard.

Currently, it's been created to get feedback on the new $schema property that allows versioning and hopefully will allow us to employ native JSON Schema for handling basically all the metadata aspects in the standard (PR needs to be extended to get there).

One of examples of how we can benefit from closer JSON Schema integration, by using $schema we get free visual descriptor validation in many modern text editors:

schema


Deployment preview:

Copy link

cloudflare-workers-and-pages bot commented Feb 23, 2024

Deploying datapackage with  Cloudflare Pages  Cloudflare Pages

Latest commit: 913e41a
Status: ✅  Deploy successful!
Preview URL: https://1432657e.datapackage.pages.dev
Branch Preview URL: https://444-versioning.datapackage.pages.dev

View logs

content/docs/specifications/data-package.md Outdated Show resolved Hide resolved
content/docs/specifications/data-package.md Outdated Show resolved Hide resolved
content/docs/specifications/data-package.md Outdated Show resolved Hide resolved
content/docs/specifications/data-package.md Outdated Show resolved Hide resolved
@roll roll changed the title [Draft] Versioning and meta-level simplification Versioning and extensions Apr 4, 2024
@roll roll force-pushed the 444/versioning branch from eccda08 to 3765259 Compare April 5, 2024 10:52
@roll
Copy link
Member Author

roll commented Apr 5, 2024

Hi @peterdesmet,

I was going back and forth on this, and in the end, I highly simplified the approach to the state similar to what we have in v1 but improving explanations and definitions. The main changes are:

  • requiring profiles to be idempotent in relation to their URL (I think on the implementation level, we don't really care about data package version; what we really care about is ensuring that a descriptor actually valid against its profile as it's self-containable; idempotency solves this problem)
  • requiring profiles to include default validation rules

@roll
Copy link
Member Author

roll commented Apr 5, 2024

For example, if profiles are idempotent, we can safely release e.g. https://datapackage.org/profiles/3.0/datapackage.json that have breaking change but all the existent data packages won't be affected because a data publisher needs explicitly update a profile version to migrate.


At the same time, idempotency might be too strict as it prevents implicit bug-fixing in the profiles and providing new, non-breaking features. So another option would be switching from idempotent to non-breaking and having e.g. major-version based versioning like https://datapackage.org/profiles/v3/datapackage.json

content/docs/specifications/extensions.md Outdated Show resolved Hide resolved
content/docs/specifications/extensions.md Outdated Show resolved Hide resolved
content/docs/specifications/extensions.md Outdated Show resolved Hide resolved
content/docs/specifications/extensions.md Outdated Show resolved Hide resolved
content/docs/specifications/glossary.md Outdated Show resolved Hide resolved
@peterdesmet
Copy link
Member

I think I prefer idempotent (immutable) to non-breaking: it makes the text pretty clear and indicates to extension authors that you should be careful not to release versions that are inherently broken. 😅 That's why we used a release candidate for Camtrap DP, making it clear that any data artefact using that is experimental.

@roll
Copy link
Member Author

roll commented Apr 10, 2024

Thanks @peterdesmet! I've updated it based on your comments.

I think immutability is definitely the most straightforward way, as it enables worry-free caching and, in general, a really simple concept on both sides (standard/extensions -> implementations)

@pschumm
Copy link

pschumm commented Apr 10, 2024

I believe immutable is indeed what we want here. Unless I'm misunderstanding something, I don't believe the term idempotent is appropriate in this case (that has a very specific mathematical definition, and I don't see how it applies here).

@roll
Copy link
Member Author

roll commented Apr 11, 2024

ACCEPTED by WG (6/9)

@roll roll merged commit a731ab4 into main Apr 11, 2024
2 checks passed
@roll roll deleted the 444/versioning branch April 11, 2024 13:56
@khughitt
Copy link

I love this. Awesome work. 👌

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants