Skip to main content

Associate Cloud Engineer practice question · Planning and implementing a cloud solution

A team publishes internal Python packages to an Artifact Registry standard repository and caches public PyPI packages…

A team publishes internal Python packages to an Artifact Registry standard repository and caches public PyPI packages through a remote repository. They want developers to put only one index URL in their pip configuration. If an internal package and a public package ever have the same name, the internal one must be installed. What should they plan?

  • AA virtual repository with both repositories as upstreams, giving the standard repository a higher priority value than the remote one
  • BA virtual repository with both repositories as upstreams, giving the standard repository priority 1 and the remote repository priority 10
  • CThe remote repository alone, with the team also uploading its internal packages to it so both sources share one index URL
  • DBoth repository URLs in pip, using the standard repository as the index URL and the remote repository as an extra index URL
Show the answer and explanation

Correct answer: A) A virtual repository with both repositories as upstreams, giving the standard repository a higher priority value than the remote one

An Artifact Registry virtual repository puts standard and remote repositories behind one endpoint. Upstream priority values, where the higher number wins, decide which source is used when the same package exists in more than one upstream.

Why each option is right or wrong

  • A) Correct. A virtual repository is a read-only repository that serves as one access point for several upstream repositories of the same format. When an artifact exists in more than one upstream, the upstream with the higher numeric priority value is used. Giving the standard repository the higher value makes internal packages win.
  • B) Incorrect. Upstream priority is a weight, not a ranking, and the higher numeric value takes precedence. With these values, the remote PyPI repository would be preferred when names collide, which is the opposite of what the team needs.
  • C) Incorrect. A remote repository works as a caching proxy for an external upstream such as PyPI. It is not used to publish internal packages, which belong in a standard repository. Combining the two sources behind one URL is the job of a virtual repository.
  • D) Incorrect. This requires developers to configure two URLs instead of one. pip does not reliably prefer one index over another when the same package name appears in both, which leaves the team open to dependency confusion.
Exam domain
Planning and implementing a cloud solution · ~30% of Associate Cloud Engineer
Question type
Multiple choice (one answer)

Practise the full Associate Cloud Engineer exam

This question is one of a small free sample from the CertRidge Associate Cloud Engineer bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with Google Cloud; never copied from the real exam.