Bug #25558
closed[Container Admin Feature] Failed promotion of CV with containers - error message is unhelpful
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
Updated by The Foreman Bot about 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/7852 added
Updated by Justin Sherrill about 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|095a037426567991e4fcd9bc9a73a18b4b8e72ba.
Updated by Christine Fouant about 6 years ago
- Target version set to Katello 3.10.0
- Triaged changed from No to Yes