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

Dependencies V2 Playground #2099

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft

Conversation

carolynvs
Copy link
Member

This is just where I'm trying out how we could implement advanced dependencies scenarios pep, which would be v2 of the CNAB dependencies extension.

Right now I'm working on getting Porter set up so that we can hide this behind a feature flag so that we can incrementally work on it before v1 releases.

@getporterbot getporterbot added this to In Progress in Porter and Mixins May 25, 2022
@carolynvs carolynvs force-pushed the dependencies-v2 branch 2 times, most recently from a0c3603 to 58dc1e8 Compare May 31, 2022 19:54
@carolynvs carolynvs added the playground 🙈 Pull request to try stuff out and see if it builds. Don't look! label Jun 30, 2022
@carolynvs carolynvs added the pep003-advanced-dependencies Implementation of the Advanced Dependencies proposal label Jul 5, 2022
@carolynvs carolynvs force-pushed the dependencies-v2 branch 3 times, most recently from 63215d9 to 2bb25ad Compare September 1, 2022 02:33
@carolynvs carolynvs changed the base branch from release/v1 to main October 25, 2022 18:14
@carolynvs carolynvs force-pushed the dependencies-v2 branch 2 times, most recently from bb1397e to 924fb4a Compare November 14, 2022 23:16
@carolynvs carolynvs force-pushed the dependencies-v2 branch 4 times, most recently from 5f004f5 to 2fe2c7f Compare December 24, 2022 05:20
This adds support for the dependencies-v2 experimental flag when building a bundle.

* Add dependency v2 fields to the porter.yaml manifest
* Represent v2 deps in the bundle.json
* Determine which dependency extension is used by a bundle
* Have separate packages for the dependencies v2 cnab extension, and its implementation
* Consolidate extensions definition into a single file
* Match file names to contained structs in pkg/cnab

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
The name field for a dependency is not in the spec because CNAB represents a dependency as a map entry, keyed by name. We use a name internally just to make things easier while working with dependency entries but they shouldn't be written out with a name field.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
mybuns = a test bundle that contains as many features / test cases we can squeeze into a bundle, without making a bunch of paramters required so that it's easy to run. Long term I want to remove dependencies from this bundle though and switch to using a new set of bundles just for dependencies.

myenv = a metabundle that is comprised of its dependencies. Has a deep dependency graph.
myinfra = a bundle that creates infrastructure and generates outputs that parent bundles would want to consume.
myapp = a bundle that deploys an application and requires a db connection string
mydb = a leaf bundle that creates a db and outputs a connection string

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
* resolve a dependency graph
* identify the order of execution
* create new call path to execute bundles from a workflow (i.e. jobs)
* Add secret strategy for resolving data from the workflow
* Support workflow wiring

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>

wip: porter strategy

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
…wrong format still

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
This should ideally go into the open PR

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
…igure it out

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Add a DisplayWorkflow structure that can represent a workflow and also remove non-user settable fields so that we can dump our plans without including status, ids, etc.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
* hacks to force rebuild test bundles
* porter secret store isn't implemented. Is that hiding on a branch somewhere?

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
…a should match then

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
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 playground 🙈 Pull request to try stuff out and see if it builds. Don't look!
Projects
Porter and Mixins
  
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

1 participant