-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow preview even if no Dockefile inline and location are not defined #103
base: main
Are you sure you want to change the base?
Allow preview even if no Dockefile inline and location are not defined #103
Conversation
PR is now waiting for a maintainer to run the acceptance tests. |
96acb8d
to
c4b2c1a
Compare
PR is now waiting for a maintainer to run the acceptance tests. |
When using `dockerfile.inline` parameter, we would use "future" reference of something that has not already been computed during the preview stage. In this case, `dockefile.location` and `dockerfile.infile` can be empty but can be available during the processing stage. Signed-off-by: Alexandre Nicolaie <alexandre.nicolaie@radiofrance.com>
c4b2c1a
to
19d6575
Compare
PR is now waiting for a maintainer to run the acceptance tests. |
/run-acceptance-tests |
Please view the PR build: https://github.com/pulumi/pulumi-docker-build/actions/runs/9619398072 |
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.
The upgrade test, which runs the new code against some pre-recorded state (specifically these examples) is failing due to unexpected changes to some Dockerfile/Context properties.
go test -count 1 -tags=all -run TestYAMLExampleUpgrade/upgrade-quick ./examples/...
upgrade.go:378: Replayed Diff on urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline
...
Error: Not equal:
expected: "\"DIFF_NONE\""
actual : "\"DIFF_SOME\""
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-"DIFF_NONE"
+"DIFF_SOME"
Test: TestYAMLExampleUpgrade/upgrade-quick
Messages: at #["changes"]
json_match.go:138: [#["detailedDiff"]] unexpected value {
"contextHash": {
"kind": "UPDATE"
},
"dockerfile": {
"kind": "UPDATE"
}
}
json_match.go:138: [#["diffs"]] unexpected value [
"dockerfile",
"contextHash"
]
This tests upgrading starting from v0.0.1 of the provider, which is probably more aggressive than necessary since we essentially launched with v0.0.2. But we can also confirm this introduces some unexpected changes when run against the current v0.0.3:
pulumi:pulumi:Stack: (same)
[urn=urn:pulumi:dev::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-dev]
~ docker-build:index:Image: (update)
[id=inline]
[urn=urn:pulumi:dev::provider-docker-build::docker-build:index:Image::inline]
~ context : {
~ location: "./app" => "."
}
- contextHash: "36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec"
So our preview thinks we need to drop our context location when the Dockerfile is inline.
All that to say this unfortunately doesn't seem backwards-compatible -- which is unfortunate because I'm really eager to see what other kinds of inline workflows people come up with!
Based on your comment #96 (comment) it sounds like you understand the limitations, and I also agree it would probably be best to put this on hold until pulumi-go-provider can give us a little more information to distinguish unknown vs. missing values.
For my personal use, I will keep a fork with my patch because I know what the limitations are, but otherwise I propose to wait until the issue in question is resolved.
👍
When using the
dockerfile.inline
parameter, we use a "future" reference to something that has not yet been computed during the preview stage.In this case,
dockefile.location
anddockerfile.infile
may be empty but will be available during the processing stage. Fixes #96.