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: add filesystem browsing for allocations #7951

Merged
merged 34 commits into from
Jun 1, 2020
Merged

UI: add filesystem browsing for allocations #7951

merged 34 commits into from
Jun 1, 2020

Conversation

backspace
Copy link
Contributor

@backspace backspace commented May 13, 2020

This adds a filesystem browser for allocations:

alloc-fs

Task state filesystems are contained within a subdirectory of their parent allocation, so almost everything that existed for browsing task state filesystems was applicable to browsing allocations, just without the task name prepended to the path. I aimed to push this differential handling into as few contained places as possible.

The tests also have significant overlap, so this includes an extracted behavior to run the same tests for allocations and task states. It’s definitely unwieldy but seemed better than having two files with almost-identical tests. Having the thorough test suite for this complex and near-identical functionality was helpful in the refactorings I completed near the end of this work.

Other commentary:

  • I created an fs directory to contain the relevant components
  • I moved the filesystem-related adapter functions to the allocation adapter
  • some duplication is still present, like the very-similar routes, but it didn’t seem worth extracting further to me

There’s a lot of duplication here that’s probably worth extracting
despite not meeting the three-repetitions rule because we were
already simulating the API being for a task by including the task
name in the URL.
This is a barely-different copypaste from the task fs acceptance
tests… I’m not sure what’s the best way to accomplish this!
The assumption that we should strip the task name path prefix
is no longer correct if we want to be able to browse the
allocation without a task. This changes the task filesystem
acceptance test files to all be nested within a task name
directory, which mirrors how it works in the real setup.
@github-actions
Copy link

github-actions bot commented May 19, 2020

Ember Asset Size action

As of 5f82c18

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +7.38 kB +1.09 kB

Files that stayed the same size 🤷‍:

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

The interface here is still subpar, with the expectations of
the various things dangling off `this.` (files? directory?),
but maybe some cleanup is possible…
@github-actions
Copy link

github-actions bot commented May 27, 2020

Ember Test Audit comparison

master 5f82c18 change
passes 1333 1354 +21
failures 0 0 0
flaky 0 0 0
duration 5m 13s 329ms 5m 21s 348ms +08s 019ms

There’s one left that has some duplication but it doesn’t
seem worth extracting due to how much customisation it
would require.
@backspace backspace marked this pull request as ready for review May 28, 2020 18:33
Copy link
Contributor

@DingoEatingFuzz DingoEatingFuzz left a comment

Choose a reason for hiding this comment

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

This looks good!

For what it's worth, I like how the behavior turned out. Certainly beats having all those tests in two places.

@DingoEatingFuzz DingoEatingFuzz added this to the 0.11.3 milestone May 29, 2020
@backspace backspace merged commit 06baadd into master Jun 1, 2020
@backspace backspace deleted the f-ui/alloc-fs branch June 1, 2020 13:16
backspace added a commit that referenced this pull request Jun 1, 2020
This partially addresses #7799.

Task state filesystems are contained within a subdirectory of their
parent allocation, so almost everything that existed for browsing task
state filesystems was applicable to browsing allocations, just without
the task name prepended to the path. I aimed to push this differential
handling into as few contained places as possible.

The tests also have significant overlap, so this includes an extracted
behavior to run the same tests for allocations and task states.
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

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 Jan 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants