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 removal of OTT query parameter with delay #10319

Merged
merged 2 commits into from
Apr 13, 2021
Merged

Conversation

backspace
Copy link
Contributor

This is a follow-on to #10066 to clear out the OTT from the URL after loading. While this approach
is unsightly, it’s how I was able to get it to happen, and it seems less unsightly than having the OTT
persist in the URL.

Here’s a GIF showing it being cleared when passing a job to nomad ui -authenticate:

ott-erasure

@github-actions
Copy link

github-actions bot commented Apr 7, 2021

Ember Asset Size action

As of 7153b67

Files that got Bigger 🚨:

File raw gzip
nomad-ui.js +179 B +83 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 7, 2021

Ember Test Audit comparison

main 7153b67 change
passes 1074 1074 0
failures 0 0 0
flaky 0 0 0
duration 8m 32s 538ms 8m 28s 111ms -04s 427ms

I’m not a fan of having to do it this way but everything else
I tried failed.
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.

🚢

Unsightly indeed, but I blame ember's router.

@@ -169,6 +169,9 @@ module('Acceptance | tokens', function(hooks) {
const { oneTimeSecret, secretId } = managementToken;

await JobDetail.visit({ id: job.id, ott: oneTimeSecret });

assert.notOk(currentURL().includes(oneTimeSecret), 'OTT is cleared from the URL after loading');
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this working imply that all our job detail tests are now 500ms longer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whew, good question… maybe it would make ALL acceptance tests longer since it’s in the application route! I’ll look more into this, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

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

The test audit action suggests it didn't. 🤷

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 don’t know… before I changed the default value from null to '', this was the first audit:

image

The utility of it as it exists is in doubt to me, although I guess it would at least catch if something was DRAMATICALLY slower.

To hopefully reduce the variability from what happens on in CircleCI, I ran locally with 5 repetitions and it was two minutes slower with the global delay vs the scoped delay I added in 7153b67. (9m 23s 746ms vs 7m 23s 150ms) The unsightliness is increased within that commit, as it involves making the existence of the OTT query parameter checkable in setupController but it seems worth it to me to not drag on other tests. Thoughts? 😯

Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely worth it!

This is more unsightliness, but it seems to speed things
up, at least locally… 🤔
@backspace backspace merged commit 83164f2 into main Apr 13, 2021
@backspace backspace deleted the b-ui/ott-clear branch April 13, 2021 16:57
@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 Nov 25, 2022
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.

2 participants