-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #35316 - enhance template-seed error-report #9336
base: develop
Are you sure you want to change the base?
Conversation
Issues: #35316 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two suggestions, otherwise a good addition. Just to be clear, it was not any of the default templates we ship today, correct? Otherwise we should fix it too.
No, it was a development version of #9322 |
e0a26fd
to
c391e33
Compare
c391e33
to
7f8d23a
Compare
7f8d23a
to
d531711
Compare
@ares anything else keeping this from being merged that I can fix? |
d531711
to
b1e2b95
Compare
@@ -138,6 +139,9 @@ def import_raw_template(contents, vendor = 'Foreman') | |||
def import_templates(template_paths, vendor = 'Foreman') | |||
template_paths.each do |path| | |||
import_raw_template(File.read(path), vendor) | |||
rescue RuntimeError => e | |||
Foreman::Logging.exception("Error in seeding the template #{path.inspect} metadata #{e.message}", e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot that I really really wanted to have the failing template's path in here 😇
b1e2b95
to
e2e8242
Compare
e2e8242
to
cb8b360
Compare
cb8b360
to
4940ec5
Compare
4940ec5
to
600ada8
Compare
I had the problem, that a template could not be seeded, because the Metadata was not valid YAML and therefore could not be parsed
metadata
therefore being empty, the seed reported thatname
was missing.Having
name:
in all templates I was pretty puzzled.This fix will:
metadata
as 'Metadata could not be parsed'