'Cloud Run disable old revision

Is there a way to tell Cloud Run that it shouldn't use an old revision anymore?

After I deploy a new revision of my service, I'm using the update-traffic command and successfully setting 100% of the traffic to go to the new revision but the UI still shows the old version as "serving traffic"(although it's 0%) which also prevent the latest version to scale up to the max-instances option(which is the real problem).

enter image description here



Solution 1:[1]

This occurs when you have tag (Revision URL) on your revisions

enter image description here

Delete it and the revision icon will turn to grey again.

Solution 2:[2]

If a revision has one or more tags, the revision is still serving traffic even if "0%" traffic is set to the revision as shown below:

enter image description here

Then, If a revision doesn't have any tags and "0%" traffic is set to the revision, the revision is not serving traffic as shown below:

enter image description here

In addition, a revision is deletable if the revision is not the latest and doesn't have any tags and "0%" traffic is set to the revision as shown below:

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 guillaume blaquiere
Solution 2 Kai - Kazuya Ito