Skip to content

Breaking Changes - v.3.0.0

New required schema

Snapshot Parameters Definition allows plugin authors to define snapshot parameters which can be displayed to an end-user whenever a linked source snapshot is taken.

What is affected

All plugins built with v2.0.0 or below will be affected. The Schema must contain a snapshotParametersDefinition.

How does it fail

dvp build will fail with the following error message if the SnapshotParametersDefinition Schema is not added to the schema file:

$ dvp build
Error: 'snapshotParametersDefinition' is a required property on ['required']

Validation failed on /private/var/tmp/fp/schemas/schema.json.
0 Warning(s). 1 Error(s)

BUILD FAILED.

How to fix it

Add a SnapshotParametersDefinition Schema to the schemaFile defined in the Plugin Config.

Example:

"snapshotParametersDefinition": {
    "additionalProperties": false,
    "properties": {
        "resync": {
            "type": "boolean"
        }
    },
    "type": "object"
}

New Parameter in Direct Pre/Post-Snapshot Functions

optional_snapshot_parameters has been added as a parameter in Direct Linked Source Pre-Snapshot and Direct Linked Source Post-Snapshot.

What is affected

All direct plugins built with v2.1.0 or below will be affected.

How does it fail

dvp build will fail with the following error message if the optional_snapshot_parameters is not added:

$ dvp build
Error: Named argument mismatch in method linked_post_snapshot. Expected: ['staged_source', 'repository', 'source_config', 'optional_snapshot_parameters'], Found: ['staged_source', 'repository', 'source_config'].

0 Warning(s). 1 Error(s).

BUILD FAILED.

How to fix it

Add optional_snapshot_parameters as a parameter in Direct Linked Source Pre-Snapshot and Direct Linked Source Post-Snapshot.

  • Previous releases
 @plugin.linked.post_snapshot()
 def linked_post_snapshot(direct_source, repository, source_config):
  return SnapshotDefinition()
  • 3.0.0
 @plugin.linked.post_snapshot()
 def linked_post_snapshot(direct_source, repository, source_config, optional_snapshot_parameters):
  return SnapshotDefinition()

Parameter Renamed in Staged Pre/Post-Snapshot Functions

The following parameter was renamed in the Staged Linked Source Pre-Snapshot and Staged Linked Source Post-Snapshot functions:

Previous Updated
snapshot_parameters optional_snapshot_parameters

What is affected

All staged plugins built with v2.1.0 or below will be affected.

How does it fail

dvp build will fail with the following error message if the parameter is not renamed from snapshot_parameters to optional_snapshot_parameters:

$ dvp build
Error: Named argument mismatch in method linked_post_snapshot. Expected: ['staged_source', 'repository', 'source_config', 'optional_snapshot_parameters'], Found: ['staged_source', 'repository', 'source_config', 'snapshot_parameters'].

0 Warning(s). 1 Error(s).

BUILD FAILED.

How to fix it

Rename snapshot_parameters to optional_snapshot_parameters in Staged Linked Source Pre-Snapshot and Staged Linked Source Post-Snapshot.

  • Previous releases
 @plugin.linked.post_snapshot()
 def linked_post_snapshot(staged_source, repository, source_config, snapshot_parameters):
  return SnapshotDefinition()
  • 3.0.0
 @plugin.linked.post_snapshot()
 def linked_post_snapshot(staged_source, repository, source_config, optional_snapshot_parameters):
  return SnapshotDefinition()