harbor icon indicating copy to clipboard operation
harbor copied to clipboard

Gitlab with Harbor integration [untagged artifacts]

Open reddare opened this issue 2 years ago • 5 comments

Hello! Perhaps the topic is not entirely correct but I would like to ask the Harbor community.

I have integration configured with Gitlab. And if there is an artifact without a tag in the Harbor project, then the integration breaks and displays an error.

harbor

gitlab

If all artifacts without a tag are removed, then the integration works fine.

Is it possible to do something with the Harbor settings to change this behavior?

Untagged artifacts appear when, for example, an image with the same tag is pushed, unfortunately I cannot avoid such behavior.

I would be grateful for any advice. Thank you!

reddare avatar Feb 12 '24 20:02 reddare

Although it does not solve the root problem, one thing you can do to mitigate this risk is to setup a cleanup task that is scheduled as often as you want via a cron expression. This can delete untagged artifacts. This is done in the "Clean up" section. Make sure you activate the option "Allow garbage collection on untagged artifacts".

tostt avatar Feb 16 '24 15:02 tostt

Could you please describe your integration scenario so that we could reproduce this issue?

stonezdj avatar Feb 19 '24 08:02 stonezdj

Could you please describe your integration scenario so that we could reproduce this issue?

Hello, I have configured the Clenup Policy and also set up GC to remove untagged artifacts. I did this in the first place. The problem is that they are scheduled to run, they can also be done by cron, but this does not exclude the appearance of my problem. I also don't want to run GC or Cleanup jobs too often, I have a lot of projects and new artifacts appear quite frequently.

To reproduce the problem, you need to take the following actions:

  1. Set up GitLab integration with Harbor
  2. Push any tagged image to Harbor project registry
  3. Push the same tagged image but with a different SHA
  4. Remove a tag from any of the artifacts in Harbor project

reddare avatar Feb 19 '24 10:02 reddare

Anyone?

reddare avatar Apr 17 '24 08:04 reddare

This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.

github-actions[bot] avatar Jun 16 '24 09:06 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.

github-actions[bot] avatar Jul 16 '24 09:07 github-actions[bot]