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

Shared Dependencies: the LOGIC #2940

Merged
merged 46 commits into from Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
da807ac
first pass of moving logic into extendedbundle
schristoff Sep 29, 2023
7bd5e56
refried bean candle
schristoff Oct 9, 2023
868bc57
if installation is found logic
schristoff Oct 9, 2023
4255504
basic logic done?
schristoff Oct 9, 2023
e0f95f1
still need to connect up params and creds, clean up mess, finish tests
schristoff Oct 19, 2023
cb0a29c
Merge branch 'main' into schristoff_depsresolvelogic
schristoff Oct 19, 2023
65e18d0
It was at this point I realized that my implementation is wrong :(
schristoff Oct 22, 2023
c1b72d8
Create executev2, and we're going to have to refactor execute normal …
schristoff Oct 22, 2023
967e3e7
okay a little bit prettier now
schristoff Oct 23, 2023
d6ee7f1
need to get integ working, but executev2 looks... ok?
schristoff Oct 23, 2023
337eb29
delete bundles-with-shared-deps
schristoff Oct 23, 2023
b0476d5
root wp bundle is failing
schristoff Oct 23, 2023
e3dfbeb
oh i was double copying
schristoff Oct 23, 2023
14d3d3f
failed to solve process /bin/sh -c apt-get update && apt get install …
schristoff Nov 10, 2023
3dcfca5
Removed 12 out of the 20 cping of the same dir. This integ test needs…
schristoff Nov 22, 2023
45751c3
error pulling dependency: unable to pull bundle: failed to resolve bu…
schristoff Nov 25, 2023
1c9d11d
forward progress
schristoff Nov 28, 2023
d8e0768
and it was all yellow
schristoff Nov 28, 2023
c5fd64b
turn in to something beautiful 🦋
schristoff Nov 28, 2023
74be873
you know i know you so <3
schristoff Nov 28, 2023
da90ff0
coldplay commits is a sign for bed 😑
schristoff Nov 28, 2023
f731b96
Look how they shine for you, and all the code that youuu miss ✨
schristoff Nov 28, 2023
0288257
Merge branch 'main' into schristoff_depsresolvelogic
schristoff Nov 28, 2023
3cfb6fb
install works, actual magic. bug is in uninstall now :(
schristoff Dec 3, 2023
2890b66
test didnt error? it just says ok? what does it mean??
schristoff Dec 3, 2023
97764e4
fix failing unit, we should only do stuff with shared parentless deps…
schristoff Dec 4, 2023
049e220
i think... its solid?
schristoff Dec 4, 2023
da9ddba
fix the old deps test
schristoff Dec 5, 2023
8a48525
weird integ fail
schristoff Dec 5, 2023
1025c60
ado plz
schristoff Dec 5, 2023
7e6908a
ADOnt work
schristoff Dec 5, 2023
1a352ff
Update pkg/cnab/extended_bundle.go
schristoff Dec 5, 2023
3a07f9f
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
1c290f6
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
6db3301
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
b0f14b1
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
9b3a652
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
542e670
Merge branch 'main' into schristoff_depsresolvelogic
schristoff Dec 5, 2023
d0a8a29
upgrade
schristoff Dec 5, 2023
059d1d4
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
7fa5ca0
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
3e041d6
Update docs/content/docs/development/authoring-a-bundle/working-with-…
schristoff Dec 5, 2023
c9a5a62
better error
schristoff Dec 5, 2023
6685c58
what is dependening
schristoff Dec 5, 2023
95fca4f
make doc make sense
schristoff Dec 5, 2023
b10deda
update mysql version everywhere
schristoff Dec 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/testdata/bundles/mysql/porter.yaml
@@ -1,6 +1,6 @@
schemaVersion: 1.0.0
schemaVersion: 1.0.1
name: mysql
version: 0.1.4
version: 0.1.0
registry: "localhost:5000"

mixins:
Expand Down
24 changes: 12 additions & 12 deletions build/testdata/bundles/wordpress/porter.yaml
@@ -1,4 +1,4 @@
schemaVersion: 1.0.0
schemaVersion: 1.0.1
name: wordpress
version: 0.1.4
registry: "localhost:5000"
Expand All @@ -14,7 +14,7 @@ dependencies:
requires:
- name: mysql
bundle:
reference: localhost:5000/mysql:v0.1.4
reference: localhost:5000/mysql:v0.1.0
parameters:
schristoff marked this conversation as resolved.
Show resolved Hide resolved
database-name: wordpress
mysql-user: wordpress
Expand Down Expand Up @@ -64,13 +64,13 @@ uninstall:
arguments:
- uninstalled

outputs:
- name: wordpress-password
description: "The Wordpress installation password"
type: string
default: "default-password"
applyTo:
- "install"
- "upgrade"
sensitive: true
path: /cnab/app/outputs/wordpress-password
# outputs:
# - name: wordpress-password
schristoff marked this conversation as resolved.
Show resolved Hide resolved
# description: "The Wordpress installation password"
# type: string
# default: "default-password"
# applyTo:
# - "install"
# - "upgrade"
# sensitive: true
# path: /cnab/app/outputs/wordpress-password
2 changes: 2 additions & 0 deletions build/testdata/bundles/wordpressv2/.gitignore
@@ -0,0 +1,2 @@
Dockerfile
.cnab
14 changes: 14 additions & 0 deletions build/testdata/bundles/wordpressv2/helpers.sh
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

install() {
mkdir -p /cnab/app/outputs
echo "topsecret-blog" >> /cnab/app/outputs/wordpress-password
}

ping() {
echo ping
}

# Call the requested function and pass the arguments as-is
"$@"
80 changes: 80 additions & 0 deletions build/testdata/bundles/wordpressv2/porter.yaml
@@ -0,0 +1,80 @@
schemaVersion: 1.1.0
name: wordpress
version: 0.1.4
registry: "localhost:5000"

mixins:
- exec
- helm3:
repositories:
bitnami:
url: "https://charts.bitnami.com/bitnami"

dependencies:
requires:
- name: mysql
bundle:
reference: localhost:5000/mysql:v0.1.0
sharing:
mode: true
group:
name: myapp
parameters:
database-name: wordpress
mysql-user: wordpress
namespace: wordpress

credentials:
- name: kubeconfig
path: /home/nonroot/.kube/config

parameters:
- name: wordpress-name
type: string
default: porter-ci-wordpress
env: WORDPRESS_NAME
- name: wordpress-password
type: string
sensitive: true
applyTo:
- install
- upgrade
- name: namespace
type: string
default: 'wordpress'

install:
- exec:
command: ./helpers.sh
arguments:
- install

upgrade:
- exec:
command: ./helpers.sh
arguments:
- install

ping:
- exec:
description: "Ping"
command: ./helpers.sh
arguments:
- ping

uninstall:
- exec:
command: echo
arguments:
- uninstalled

outputs:
- name: wordpress-password
description: "The Wordpress installation password"
type: string
default: "default-password"
applyTo:
- "install"
- "upgrade"
sensitive: true
path: /cnab/app/outputs/wordpress-password
2 changes: 1 addition & 1 deletion pkg/cnab/config-adapter/adapter_test.go
Expand Up @@ -676,7 +676,7 @@ func TestManifestConverter_generateDependenciesv2(t *testing.T) {
},
},
Sharing: depsv2ext.SharingCriteria{
Mode: depsv2ext.SharingModeGroup,
Mode: true,
Group: depsv2ext.SharingGroup{Name: "myapp"},
},
Parameters: map[string]string{
Expand Down
Expand Up @@ -453,7 +453,6 @@
"db": {
"bundle": "localhost:5000/mydb:v0.1.0",
"sharing": {
"mode": "group",
"group": {}
},
"parameters": {
Expand Down
2 changes: 0 additions & 2 deletions pkg/cnab/dependencies/v1/doc.go
schristoff marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

10 changes: 0 additions & 10 deletions pkg/cnab/dependencies/v1/installations.go

This file was deleted.

117 changes: 0 additions & 117 deletions pkg/cnab/dependencies/v1/solver.go

This file was deleted.

100 changes: 0 additions & 100 deletions pkg/cnab/dependencies/v1/solver_test.go

This file was deleted.