Proposal: Versioning of libraries on ecaguide.org

Created on 31 January 2023, almost 2 years ago
Updated 17 March 2023, over 1 year ago

Problem/Motivation

ECA models have an optional "version" field but there is no defined format or meaning to the value. It has no effect/impact on modeling or processing. It is left to the user to decide what/if it should mean anything.

There are models on ecaguide.org in the Library section and there are plans to provide more models, including working examples. It could be useful for users if models on the guide conformed to a standard version format. It would allows users to see if a model they looked at or used has been changed. It could also act as an example for the wider ECA ecosystem for how a version format could be used.

There are two categories for a version format: semantic and non-semantic. A semantic version provides some kind of information about the underlying model that's part of the version itself. A non-semantic version provides no information about the underlying model, it acts only as a way to differentiate between versions.

The possible versions that could be adopted are listed below.

Semantic

  • Full SemVer: major.minor.patch.
    Pros: aligns with Drupal core and contrib version format. Easy to compare.
    Cons: Models don't have a "public api" so how do you define what changes are major/minor/patch. Lots of burden on the user to understand the model and correctly version it. High risk of differences of opinion between users/models on what part of version should change.
  • Semi-semantic: logic.documentation. A logic change is anything that effects the processing of a model e.g., create/delete of event/condition/action, or any changes to parameters of event/condition/action, or any changes to flow. A documentation change is anything that doesn't effect processing e.g., name/documentation changes, or rearranging for better aesthetics.
    Pros: Format is well defined and would tell a user what kind of updates have been made to a model. Easy to compare.
    Cons: Puts burden on user to understand the model and correctly version it. Doesn't align with any other formats in the Drupal community.

Non-semantic

  • Datestamp: ISO-8601 2022-01-01 or simple 20220101.
    Pros: Easy to set. Easy to compare.
    Cons: Users could infer that a model is "old," even if it's not broken. Can't release updates more than once per day.
  • Commit Sha: 8sfk84k
    Pros: None?
    Cons: Difficult (impossible?) to set, since you have to define a version before you commit. No easy way to tell which model is "newer."
  • Contents Hash: sha/crc/etc of the library.
    Pros: Possibility for being able to detect changes to model.
    Cons: Mostly the same as Commit Sha format.
  • Simple Incrementing: v1 -> v2. Whole numbers only.
    Pros: Easy to set. Easy to compare.
    Cons: Least informative, useful only for knowing that a model has changed.

Proposed resolution

Libraries on ecaguide.org should use a Simple Incrementing version format. Additionally, a changelog should be incorporated using the Extension Properties.

Remaining tasks

  1. Decide on a version format
  2. Document format on ecaguide.org
  3. Update libraries on ecaguide.org to use format
πŸ“Œ Task
Status

Fixed

Version

1.2

Component

Documentation

Created by

πŸ‡ΊπŸ‡ΈUnited States rocketeerbkw Austin, Tx

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @rocketeerbkw
  • πŸ‡ΊπŸ‡ΈUnited States rocketeerbkw Austin, Tx

    TL;DR

    For ecaguide.org, I like the simplest version format of incrementing whole numbers: v1 -> v2. It informs users that a model they looked at or used before has changed, and doesn't require contributors to learn and parse changes into a meaningful version.

    As I stated in the IS, there's a chance that a format we pick for the guide gets adopted more broadly. In that case I like the custom/semi-semantic format of logic.documentation. It provides some information about what has changed between versions, but requires contributors to correctly map the changes they made into the correct part of the version format.

    I'm sure there are other options (like combining date + increment 20220101-1). And maybe there is another category besides (non)-semantic. Would be interested to see other options.

    As mentioned in slack, I did some quick googling to see if any BPMN/Camunda resources had recommendations and didn't find anything.

  • πŸ‡©πŸ‡ͺGermany rkoller NΓΌrnberg, Germany

    +1 for the idea in general. and how about adding some sort of changelog to the individual model page alongside the simple incremental versioning you've suggested in #2 πŸ“Œ Proposal: Versioning of libraries on ecaguide.org Fixed . that way the user would know the module has changed and what has changed?

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    This is an outstanding summary, thanks @rocketeerbkw for writing this up.

    My preference is the Simple incrementing combined with @rkoller's suggestion of a changelog. This could be easily maintained like this:

    The text from the documentation field is already being used in the ECA Guide and the "Tags" are used for categorization and search. There we can add another property "Changelog" to keep track of changes. I think this would make a great improvement to the library in the ECA Guide.

  • πŸ‡ΊπŸ‡ΈUnited States rocketeerbkw Austin, Tx

    Updated the IS to reflect the consensus.

  • Assigned to jurgenhaas
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    I'm working on the Drush command to update the models for the library by incorporating all the conclusions above.

    There is one minor thing that came up regarding the changelog, because that's a simple textfield in the bpmn_io UI and therefore difficult to use for longer text once we get more revisions of one model. I suggest that we use one property for each revision with a naming convention: Changelog v1: some text to describe the version changes The next version of that model will then get an additional property Changelog v2: some text to describe the version changes and so on. In the ECA Guide, we can convert that into a single "Changelog" heading followed by a list of items.

  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    I have implemented this, updated all the existing models and deployed the changes to the ECA Guide at https://ecaguide.org/library for your review.

    After that, the only remaining part is to write up the guidelines so that future contributors know what to deliver.

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Have just written the contribution guidelines for the library in the ECA Guide at https://ecaguide.org/library and I'd much appreciate some feedback as we can close this issue here, once that's been finalized.

  • πŸ‡ΊπŸ‡ΈUnited States rocketeerbkw Austin, Tx

    Is the Drush command useful for these libraries? Should that be documented also?

    Otherwise the page LGTM.

  • Status changed to Fixed over 1 year ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Thanks @rocketeerbkw for your feedback. The Drush command is only used by ourselves to prepare the export to the library. Don't think we need to document it at this point. Maybe later, this could be opened up for everyone to be used, but that would require some extra steps.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024