Project

General

Profile

Bug #25558

[Container Admin Feature] Failed promotion of CV with containers - error message is unhelpful

Added by Justin Sherrill 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Category:
Repositories
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1648358

There are two main reasons why we reject promotion of CV with containers - at least one of repository name will turn out to be invalid (empty, too long, with invalid characters) or few repositories will get the same name on new LE (pattern is not unique enough). Katello app/lib/katello/validators/environment_docker_repositories_validator.rb does good job at distinguishing these two scenarios and returning helpful error message.

However, app/models/katello/content_view.rb:check_docker_repository_names! will swallow these helpful messages and return generic "Content View publish to environment $FOO will result in invalid container image name of member repositories".

Could we present error message returned from environment_docker_repositories_validator to user? This would really help in figuring out where the root cause of the problem is and what corrective steps should be taken.

Steps to Reproduce:
1. Add new Lifecycle environment
2. Prepare docker product with at least two repositories
3. Create CV with product from earlier step
4. Set up LE Registry Name Patter to something not unique enough (like `<%= organization.label %>`)
5. Try to promote CV to LE

Actual results:
Unhelpful generic error message appears

Expected results:
Helpful error message about registry names not unique enough appears

Associated revisions

Revision 095a0374 (diff)
Added by Justin Sherrill 8 months ago

Fixes #25558 - better error on cv publish repo conflict

History

#1 Updated by The Foreman Bot 8 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7852 added

#2 Updated by Justin Sherrill 8 months ago

  • Status changed from Ready For Testing to Closed

#3 Updated by Christine Fouant 8 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 3.10.0

Also available in: Atom PDF