-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix broken link to task-group
in Recent Allocation
table in jobs.job.index
#12765
Conversation
Ember Asset Size actionAs of 11f2ac0 Files that got Bigger 🚨:
Files that got Smaller 🎉:
Files that stayed the same size 🤷:
|
Ember Test Audit comparison
|
Ember Test Audit flaky testsEmber Test Audit detected these flaky tests on main:
|
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.
Can confirm that this fixes the issue locally for me!
Was able to easily repro with the old code and couldnt repro with the new!
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.
I still see the error in the browser console in some pages. The easiest way to trigger it is by running a job in a non-default namespace then navigating to the job Allocations
tab. I think it may be related to the lines I pointed where it's using the job
as the model for LinkTo
.
They happen in backgroud though, so it doesn't results in an error page, which is a big improvement 😄
There's also an added problem with the rendering of service IP:Port
text that needs to be fixed.
{{row.model.hostIp}} | ||
: | ||
{{row.model.value}} |
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.
<span class="pair job-link"> | ||
<span class="term"> | ||
Job | ||
</span> | ||
<LinkTo | ||
@route="jobs.job" | ||
@model={{this.preempter.job}} |
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.
Does this need to be @model={{format-job-id this.model.job.id}}
as well?
@model={{this.allocation.job}} | ||
@query={{hash jobNamespace=this.allocation.job.namespace.id}} |
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.
I think this needs to be updated as well?
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.
Yup its not causing any breaks and its ticketed here: #12764
View all {{this.job.allocations.length}} {{pluralize "allocation" this.job.allocations.length}} | ||
</LinkTo></p> | ||
<p class="pull-right" data-test-view-all-allocations> | ||
<LinkTo @route="jobs.job.allocations" @model={{this.job}}> |
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.
Not sure if this needs to use the new helper as well.
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.
Yup its not causing any breaks and its ticketed here: #12764
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.
Is it alright if I address that change in the above ticket?
@@ -279,7 +279,7 @@ module('Acceptance | allocation detail', function (hooks) { | |||
assert.equal(renderedPort.name, serverPort.Label); | |||
assert.equal(renderedPort.to, serverPort.To); | |||
assert.equal( | |||
renderedPort.address, | |||
renderedPort.address.replace(/\s/g, ''), |
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.
I think this is result of added line breaks in ui/app/templates/allocations/allocation/index.hbs
. We shouldn't modify the test as it correctly reports a breaking change.
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.
There's nothing I can do about the extra spaces being added to handlebars as a result of prettier, however. So I'm not sure what I can do without spending a few hours to understand why.
Do you have any ideas?
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.
You can ignore parts of the code: https://prettier.io/docs/en/ignore.html#handlebars
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.
Ignoring prettier seems yucky. I decided to use a template helper to avoid the problem. However, I think @philrenaud and I should prioritize taking a look into our prettier and linting set-up when I'm back from vacation.
<td data-test-allocation-port-address> | ||
<a | ||
href="http://{{row.model.hostIp}}:{{row.model.value}}" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
>{{row.model.hostIp}}:{{row.model.value}}</a> | ||
> | ||
{{row.model.hostIp}}:{{row.model.value}} |
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.
I reverted the change to use a helper here. It didn't seemed like a good idea to add more code to workaround a tooling issue.
It also seems like Prettier is fine with the code like this? It didn't try to change it for me at least, so I think it may be another plugin in your machine that is causing this formatting.
Moving forwards though, I think we should reconsider using Prettier for hbs
files and minimize changes to the UI code to only what's necessary. I detected some other minor visual regressions caused by all these formatting and I worry about having others we may have missed. I will leave this decision to you and @philrenaud.
Ember Test Audit flaky testsEmber Test Audit detected these flaky tests on 11f2ac0:
|
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Resolves #12724
This PR fixes broken link to
task-group
inRecent Allocation
table injobs.job.index
.Side Effect
We needed to run prettier on 2 handlebar files. The commits are isolated to see the real change.