Skip to content
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

[ui] Nicer comment styles in example jobs #19037

Merged
merged 1 commit into from Nov 9, 2023

Conversation

philrenaud
Copy link
Contributor

@philrenaud philrenaud commented Nov 8, 2023

Swaps out the // for # comment prefixes in our job template strings (which eventually are expressed as HCL) for highlighting reasons, among others.

Old:
image
New:
image

Copy link
Contributor

@angrycub angrycub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! Pretty comments FTW! One very very very optional suggestion around heredoc delimiters.

Comment on lines 51 to 60
data = <<EOF
<h1>Hello, Nomad!</h1>
<ul>
<li>Task: {{env "NOMAD_TASK_NAME"}}</li>
<li>Group: {{env "NOMAD_GROUP_NAME"}}</li>
<li>Job: {{env "NOMAD_JOB_NAME"}}</li>
<li>Metadata value for foo: {{env "NOMAD_META_foo"}}</li>
<li>Currently running on port: {{env "NOMAD_PORT_www"}}</li>
</ul>
<h1>Hello, Nomad!</h1>
<ul>
<li>Task: {{env "NOMAD_TASK_NAME"}}</li>
<li>Group: {{env "NOMAD_GROUP_NAME"}}</li>
<li>Job: {{env "NOMAD_JOB_NAME"}}</li>
<li>Metadata value for foo: {{env "NOMAD_META_foo"}}</li>
<li>Currently running on port: {{env "NOMAD_PORT_www"}}</li>
</ul>
EOF
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be able to retain the spec as written using <<-EOF instead of <<EOF

Copy link

github-actions bot commented Nov 8, 2023

Ember Test Audit comparison

main 7c77edc change
passes 1538 1538 0
failures 0 0 0
flaky 0 0 0
duration 10m 54s 825ms 10m 47s 624ms -07s 201ms

@philrenaud philrenaud force-pushed the f-ui/example-job-comment-notation branch from b97030f to 7c77edc Compare November 8, 2023 20:50
@philrenaud philrenaud merged commit f322bb7 into main Nov 9, 2023
15 checks passed
@philrenaud philrenaud deleted the f-ui/example-job-comment-notation branch November 9, 2023 01:13
nvanthao pushed a commit to nvanthao/nomad that referenced this pull request Mar 1, 2024
nvanthao pushed a commit to nvanthao/nomad that referenced this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants