-
Notifications
You must be signed in to change notification settings - Fork 105
Performance #1035
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
Open
adamruzicka
wants to merge
35
commits into
theforeman:master
Choose a base branch
from
adamruzicka:perf
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Performance #1035
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
baf6c31
Wait for previous poll response before scheduling the next one
adamruzicka 68026f8
Fetch permissions only on initial load, not on every poll tick
adamruzicka 068afa5
Remove updateJob — its response was never read
adamruzicka b2ec8c2
Fix host table firing duplicate API calls on mount
adamruzicka d3ab2a9
Include cancellable in job invocation task, drop separate task fetch
adamruzicka 46bd375
Replace setInterval with setTimeout chain in TemplateInvocation polling
adamruzicka 951c03d
Stop job invocation polling when the job finishes
adamruzicka 26252f3
Drop dead autoRefresh logic — status_label already implies task state
adamruzicka 3ac94d5
Fix include_permissions being dropped from initial job invocation fetch
adamruzicka 8ffd523
Add tests for job invocation polling behaviour
adamruzicka 21b9c7a
Apply simplifications from code review
adamruzicka 4e09702
Fix TemplateInvocation poll race and drop dead jobId params
adamruzicka 4cc5429
Make lints happy
adamruzicka a698e44
Poll host table while job is running
adamruzicka 161c5d0
Refresh LIST_TEMPLATE_INVOCATIONS on page change and poll
adamruzicka 6676267
Include task and permissions in API hosts response
adamruzicka 491fc93
Drop list_jobs_hosts — replaced by API hosts endpoint
adamruzicka fa93cc0
Gate task and permissions in hosts response behind include_permission…
adamruzicka 9615860
Pass jobFinished as prop to JobInvocationHostTable
adamruzicka 32e7dd7
Simplify polling helpers in actions and host table
adamruzicka 7f18a92
Fix polling cleanup inconsistencies and error toast fallbacks
adamruzicka 48a1892
Make lints happy
adamruzicka 945c0f0
Use try(:cancellable?) to handle base ForemanTasks::Task in tests
adamruzicka e7ffafc
Trim task data in hosts response to id and cancellable
adamruzicka 0b692d9
Unify pollHostTable into makeApiCall
adamruzicka 24dd1cf
Simplify error toast extraction and reuse task lookup in permissions
adamruzicka 43842bf
Replace redux-mock-store with a real Redux store in polling tests
adamruzicka 9a5008c
Add polling test coverage for TemplateInvocation and JobInvocationHos…
adamruzicka c701ec4
Fix ESLint failures in webpack test and source files
adamruzicka b8dd1d3
Fix host table staleness on id change and redundant fetches for finis…
adamruzicka 9b0664d
Use sprintf placeholders for error response in cancelJob toast
adamruzicka f63e877
Only fetch permissions on first load, not on every poll
adamruzicka 5ee41fe
Hoist host-independent permission checks out of the per-host loop
adamruzicka 022c4fa
Replace module-level pollTimeoutId with useRef in JobInvocationActions
adamruzicka 5bd334d
Add tests and fix nil task in authorized_for for hosts with include_p…
adamruzicka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 happy about this at all.
Alternatives would be:
Querying two different controllers on every poll is out of the question.