-
Notifications
You must be signed in to change notification settings - Fork 212
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
persist run record for custom actions that produce outputs #2291
Conversation
Signed-off-by: Yingrong Zhao <[email protected]>
Signed-off-by: Yingrong Zhao <[email protected]>
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.
Looks good! The docs just need a few edits and it's ready to go 👍
stateless: true | ||
modifies: false | ||
|
||
getLicense: |
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.
Are you trying to demonstrate that this action will be recorded? It's a bit unclear for this example why you are including an output but then not discussing how actions that generate outputs are recorded.
Maybe split this into two custom actions? Keep myhelp as it was, and then add the getLicense one too, along with a bundle output defined so that you can explain why one is recorded and the other one isn't?
|
||
* `description`: Description of the action. | ||
* `stateless`: Indicates that the action is purely informational, that credentials are not required, | ||
and that Porter should not keep track of when this action was last executed. | ||
* `stateless`: Indicates that the action is purely informational and can be executed before the install action runs. It also,means that credentials are not required, and that Porter should not keep track of when this action was last executed. |
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.
* `stateless`: Indicates that the action is purely informational and can be executed before the install action runs. It also,means that credentials are not required, and that Porter should not keep track of when this action was last executed. | |
* `stateless`: Indicates that the action is purely informational and can be executed before the install action runs. |
Now that the logic for when a run should be persisted is more complicated, this sentence is confusing since it doesn't address it fully. How about explaining it only once next to the above example? "Porter will record a run when the action modifies resources, is not stateless, or generates an output."
Signed-off-by: Yingrong Zhao <[email protected]>
What does this change
When a custom action that does not modify bundle resources and is stateless, its run should be recorded in the database if the action produce any outputs.
This PR implements this behavior.
What issue does it fix
Closes #1980
Notes for the reviewer
Checklist
Reviewer Checklist