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, bugfix] Link fix for volumes where per_alloc=true #12713

Merged
merged 8 commits into from
Apr 21, 2022

Conversation

philrenaud
Copy link
Contributor

In situations where per_alloc of a volume stanza is set to true, we currently throw a broken link: we try to find a base volume in a situation where it is split into multiples.

With this change, we disambiguate the per_alloc'd volume where possible.

This happens in 3 places:

  • on the allocation route, in the Tasks table
  • on the task route, in the Volumes table
  • on the task group route, in the Volume Requirements table.

Importantly, this third situation does not have the ability to disambiguate: because a task group does not know which allocation it refers to, I've opted to provide the user with a link to queried volumes route instead.

Assumptions

  • Allocations spread across multiple clients always receive a [#] suffix in their name property, and this is always the last bracketed text.

Side-effects

  • The Volumes table on the Task route was formerly using volumeMount.volume in its Client Source column. I've changed this to volumeMount.source, which I think is the intended string.

Resolves #11965

@philrenaud philrenaud self-assigned this Apr 20, 2022
@github-actions
Copy link

github-actions bot commented Apr 20, 2022

Ember Asset Size action

As of 78c7282

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +1.61 kB +349 B

Files that stayed the same size 🤷‍:

File raw gzip
vendor.js 0 B 0 B
nomad-ui.css 0 B 0 B
vendor.css 0 B 0 B

@github-actions
Copy link

github-actions bot commented Apr 20, 2022

Ember Test Audit comparison

main 78c7282 change
passes 1273 1276 +3
failures 0 0 0
flaky 0 0 0
duration 11m 10s 144ms 10m 25s 969ms -44s 175ms

@github-actions
Copy link

Ember Test Audit flaky tests

Ember Test Audit detected these flaky tests on ffc2d4c:

  • Acceptance | task group detail: facet Status | the Status facet filters the allocations list by Status

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

Hi @philrenaud this mostly looks perfect. I've left a note about the the link text for the per-alloc volumes.

(Also, it'd be nice if at some point we could get CSI examples in the Vercel preview... it'd cut down on having to stand up a whole cluster with plugins and volumes and consuming tasks to review the results of PRs like this. But obviously that's out of scope for this PR! If there's anything I can do to help out with that let me know, but how that all works is a little out of my wheelhouse)

>
{{row.model.name}}
</LinkTo>
{{!-- if volume is per_alloc=true, there's no one specific volume. So, link to the volumes index with an active query --}}
Copy link
Member

Choose a reason for hiding this comment

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

Good catch. This seems like the best we can do here.

Copy link
Member

Choose a reason for hiding this comment

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

Probably unrelated to this PR, but on one attempt to click this link the back button broke and I couldn't get back to this page. Unfortunately it only happened once and I can't reproduce it anymore.

}}
>
{{row.model.volume}}
{{row.model.source}}
Copy link
Member

Choose a reason for hiding this comment

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

The link text won't match the ID in the case of per-alloc volumes. For example, the second link here for the per-alloc volume is for /ui/csi/volumes/csi-volume-nfs%5B0%5D@prod so I'd expect the link text to be csi-volume-nfs[0]

Screen Shot 2022-04-20 at 9 37 04 AM

I see we also have this for ui/app/templates/components/task-row.hbs below, but I also can't figure out which of these two divs I'm seeing when I look at an allocation detail page like /ui/allocations/039a9058-6e9c-a793-f589-27552d2e56c2 😊

Copy link
Member

Choose a reason for hiding this comment

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

Probably unrelated to this PR but while trying to get to this page from the Job page I'm sometimes getting an error with the following message:

Error: Assertion Failed: You made a 'findRecord' request for a 'job' with id '["httpd","prod"]', but the adapter's response did not have any data

Screen Shot 2022-04-20 at 9 43 20 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably unrelated to this PR but while trying to get to this page from the Job page I'm sometimes getting an error with the following message:

I've been noticing this quite a bit, too. I don't think this is newly introduced, but I'm keeping an eye on it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch on the link text; updated to reflect the suffix.
image

Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed these intermittent issues as well. I think it may be related to #12082 but I need to investigate deeper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The findRecord not-founds are being tracked here: #12724

@lgfa29 lgfa29 added this to the 1.3.0 milestone Apr 20, 2022
@github-actions
Copy link

Ember Test Audit flaky tests

Ember Test Audit detected these flaky tests on 633b877:

  • Acceptance | optimize search and facets: the Datacenter facet has the correct options

Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

LGTM, left a small nit-pick comment. Another thing I would add, if possible, would be a mirage option that has perAlloc, somewhere around here?
https://github.com/hashicorp/nomad/blob/main/ui/mirage/scenarios/default.js#L53-L59

ui/app/templates/allocations/allocation/task/index.hbs Outdated Show resolved Hide resolved
@lgfa29
Copy link
Contributor

lgfa29 commented Apr 20, 2022

Also missing a CHANGELOG entry 🙂
https://github.com/hashicorp/nomad/blob/main/contributing/CHANGELOG.md

// We differentiate them with a [#] suffix, inferred from a volume's allocation's name property.
@computed('name')
get volumeExtension() {
return this.name.substring(this.name.lastIndexOf('['));
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: great job! This is such a simple, elegant solution.

Copy link
Contributor

@ChaiWithJai ChaiWithJai left a comment

Choose a reason for hiding this comment

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

LGTM. I think template readability could be a little different, but its not a blocker.

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSI: per_alloc volumes have wrong link in alloc task table
4 participants