Skip to content
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

Execute bundle from a pre-computed Run #2722

Closed
wants to merge 2 commits into from

Conversation

carolynvs
Copy link
Member

@carolynvs carolynvs commented Apr 12, 2023

What does this change

Update our CNAB runtime implementation to accept a pre-computed Run, which may have already been persisted in a pending state. We now execute it as defined and have moved more of the logic for how the bundle should be executed out of the runtime. This allows us to generate the runs ahead of time, store them on a workflow, and execute later.

What issue does it fix

Closes #2732

Notes for the reviewer

I have carved out in the runtime where we should do JIT resolution of parameters and credentials. Credentials have always been resolved JIT, but parameters are still being resolved earlier. The rest of the fix will come in a follow-up PR for #2698

I am moving away from using intermediate representations of resolved credentials and parameters in favor of using the existing field on parameter/credential sets that store the resolved value. In a follow-up PR (this was too big to include), I complete the switch over so that we delay resolution as much as possible and avoid excessive type conversions from string to the typed value (e.g. "3" -> 3).

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

@carolynvs carolynvs changed the title Add run to action args Execute bundle from a pre-computed Run Apr 12, 2023
@carolynvs carolynvs added the pep003-advanced-dependencies Implementation of the Advanced Dependencies proposal label Apr 14, 2023
The Custom field is an artifact of how this structure _used_ to store CNAB claims when we originally copied it over from cnab-go. It has bnever been used to store data and is unused. I'm removing it to reduce confusion.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Update our CNAB runtime implementation to accept a pre-computed Run, which may have already been persisted in a pending state. We now execute it as defined and have moved more of the logic for how the bundle should be executed out of the runtime. This allows us to generate the runs ahead of time, store them on a workflow, and execute later.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
kichristensen added a commit to kichristensen/porter that referenced this pull request Mar 31, 2024
Signed-off-by: Kim Christensen <kimworking@gmail.com>
schristoff pushed a commit that referenced this pull request Apr 29, 2024
"Merge" the changes from Carolyns PR #2722

Signed-off-by: Kim Christensen <kimworking@gmail.com>
@kichristensen
Copy link
Contributor

Implemented in #3051

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pep003-advanced-dependencies Implementation of the Advanced Dependencies proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Execute a bundle from a pre-computed Run
2 participants