-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Action rollback proposal #83
Conversation
3205ead
to
3152d23
Compare
I like the standalone property because it simplifies a lot but at the same time, it makes it more complicated and somehow I have a feeling that we will have a problem with it. We need to define really nice roles for that, could you group all rules in one place for standalone and rollback fields? Currently, those rules are defined in different places across the whole document. It will be good to group them together |
A few additional thoughts after F2F discussion with Paweł:
|
Here are my notes from the f2f discussion - to merge with comment above TODO:
|
fa628a7
to
200a456
Compare
aa0bd8a
to
1bd40cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I'm not sure about the Rollback CR that duplicates the logic of Action CR. In the New Rollback Controller I mentioned that maybe it should be done as sequentially triggered a set of Actions. So the Rollback CR is more like a trigger for rollback Action(s).
-
What about the data that is created by the given runner, when and how this will be deleted? For example, ArgoWorkflow CR created during install/upgrade. Now it is connected with the Action CR, so the Rollback CR controller should remove the Action CR from the creation phase? Also, when the Rollback CR will be removed? Are we going to keep them with some retention policy as helm does with history?
-
We have the workflows e.g. Jira install that consists of many sub-implementations e.g. PostgreSQL install which produce the output artifacts but because we flat the workflow then the Jira workflow has the last step which uploads the artifacts to the OCH and then they become TypeInstances.
How do we want to set the rollbackActionRef properly? I see two option, one that the PostgreSQL install needs to return already properly formatted TypeInstance, the second such
rollbackActionRef
we treat as the metadata, and it’s computed by engine.
This sounds as a good idea. I can mention that in the proposal.
I think for now we can treat the Action CR with install/update workflows as something, which has been run back in time. Tl;dr I wouldn't do anything about it for now.
As I wrote in the
From my perspective it should be computed by Engine. Based on TypeInstance names, Engine knows which Action produced a given output TypeInstance. So I would assume this would be a part of rendering of the last step in workflow which uploads TypeInstances. Engine could pass the metadata there. What do you think? |
233939f
to
cb6a1e6
Compare
could be tricky to do, but reduce the boilerplate so +1
But in the future we should go back and revisit that decision, also we should probably ask @platten if this is fine. I know that storing a lot of Action CR could decrease our performance as we also have Informers for them. Maybe we can add some labels e.g. "archived" so we could exclude them from watching? |
Agree, I will prepare a new task for that. |
5d716b6
to
9505902
Compare
9505902
to
b822e3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, although in the first reading the word ancestor
was a bit counterintuitive, as I implicitly assumed the usedBy
relationship in the dependency tree. Could you add a remark, that the dependency tree is built using the uses
relationship?
In fact, the rollback Action must take TypeInstances dependency subtree as input. Currently there is no way to specify | ||
something like this in Interface, and any change to allow that seems to be not necessary. | ||
|
||
- Interface is just additional boilerplate, as it is not generic, but Implementation-specific. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's true also for upgrades or for any other action which modifies already deployed action. Or am I wrong here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For upgrade or modification of any existing TypeInstances the Interfaces usually make sense, as they base on generic TypeInstances. For example, creating database inside PostgreSQL instance can be totally generic. Or creating user in the DB.
Of course there could some cases where we need to define an Interface, which is more tied to a given Implementation output (TypeInstances). But Rollback is always Implementation-specific thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed, LGTM. Nice work!
I updated the PR with @Trojan295 suggestion to clarify what is descendant and ancestor in TypeInstance tree. Essentially I added just one sentence to the "Remarks" section:
I also made sure the whole document is well formatted and the ToC is up to date. As it doesn't have any impact on the proposal itself, I'm merging it without re-review. |
Description
Changes proposed in this pull request: