Google Professional Cloud Developer Practice Test 32
Question 310
A cloud pipeline uploads an image before running the tests that should block an invalid release. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Use a supported minimal trusted base and non-root execution where practical, without removing required runtime assets.
- Roll out features through controlled identities and verify both states before exposing real users.
- Use Cloud Build steps that test source before building and publishing the approved container artifact.
- Run independent checks in parallel only when publish and deploy steps still depend on all required PASS outcomes.
Explanation
Correct Answer
C:Use Cloud Build steps that test source before building and publishing the approved container artifact. In this scenario, a cloud pipeline uploads an image before running the tests that should block an invalid release. Before rollout, inspect build steps, image artifact outputs, stage dependencies, and failure propagation.
Incorrect Answers
A:Use a supported minimal trusted base and non-root execution where practical, without removing required runtime assets. This design addresses non-root minimal container runtime, where least-privilege container identity and reduced packages narrow the impact of a compromised application process. Applying it first would leave cloud build container pipeline steps unresolved.
B:Roll out features through controlled identities and verify both states before exposing real users. This design addresses feature-flag regression testing, where feature flags separate code deployment from feature exposure, but untested flag branches can still create production failures. Applying it first would leave cloud build container pipeline steps unresolved.
D:Run independent checks in parallel only when publish and deploy steps still depend on all required PASS outcomes. For this case, a build pipeline must explicitly encode its ordering and failure gates; saving a Dockerfile alone does not enforce release quality. Applying it first would leave cloud build container pipeline steps unresolved.
Question 311
A cloud pipeline uploads an image before running the tests that should block an invalid release. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Add automated flag-on and flag-off tests, then validate a small authorized cohort with immediate rollback capability.
- Enable provenance generation in an approved Cloud Build workflow and verify its source-to-image linkage.
- Run old and new client fixtures against tagged revisions and reject a release that breaks the approved contract.
- Create versioned build configuration with ordered test, image build, and Artifact Registry push stages.
Explanation
Correct Answer
D:Create versioned build configuration with ordered test, image build, and Artifact Registry push stages. In this scenario, a cloud pipeline uploads an image before running the tests that should block an invalid release. Validate the change by checking that failed tests prevent promotion and successful builds identify an exact source revision and image digest.
Incorrect Answers
A:Add automated flag-on and flag-off tests, then validate a small authorized cohort with immediate rollback capability. This action changes a different concern, feature-flag regression testing. That may help elsewhere, but it does not make the change required for cloud build container pipeline steps.
B:Enable provenance generation in an approved Cloud Build workflow and verify its source-to-image linkage. This action changes a different concern, SLSA and build provenance evidence. That may help elsewhere, but it does not make the change required for cloud build container pipeline steps.
C:Run old and new client fixtures against tagged revisions and reject a release that breaks the approved contract. This action changes a different concern, Cloud Run HTTP API contract tests. That may help elsewhere, but it does not make the change required for cloud build container pipeline steps.
Question 312
A cloud pipeline uploads an image before running the tests that should block an invalid release. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Only images carrying the expected evidence satisfy the admission policy; arbitrary tags do not bypass the gate.
- Failed tests prevent promotion and successful builds identify an exact source revision and image digest.
- Only changes matching the documented release conditions initiate the expected pipeline.
- Interface regressions are caught before production without claiming emulators prove every IAM, quota, or availability condition.
Explanation
Correct Answer
B:Failed tests prevent promotion and successful builds identify an exact source revision and image digest. In this scenario, a cloud pipeline uploads an image before running the tests that should block an invalid release. The original diagnosis should have included this step: inspect build steps, image artifact outputs, stage dependencies, and failure propagation.
Incorrect Answers
A:Only images carrying the expected evidence satisfy the admission policy; arbitrary tags do not bypass the gate. That result could support testing of binary Authorization attestations in CI: Binary Authorization requires digest-specific trust evidence and an enforcement policy, not just an assertion that a build succeeded. A more direct response is to recognize that failed tests prevent promotion and successful builds identify an exact source revision and image digest.
C:Only changes matching the documented release conditions initiate the expected pipeline. A more direct response is to recognize that failed tests prevent promotion and successful builds identify an exact source revision and image digest.
D:Interface regressions are caught before production without claiming emulators prove every IAM, quota, or availability condition. That result could support testing of integration testing with service emulators: Service emulators exercise protocol and data behavior but do not eliminate the need for selective production-like integration checks. A more direct response is to recognize that failed tests prevent promotion and successful builds identify an exact source revision and image digest.
Question 313
An incident team tries to roll back production to the tag latest but the tag now resolves to a different image. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect local image build triggers, Kubernetes manifests, cluster target, and development synchronization settings.
- Inspect repository review policy, branch protections, required checks, and deployment-to-commit mapping.
- Inspect build steps, image artifact outputs, stage dependencies, and failure propagation.
- Inspect image digests, mutable tags, build provenance, and the image reference used by each deployment.
Explanation
Correct Answer
D:Inspect image digests, mutable tags, build provenance, and the image reference used by each deployment. This checks the actual operating conditions relevant to artifact Registry image digest reproducibility, rather than changing a service before the failure is understood.
Incorrect Answers
A:Inspect local image build triggers, Kubernetes manifests, cluster target, and development synchronization settings. Cloud Code and Skaffold can streamline iterative container development but must be scoped to the correct cluster and configuration profile. To examine the reported mechanism, the team instead needs to inspect image digests, mutable tags, build provenance, and the image reference used by each deployment.
B:Inspect repository review policy, branch protections, required checks, and deployment-to-commit mapping. Source-control governance and traceable commits protect the integrity of the software delivery pipeline. To examine the reported mechanism, the team instead needs to inspect image digests, mutable tags, build provenance, and the image reference used by each deployment.
C:Inspect build steps, image artifact outputs, stage dependencies, and failure propagation. A build pipeline must explicitly encode its ordering and failure gates; saving a Dockerfile alone does not enforce release quality. To examine the reported mechanism, the team instead needs to inspect image digests, mutable tags, build provenance, and the image reference used by each deployment.
Question 314
An incident team tries to roll back production to the tag latest but the tag now resolves to a different image. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Promote and deploy immutable image digests where deterministic rollback and provenance are required.
- Use protected branches with mandatory code review and verified CI status before release promotions.
- Isolate business logic using controlled stubs or mocks while keeping separate cloud integration coverage.
- Use versioned dependencies and safe build caches rather than sacrificing reproducibility for faster downloads.
Explanation
Correct Answer
A:Promote and deploy immutable image digests where deterministic rollback and provenance are required. Tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. Before rollout, inspect image digests, mutable tags, build provenance, and the image reference used by each deployment.
Incorrect Answers
B:Use protected branches with mandatory code review and verified CI status before release promotions. For this case, tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. It cannot substitute for the required control: promote and deploy immutable image digests where deterministic rollback and provenance are required.
C:Isolate business logic using controlled stubs or mocks while keeping separate cloud integration coverage. This design addresses unit testing with isolated dependencies, where unit tests target a bounded code unit; production network dependencies should be tested through separate controlled integration layers. It cannot substitute for the required control: promote and deploy immutable image digests where deterministic rollback and provenance are required.
D:Use versioned dependencies and safe build caches rather than sacrificing reproducibility for faster downloads. For this case, tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. It cannot substitute for the required control: promote and deploy immutable image digests where deterministic rollback and provenance are required.
Question 315
An incident team tries to roll back production to the tag latest but the tag now resolves to a different image. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Configure the trigger and test positive and negative synthetic commit or pull-request cases.
- Refactor the Dockerfile to separate compilation from runtime and inspect the final image filesystem and dependency inventory.
- Add a test that writes a fixture, reads it back, and verifies application decoding with a real-service smoke check where required.
- Record the digest at build completion and pin it in deployment manifests and release evidence.
Explanation
Correct Answer
D:Record the digest at build completion and pin it in deployment manifests and release evidence. Tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. Validate the change by checking that staging and production resolve to identical approved image bytes until an explicit change is authorized.
Incorrect Answers
A:Configure the trigger and test positive and negative synthetic commit or pull-request cases. This action changes a different concern, Cloud Build source-trigger conditions. It addresses a different dependency from artifact registry image digest reproducibility.
B:Refactor the Dockerfile to separate compilation from runtime and inspect the final image filesystem and dependency inventory. This action changes a different concern, multi-stage Docker image construction. It addresses a different dependency from artifact registry image digest reproducibility.
C:Add a test that writes a fixture, reads it back, and verifies application decoding with a real-service smoke check where required. This action changes a different concern, integration testing with service emulators. It addresses a different dependency from artifact registry image digest reproducibility.
Question 316
An incident team tries to roll back production to the tag latest but the tag now resolves to a different image. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Staging and production resolve to identical approved image bytes until an explicit change is authorized.
- Failed tests prevent promotion and successful builds identify an exact source revision and image digest.
- Only intended users see the new behavior and disabling the flag safely restores the prior path.
- Development and staging tests use only intended resources and secret material is absent from source and artifact layers.
Explanation
Correct Answer
A:Staging and production resolve to identical approved image bytes until an explicit change is authorized. This is evidence that the particular acceptance condition for artifact Registry image digest reproducibility has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect image digests, mutable tags, build provenance, and the image reference used by each deployment.
Incorrect Answers
B:Failed tests prevent promotion and successful builds identify an exact source revision and image digest. That result could support testing of Cloud Build container pipeline steps: A build pipeline must explicitly encode its ordering and failure gates; saving a Dockerfile alone does not enforce release quality. The reported condition is about artifact registry image digest reproducibility, not this adjacent change.
C:Only intended users see the new behavior and disabling the flag safely restores the prior path. That result could support testing of feature-flag regression testing: Feature flags separate code deployment from feature exposure, but untested flag branches can still create production failures. The reported condition is about artifact registry image digest reproducibility, not this adjacent change.
D:Development and staging tests use only intended resources and secret material is absent from source and artifact layers. That result could support testing of development secrets and environment isolation: Environment configuration and secret injection must be isolated; a dev label on a file does not constrain the credentials it contains. The reported condition is about artifact registry image digest reproducibility, not this adjacent change.
Question 317
Two environments appear to run the same application tag while their actual container bytes differ. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency? Select ONE best answer.
- Inspect session persistence, workspace images, access policy, IDE integration, and required project permissions.
- Inspect proxy lifecycle, database IAM permissions, network reachability, client credentials, and database user access.
- Inspect image digests, mutable tags, build provenance, and the image reference used by each deployment.
- Inspect flag targeting, defaults, kill-switch behavior, and test coverage of enabled and disabled code paths.
Explanation
Correct Answer
C:Inspect image digests, mutable tags, build provenance, and the image reference used by each deployment. This checks the actual operating conditions relevant to artifact Registry image digest reproducibility, rather than changing a service before the failure is understood. Before choosing a remediation, which investigation best isolates the specific cause or unmet dependency.
Incorrect Answers
A:Inspect session persistence, workspace images, access policy, IDE integration, and required project permissions. Cloud Shell offers managed interactive temporary shell sessions, while Cloud Workstations provides customizable managed development environments. This is not the decisive inspection for artifact registry image digest reproducibility.
B:Inspect proxy lifecycle, database IAM permissions, network reachability, client credentials, and database user access. Cloud SQL connection helpers secure the connection path; database-level authentication and authorization still apply separately. This is not the decisive inspection for artifact registry image digest reproducibility.
D:Inspect flag targeting, defaults, kill-switch behavior, and test coverage of enabled and disabled code paths. Feature flags separate code deployment from feature exposure, but untested flag branches can still create production failures. This is not the decisive inspection for artifact registry image digest reproducibility.
Question 318
Two environments appear to run the same application tag while their actual container bytes differ. The team is choosing a sustainable solution. Which design best meets the stated requirement without broad unrelated changes? Select ONE best answer.
- Promote and deploy immutable image digests where deterministic rollback and provenance are required.
- Use versioned dependencies and safe build caches rather than sacrificing reproducibility for faster downloads.
- Use protected branches with mandatory code review and verified CI status before release promotions.
- Run independent checks in parallel only when publish and deploy steps still depend on all required PASS outcomes.
Explanation
Correct Answer
A:Promote and deploy immutable image digests where deterministic rollback and provenance are required. Tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. Before rollout, inspect image digests, mutable tags, build provenance, and the image reference used by each deployment. Two environments appear to run the same application tag while their actual container bytes differ. The team is choosing a sustainable solution.
Incorrect Answers
B:Use versioned dependencies and safe build caches rather than sacrificing reproducibility for faster downloads. For this case, tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. That may help elsewhere, but it does not make the change required for artifact registry image digest reproducibility.
C:Use protected branches with mandatory code review and verified CI status before release promotions. For this case, tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. That may help elsewhere, but it does not make the change required for artifact registry image digest reproducibility.
D:Run independent checks in parallel only when publish and deploy steps still depend on all required PASS outcomes. For this case, tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. That may help elsewhere, but it does not make the change required for artifact registry image digest reproducibility.
Question 319
Two environments appear to run the same application tag while their actual container bytes differ. An approved limited change can be tested in a safe environment. Which implementation action most directly addresses this scenario? Select ONE best answer.
- Enable provenance generation in an approved Cloud Build workflow and verify its source-to-image linkage.
- Refactor the Dockerfile to separate compilation from runtime and inspect the final image filesystem and dependency inventory.
- Record the digest at build completion and pin it in deployment manifests and release evidence.
- Add a test that writes a fixture, reads it back, and verifies application decoding with a real-service smoke check where required.
Explanation
Correct Answer
C:Record the digest at build completion and pin it in deployment manifests and release evidence. Tags can be moved to new images; a content digest identifies the exact stored container artifact for verification and rollback. Validate the change by checking that staging and production resolve to identical approved image bytes until an explicit change is authorized. An approved limited change can be tested in a safe environment.
Incorrect Answers
A:Enable provenance generation in an approved Cloud Build workflow and verify its source-to-image linkage. This action changes a different concern, SLSA and build provenance evidence. A more direct response is to record the digest at build completion and pin it in deployment manifests and release evidence.
B:Refactor the Dockerfile to separate compilation from runtime and inspect the final image filesystem and dependency inventory. This action changes a different concern, multi-stage Docker image construction. A more direct response is to record the digest at build completion and pin it in deployment manifests and release evidence.
D:Add a test that writes a fixture, reads it back, and verifies application decoding with a real-service smoke check where required. This action changes a different concern, integration testing with service emulators. A more direct response is to record the digest at build completion and pin it in deployment manifests and release evidence.
Question 320
Two environments appear to run the same application tag while their actual container bytes differ. The team has tried a correction. Which measurable outcome most directly demonstrates that this issue is resolved? Select ONE best answer.
- Interface regressions are caught before production without claiming emulators prove every IAM, quota, or availability condition.
- Existing clients remain interoperable and failures return correctly structured error responses.
- Only changes matching the documented release conditions initiate the expected pipeline.
- Staging and production resolve to identical approved image bytes until an explicit change is authorized.
Explanation
Correct Answer
D:Staging and production resolve to identical approved image bytes until an explicit change is authorized. This is evidence that the particular acceptance condition for artifact Registry image digest reproducibility has been met, rather than a general availability metric. The original diagnosis should have included this step: inspect image digests, mutable tags, build provenance, and the image reference used by each deployment. Two environments appear to run the same application tag while their actual container bytes differ. The team has tried a correction.
Incorrect Answers
A:Interface regressions are caught before production without claiming emulators prove every IAM, quota, or availability condition. That result could support testing of integration testing with service emulators: Service emulators exercise protocol and data behavior but do not eliminate the need for selective production-like integration checks. The case instead calls for the following: staging and production resolve to identical approved image bytes until an explicit change is authorized.
B:Existing clients remain interoperable and failures return correctly structured error responses. In this case, the outcome to verify is that staging and production resolve to identical approved image bytes until an explicit change is authorized. The case instead calls for the following: staging and production resolve to identical approved image bytes until an explicit change is authorized.
C:Only changes matching the documented release conditions initiate the expected pipeline. In this case, the outcome to verify is that staging and production resolve to identical approved image bytes until an explicit change is authorized. The case instead calls for the following: staging and production resolve to identical approved image bytes until an explicit change is authorized.