Opened 5 years ago

Closed 5 years ago

#1095 closed enhancement (fixed)

Implement "update" mode for the release importer

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Relax v1.4
Component: net.sf.basedb.relax Keywords:
Cc:

Description

It would be a nice feature to be able to use the release importer to update items that are part of an earlier release with new annotations without creating new items.

If we have this we could make a single release from the production server that is used both for creating a new "major" version release and updating older releases.

The release importer would of course have to be executed multiple times, one time each for the older releases and one time for the major release.

One issue that needs to be solved is what to do about files on the release archive file server. Since no new items are created we could of course point to the existing directory that is associated with the older release and be sure that no files are missing. But some items may have been removed since the old release so we should really have a copy with links to only the remaining items.

Change History (9)

comment:1 by Nicklas Nordborg, 5 years ago

(In [5189]) References #1095: Implement "update" mode for the release importer

The basic functionality has been implemented. The plug-in now asks for a project to "Update from". If no project is selected a full import is made. If a project is selected the plugin will only look for items that are present in that project and it will not create new items.

One remaining issue is that the DataFilesFolder annotation uses the "Release version" parameter in the path which may not be the correct value. For example, to create the 4.1 release one could use the 5.0 data to update the 4.0 release. This would cause DataFilesFolder annotations in the 4.1 release reference the 5.0 version.

comment:2 by Nicklas Nordborg, 5 years ago

(In [5190]) References #1095: Implement "update" mode for the release importer

Re-arranged the parameters for the release importer plug-in. Added a "Data version" parameter that may be specified to read data from a different version number than the release that is being created. For example:

  • Release version = 4.1
  • Update from: 4.0
  • Data version: 5.0

This will create the 4.1 release that is an update from the 4.0 release with data from the 5.0 relase.

comment:3 by Nicklas Nordborg, 5 years ago

(In [5194]) References #1095: Implement "update" mode for the release importer

No new files should be created in "update" mode.

If a file already exists we must also implement a check that it is actually shared to the "updateFrom" project. If not, we should not share the file to the current project.

comment:4 by Nicklas Nordborg, 5 years ago

(In [5195]) References #1095: Implement "update" mode for the release importer

File metadata, such as size, was reset if there was no information in the json. With this update, the metadata is only changed if there is a value in the json.

comment:5 by Nicklas Nordborg, 5 years ago

Owner: set to Nicklas Nordborg
Status: newassigned

comment:6 by Nicklas Nordborg, 5 years ago

(In [5236]) References #1095: Implement "update" mode for the release importer

The importer now checks that the 'index.json' file actually exists in the specified directory, which avoids a NullPointerException when running in UPDATE mode without specifying the data version (eg. when updating the 3.0 release to 3.1 using data from the 4.0 release).

comment:7 by Nicklas Nordborg, 5 years ago

(In [5242]) References #1095: Implement "update" mode for the release importer

This "TODO" was fixed in [5190].

comment:8 by Nicklas Nordborg, 5 years ago

(In [5247]) References #1095: Implement "update" mode for the release importer

Update mode is not needed on the level 3 server since there is no way for the export on relax to generate rsync script that copy the correct files for multiple releases.

comment:9 by Nicklas Nordborg, 5 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.