Record successful clean-clone persistence and lifecycle verification
Skeleton contracts / contracts (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
Checked source commit: d97571634f01c53db7a247beea837ab0baa7ab60
|
||||
|
||||
Isolated Compose project: mtusi-lab2-clean-eafa1442c7
|
||||
|
||||
$ make bootstrap check
|
||||
python3 scripts/bootstrap.py
|
||||
Local secrets ready (values hidden); .env and secrets/ are ignored by Git.
|
||||
python3 scripts/check_contract.py
|
||||
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
|
||||
|
||||
|
||||
$ docker compose --env-file .env build --no-cache api
|
||||
Compose can now delegate builds to bake for better performance.
|
||||
To do so, set COMPOSE_BAKE=true.
|
||||
#0 building with "desktop-linux" instance using docker driver
|
||||
|
||||
#1 [api internal] load build definition from Dockerfile
|
||||
#1 transferring dockerfile: 782B done
|
||||
#1 DONE 0.0s
|
||||
|
||||
#2 [api internal] load metadata for docker.io/library/golang:1.24.4-alpine3.22
|
||||
#2 DONE 1.2s
|
||||
|
||||
#3 [api internal] load metadata for docker.io/library/alpine:3.22.1
|
||||
#3 DONE 1.3s
|
||||
|
||||
#4 [api internal] load .dockerignore
|
||||
#4 transferring context: 196B done
|
||||
#4 DONE 0.0s
|
||||
|
||||
#5 [api build 1/7] FROM docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a
|
||||
#5 resolve docker.io/library/golang:1.24.4-alpine3.22@sha256:68932fa6d4d4059845c8f40ad7e654e626f3ebd3706eef7846f319293ab5cb7a done
|
||||
#5 DONE 0.0s
|
||||
|
||||
#6 [api build 2/7] WORKDIR /src
|
||||
#6 CACHED
|
||||
|
||||
#7 [api stage-2 1/3] FROM docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
||||
#7 resolve docker.io/library/alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1 done
|
||||
#7 CACHED
|
||||
|
||||
#8 [api internal] load build context
|
||||
#8 transferring context: 36.73kB done
|
||||
#8 DONE 0.0s
|
||||
|
||||
#9 [api build 3/7] COPY go.mod go.sum ./
|
||||
#9 DONE 0.0s
|
||||
|
||||
#10 [api stage-2 2/3] RUN addgroup -g 10001 app && adduser -D -u 10001 -G app app
|
||||
#10 DONE 0.2s
|
||||
|
||||
#11 [api build 4/7] RUN go mod download
|
||||
#11 DONE 4.9s
|
||||
|
||||
#12 [api build 5/7] COPY cmd/ ./cmd/
|
||||
#12 DONE 0.0s
|
||||
|
||||
#13 [api build 6/7] COPY internal/ ./internal/
|
||||
#13 DONE 0.0s
|
||||
|
||||
#14 [api build 7/7] RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/server
|
||||
#14 DONE 5.5s
|
||||
|
||||
#15 [api stage-2 3/3] COPY --from=build /out/messenger /usr/local/bin/messenger
|
||||
#15 DONE 0.0s
|
||||
|
||||
#16 [api] exporting to image
|
||||
#16 exporting layers
|
||||
#16 exporting layers 0.2s done
|
||||
#16 exporting manifest sha256:46704b7bea0f7970e05c1a0c247c1d7c96bcd3dc660a1606dba3e7392569c41e done
|
||||
#16 exporting config sha256:8587b3a10738f6330888de254d20bbdfa39462e209d8e4e648753a61d8f3bea7 done
|
||||
#16 exporting attestation manifest sha256:35924096a36ad76c3d37c696ba464685032b8323da6dafd34b59f5bb6e6b821d done
|
||||
#16 exporting manifest list sha256:7b6d6caf62f97901015cffb0aaebdf29c05cc1bbfa2c3bb6e6a664926246c7b8 done
|
||||
#16 naming to docker.io/library/mtusi-messenger:lab2 done
|
||||
#16 unpacking to docker.io/library/mtusi-messenger:lab2 0.0s done
|
||||
#16 DONE 0.3s
|
||||
|
||||
#17 [api] resolving provenance for metadata file
|
||||
#17 DONE 0.0s
|
||||
api Built
|
||||
|
||||
|
||||
$ docker compose --env-file .env up -d --wait api postgres valkey
|
||||
Network mtusi-lab2-clean-eafa1442c7_default Creating
|
||||
Network mtusi-lab2-clean-eafa1442c7_default Created
|
||||
Volume "mtusi-lab2-clean-eafa1442c7_postgres_data" Creating
|
||||
Volume "mtusi-lab2-clean-eafa1442c7_postgres_data" Created
|
||||
Volume "mtusi-lab2-clean-eafa1442c7_valkey_data" Creating
|
||||
Volume "mtusi-lab2-clean-eafa1442c7_valkey_data" Created
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Creating
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Creating
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Created
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Created
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Creating
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Created
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Starting
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Starting
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Started
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Started
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Waiting
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Healthy
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Starting
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Started
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Waiting
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Waiting
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Waiting
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Healthy
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Healthy
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Healthy
|
||||
|
||||
|
||||
$ docker compose port api 8080
|
||||
127.0.0.1:51634
|
||||
|
||||
|
||||
$ make test BASE_URL=http://127.0.0.1:51634
|
||||
python3 tests/smoke.py --base-url "http://127.0.0.1:51634"
|
||||
PASS: lab2 public API scenario; infrastructure and grading evidence remain separate.
|
||||
|
||||
|
||||
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh BASE_URL=http://127.0.0.1:51634
|
||||
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://127.0.0.1:51634"
|
||||
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
||||
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
||||
|
||||
|
||||
$ make test-docker BASE_URL=http://127.0.0.1:51634
|
||||
python3 student-tests/lifecycle.py --base-url "http://127.0.0.1:51634"
|
||||
PASS: non-root, SIGTERM, same-session recovery, log privacy
|
||||
|
||||
|
||||
PASS: committed clean clone, uncached image, fresh volumes, smoke, full restart, lifecycle
|
||||
|
||||
$ docker compose --env-file .env down --volumes
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Stopping
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Stopped
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Removing
|
||||
Container mtusi-lab2-clean-eafa1442c7-api-1 Removed
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Stopping
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Stopping
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Stopped
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Removing
|
||||
Container mtusi-lab2-clean-eafa1442c7-postgres-1 Removed
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Stopped
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Removing
|
||||
Container mtusi-lab2-clean-eafa1442c7-valkey-1 Removed
|
||||
Volume mtusi-lab2-clean-eafa1442c7_valkey_data Removing
|
||||
Volume mtusi-lab2-clean-eafa1442c7_postgres_data Removing
|
||||
Network mtusi-lab2-clean-eafa1442c7_default Removing
|
||||
Volume mtusi-lab2-clean-eafa1442c7_valkey_data Removed
|
||||
Volume mtusi-lab2-clean-eafa1442c7_postgres_data Removed
|
||||
Network mtusi-lab2-clean-eafa1442c7_default Removed
|
||||
|
||||
Reference in New Issue
Block a user