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
It looks like we only execute the Docker build during previews when the target repository is actually available. If it isn't, the Docker build is skipped. This means that you might not find a Docker build error during previews until after the repository actually exists.
$ pulumi up
Previewing update (dev):
Type Name Plan
+ pulumi:pulumi:Stack docker-pac-dev create
+ └─ awsx:ecr:Repository repo create
+ ├─ aws:ecr:Repository repo create
+ └─ aws:ecr:LifecyclePolicy repo create
Resources:
+ 4 to create
Do you want to perform this update? yes
Updating (dev):
Type Name Status Info
+ pulumi:pulumi:Stack docker-pac-dev created
+ └─ awsx:ecr:Repository repo **creating failed** 2 errors
+ ├─ aws:ecr:Repository repo created
+ └─ aws:ecr:LifecyclePolicy repo created
Diagnostics:
awsx:ecr:Repository (repo):
error: COPY failed: stat /var/lib/docker/tmp/docker-builder041295080/Xindex.html: no such file or directory
error: Error: ' docker build ./app -t 12fda807-container' failed with exit code 1
Sending build context to Docker daemon 3.072kB
Step 1/2 : FROM nginx
---> 62c261073ecf
Step 2/2 : COPY Xindex.html /usr/share/nginx/html
at /Users/joeduffy/temp/docker-pac/node_modules/@pulumi/docker.ts:546:15
at Generator.next (<anonymous>)
at fulfilled (/Users/joeduffy/temp/docker-pac/node_modules/@pulumi/docker/docker.js:18:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
Resources:
+ 4 created
Duration: 7s
Permalink: https://app.pulumi.com/joeduffy/docker-pac/dev/updates/3
$ pulumi up
Previewing update (dev):
Type Name Plan Info
pulumi:pulumi:Stack docker-pac-dev
└─ awsx:ecr:Repository repo 2 errors
Diagnostics:
awsx:ecr:Repository (repo):
error: COPY failed: stat /var/lib/docker/tmp/docker-builder424369959/Xindex.html: no such file or directory
error: Error: ' docker build ./app -t 12fda807-container' failed with exit code 1
Sending build context to Docker daemon 3.072kB
Step 1/2 : FROM nginx
---> 62c261073ecf
Step 2/2 : COPY Xindex.html /usr/share/nginx/html
at /Users/joeduffy/temp/docker-pac/node_modules/@pulumi/docker.ts:546:15
at Generator.next (<anonymous>)
at fulfilled (/Users/joeduffy/temp/docker-pac/node_modules/@pulumi/docker/docker.js:18:58)
Notice:
The first preview succeeded fine (and apparently didn't run docker build).
The actual update then failed, when the docker build ran.
The second preview failed (because it did run docker build -- unlike the first preview).
I assume the build is somehow conditional on an output variable being available during preview. I would have expected, and appreciated, both previews failing -- or at least being consistent.
The text was updated successfully, but these errors were encountered:
Using a more recent program with awsx: 1.0.2, preview does run docker build each time and the invalid Dockerfile is caught on preview. The failure occurs consistenly.
import * as awsx from "@pulumi/awsx";
const repository = new awsx.ecr.Repository("repository", { forceDelete: true });
export const image = new awsx.ecr.Image("image", {
repositoryUrl: repository.repository.repositoryUrl,
path: "./app",
}).imageUri;
I will make a note that as the version of the docker provider within awsx is updated to consume v4, this scenario should be validated again during testing.
It looks like we only execute the Docker build during previews when the target repository is actually available. If it isn't, the Docker build is skipped. This means that you might not find a Docker build error during previews until after the repository actually exists.
For instance, consider a simple program:
with an intentionally broken
Dockerfile
:Now observe the following sequence of updates:
Notice:
docker build
).docker build
ran.docker build
-- unlike the first preview).I assume the build is somehow conditional on an output variable being available during preview. I would have expected, and appreciated, both previews failing -- or at least being consistent.
The text was updated successfully, but these errors were encountered: