Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Orquesta workflow: Saving the definition again results in dup key error #274

Open
m4dcoder opened this issue Mar 11, 2019 · 6 comments
Open

Comments

@m4dcoder
Copy link
Contributor

I modified the workflow metadata (try something different on the input parameter) and tried to save the workflow again. st2flow returns a DB error saying the workflow already exists.

@bmomberger-bitovi
Copy link
Contributor

Saw this happen once but am having trouble replicating. @m4dcoder if you can replicate, please post the steps.

@LindsayHill
Copy link
Contributor

Here's steps from Nick:

  • Go to Actions tab
  • Select a pack that you want to put your new workflow in
  • Press the + button
  • When EWC comes up, fill out the Name and Entry Point fields
  • Click Save
  • Edit the Description field
  • Click Save
  • Error Error saving workflow.: Tried to save duplicate unique keys (E11000 duplicate key error collection: st2.action_d_b index: uid_1 dup key: { : "action:default:nicktest3" })

Have not tested this myself

@blourdel
Copy link

I can replicate it relatively easily myself:

Select a pack that you want to put your new workflow in
Press the + button
When EWC comes up, fill out the Name and Entry Point fields
Click Save
Add a few actions and link them in a sequence
Click Save

Error saving workflow.: Tried to save duplicate unique keys (E11000 duplicate key error collection: st2.action_d_b index: uid_1 dup key: { : "action:training:sequence1" })

I can provide a system in a faulty state if needed.

@Kami
Copy link
Member

Kami commented Apr 29, 2019

This was fixed in v3.0.0, but not 100%.

There is still a race / edge case if you click save button twice in quick succession before workflow gets saved and actions re fetched. See #355 (comment) for details.

Which version are you using?

@blourdel
Copy link

blourdel commented Apr 29, 2019

I am using st2 3.0dev (2f5fa9b), on Python 2.7.12

Compared to #355 : in my case I did not act quickly and once you are in trouble the only workaround is to save under a different name.

@Kami
Copy link
Member

Kami commented Apr 29, 2019

It looks like you are using old version (2f5fa9b is 13 days old and doesn't include fixes we made for v3.0.0 mid to late last week (you can also confirm st2flow package version by doing dpkg -l |grep st2flow).

Please try upgrading - v3.0.0 stable is now out so you can directly upgrade to latest enterprise stable packages.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants