[go: up one dir, main page]

Skip to content

Tag list page links to latest pipeline of the commit, not to the latest pipeline of the tag

Summary

The page Repository/Tags contains a link to the pipeline of each tag. This link points to the latest pipeline of the commit to which the tag points to, not to the latest pipeline related to the tag itself. When you add a new tag to the same commit, triggering a new tag pipeline, all the tags pointing to the same commit start pointing at that pipeline.

Steps to reproduce

  1. Create CI configuration that has a job that runs for tags and behaves differently based on the tag name.
  2. Create a tag called dummy/1.1 on the tip of the main branch. Observe that /-/tags lists the tag and links to its pipeline.
  3. Create a tag called dummy/1.2 on the tip of the main branch (same commit as above). Observe that /-/tags lists the tag and links to its pipeline.
  4. Observe that also dummy/1.1 now links to the tag pipeline of 1.2.

Example Project

You can observe the situation here: https://gitlab.com/OK_MF/gitlab-dummy/-/tags

You can see that all the tags on the tag page link to the pipeline of the latest tag. In the pipelines page you can see the individual pipelines for the individual tags.

What is the current bug behavior?

All tags point to the tag pipeline of the latest tag on the same commit.

What is the expected correct behavior?

Tags should point to their own pipelines.

Output of checks

This bug happens on GitLab.com.

Possible fixes

Tags are treated equally to branches when resolving pipelines here: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/controllers/projects/tags_controller.rb#L27

Edited by 🤖 GitLab Bot 🤖