You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spec allows for executing a stateless custom action when a bundle is not installed.
The stateless field indicates that the runtime will bypass credentials requirements (the user MAY or MAY NOT pass any credentials), and will not keep track of this action. If credentials are supplied, the runtime SHOULD pass the credentials to the invocation image (as in stateful actions). An invocation image MAY exit with an error if the necessary credentials are not supplied. However, the runtime MUST NOT fail to invoke the invocation image because of missing credentials.
The primary intention of a stateless action is to allow invocation bundles to provide dry-run or detailed help functionalities. Stateless actions can be invoked on a non-existing installation. In this case, the name passed to the runtime need not exist, and MUST not result in the creation of a name record. Runtimes MAY ignore name if supplied.
However cnab-go is currently written to want a claim:
Allow running custom actions when there isn't a claim.
If the custom action is stateless, at the end of the action, a claim should not be persisted. Otherwise a claim should be persisted.
upgrade still requires install to be run first.
Since there is uncertainty about changing cnab-go's design (see related issues below), for this issue, let's workaround it's current design in Porter for now.
The spec allows for executing a stateless custom action when a bundle is not installed.
However cnab-go is currently written to want a claim:
https://github.com/cnabio/cnab-go/blob/2fdc546bd3c7400a68b251c79831097fc1500c4d/action/run_custom.go#L30
Let's update Porter to make it work!
See related discussions in duffle-land
The text was updated successfully, but these errors were encountered: