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

Add filters to Allocations #11544

Merged
merged 11 commits into from
Dec 18, 2021
Merged

Add filters to Allocations #11544

merged 11 commits into from
Dec 18, 2021

Conversation

ChaiWithJai
Copy link
Contributor

Mock
image

Actual
image

@ChaiWithJai ChaiWithJai linked an issue Nov 20, 2021 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented Nov 20, 2021

Ember Asset Size action

As of ad80c84

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +3.91 kB +376 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 Nov 20, 2021

Ember Test Audit comparison

main ad80c84 change
passes 1199 1215 +16
failures 0 0 0
flaky 0 0 0
duration 8m 53s 356ms 9m 28s 913ms +35s 557ms

@ChaiWithJai ChaiWithJai marked this pull request as ready for review November 20, 2021 20:36
@ChaiWithJai ChaiWithJai added this to the 1.2.2 milestone Nov 22, 2021
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.

Looking good!

Filtering by status doesn't work because the filter is reading the wrong alloc property (status vs clientStatus). It would be good to have some tests for this as well, they would've likely caught this problem. Take a look at other pages with filters to see how they are done.

I think filtering by job version would could be helpful as well, and seems like a quick addition. But feel free to drop it if it's not.

The PR is also missing a CHANGELOG entry.

Searchable,
WithNamespaceResetting
) {
/*eslint-disable indent */
Copy link
Contributor

Choose a reason for hiding this comment

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

Ugh...I forgot to fix this. I think we need to use this ruleset to prevent eslint and prettier from fighting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't fix it.

ui/app/controllers/jobs/job/allocations.js Outdated Show resolved Hide resolved
ui/app/controllers/jobs/job/allocations.js Outdated Show resolved Hide resolved
ui/app/controllers/jobs/job/allocations.js Outdated Show resolved Hide resolved
@github-actions
Copy link

Ember Test Audit flaky tests

Ember Test Audit detected these flaky tests on main:

  • Acceptance | task group detail: /jobs/:id/:task-group second breadcrumb should link to the job for the task group
  • Integration | Component | TopoViz: clicking on an allocation in a deeply nested TopoViz::Node will associate sibling allocations with curves
  • Integration | Component | TopoViz: when the count of sibling allocations is high enough relative to the node count, curves are not rendered
  • Integration | Utility | exec-socket-xterm-adapter: resizing the window passes a resize message through the socket

Ember Test Audit detected these flaky tests on febcd5e:

  • Acceptance | task group detail: /jobs/:id/:task-group second breadcrumb should link to the job for the task group
  • Integration | Component | TopoViz: clicking on an allocation in a deeply nested TopoViz::Node will associate sibling allocations with curves
  • Integration | Component | TopoViz: when the count of sibling allocations is high enough relative to the node count, curves are not rendered
  • Integration | Utility | exec-socket-xterm-adapter: resizing the window passes a resize message through the socket


@computed('model.allocations.[]', 'selectionClient')
get optionsClients() {
const clients = Array.from(new Set(this.model.allocations.mapBy('node.shortId'))).compact();
Copy link
Contributor

Choose a reason for hiding this comment

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

We are repeating this multiple times in this file. I understand that this pattern is used in other places as well controllers/clients/index.js for example. It looks like we can create a computed-macro out of this pattern.

// Update query param when the list of clients changes.
scheduleOnce('actions', () => {
// eslint-disable-next-line ember/no-side-effects
this.set('qpClient', serialize(intersection(clients, this.selectionClient)));
Copy link
Contributor

Choose a reason for hiding this comment

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

we probably don't want to trigger side-effects in computeds. Again this is done in other places as well but we should investigate why we feel this is necessary to do

ui/app/controllers/jobs/job/allocations.js Outdated Show resolved Hide resolved
Copy link
Contributor

@LevelbossMike LevelbossMike left a comment

Choose a reason for hiding this comment

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

We can tackle the macro in a follow-up PR and apply it to the rest of the codebase that also uses this pattern.

Good work! 👏

@ChaiWithJai ChaiWithJai requested a review from lgfa29 December 17, 2021 14:41
@github-actions
Copy link

Ember Test Audit flaky tests

Ember Test Audit detected these flaky tests on a8854bc:

  • Acceptance | job dispatch (with namespace): required meta fields are properly indicated

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.

I think filtering by job version would could be helpful as well

On second thought, it wasn't very helpful. Long-lived jobs can have their version in the hundreds (if not thousands), the filter list would be pretty useless and hard to use.

So I removed this filter. Sorry for the unnecessary work 😅

@ChaiWithJai ChaiWithJai merged commit 296a29f into main Dec 18, 2021
@ChaiWithJai ChaiWithJai deleted the f-ui/add-filters-to-allocs branch December 18, 2021 14:38
@github-actions
Copy link

github-actions bot commented Nov 6, 2022

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 Nov 6, 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.

Add ability to filter Allocations by status, group, and client
3 participants