Skip to content

Redundant variable set snapshots can be created #9818

@benPearce1

Description

@benPearce1

Severity

Not blocking except on extremely busy istances

Version

2022.*

Latest Version

I could reproduce the problem in the latest build

What happened?

When creating a runbook snapshot or a release with a library variable set connected to the project, previous copies of the variable set snapshot can be ignored and new ones are created with the same version number.

Reproduction

Create a project, with a runbook, and a library variable set in one space.
Add a variable to the LVS
Include the variable set in the project.
In the runbook add a step and run the runbook.

In a second space create a project with a different name, and a library variable set with the same name as the first one.
Include the LVS in the project.
Add a variable value to the LVS.
In the second space export the project using the Project Export function from the Dashboard

In the first space, use the Import Project function from the Dashboard.
Select the second space and the export task
Run the import.

Now run the runbook two more times.

Error and Stacktrace

More Information

Compare the value in the LibraryVariableSetSnapshotIds for each of the snapshots for the last two runbook runs, since the variable set didn't change between them the variable set id should be the same, but they will most likely be different but contain the save version number in the Id (the -s-123- portion of the ID).
This is easiest done by inspecting the response values in the browser dev tools for the call to /api/<space-id>/runbookSnapshots/<runbooksnapshot-id>.

The underlying cause is the import operation is updating the contents of the variable set but not incrementing the version number. Under most circumstances this results in infinite copies of the variable set snapshot being created. The one scenario where duplicates might be avoided is when the randomly generated suffix on the end of the variables set Id is low in ascending order (such as starts with a zero, variableset-LibraryVariableSets-181-s-7-06DXY).

Workaround

Perform a update to the affected variable set to increment the version number on the variable set.

Metadata

Metadata

Assignees

Labels

kind/bugThis issue represents a verified problem we are committed to solving

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions