netcreateorg / netcreate-itest

Developing the 2.0 version of NetCreate
https://github.com/netcreateorg/netcreate-2018
Other
0 stars 0 forks source link

Handling Template Versioning #217

Open benloh opened 1 month ago

benloh commented 1 month ago

The big question: How should we handle template versioning so that we can manage migration?

Notes from the Slack conversation with Sri and Ben:

Use cases

Actions that are related to template versions.

  1. The template format might change if we need...

    • new project parameters (e.g. add mandatory duplicateWarning text)
    • new feature parameters (e.g. add filter function and parameters like filterFadeHelp)
    • new built-in fields (e.g. updatedBy)
    • new schema parameters (e.g. 'isProvenance' added to field definitions so they appear in the Provenance tab)
    • adding new parameters only under certain conditions (e.g. only adding provenance if the current template schema calls for it, skipping it otherwise).
  2. Loading an existing project (and associated project template) needs to...

    • gracefully migrate existing fields so that the data can load without crashing
    • migrating fields from one format to another if it's warranted
    • ...but sometimes you definitely do NOT want to migrate the field because you want to keep the data as-is, instead just supporting being able to load and view the data without breaking
    • record template versions so that we can associate a required change with a version
    • templates without a version are assumed to be somewhere between 1.0 and 1.x. Currently I believe the app can successfully migrate any template up to 2.0.
  3. Manually updating an existing project template in order to...

    • bump the version number to enable new features (e.g. introducing version control; e.g. validating templates only for specific versions of the template schema)
    • manually add new fields/parameters to convert or take advantage of new features.
  4. Creating a new default template from the current template-schema.js definition.

    • Changes to the template schema requires generating a new default template to be used with new projects.
    • The new default template should be mapped to a specific version id (whatever that might be).
  5. Viewing a historical graph

    • Sometimes you might want to view an old project graph using the version of the tool that was being used to create the graph. In this case, you need to know which Release of the app to use to open the project.
    • This is particularly an issue for researchers who might need to revisit the graph from an old study. Theoretically the modification date of the project should provide some clue to the associated release, but this is not reliable.

General questions:

Possible Solution: Use github Release Versions

Ben's first proposal was to use github Release versions. This is the current implementation as of dev-bl/provenance around May 24th, 299721e025b3280861cf0a2b9775aafa24ba2bad.

PROS:

CONS:

Possible Solution: Use build numbers

Sri's proposal is to use build numbers that are automatically generated with each compilation.

PROS:

CONS:

Criteria / Principles