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

[JENKINS-75194] Use window.requestIdleCallback instead of setTimeout to force the browser to update parameters in order, waiting for DOM to be updated #457

Merged
merged 4 commits into from
Mar 22, 2025

Conversation

kinow
Copy link
Member

@kinow kinow commented Mar 16, 2025

https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback

Maybe we could rewrite the plug-in some day to use the DOM monitor, but that'd probably break jobs that use Timers/Pipelines (which we never intended to officially support, but since the plug-in works in that cases under certain conditions, there's no need to break it for now).

Tested locally and the plug-in updated the parameters in the expected order. This really needs more users to help here.

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

…to force the browser to update parameters in order, waiting for DOM to be updated
@kinow kinow requested a review from a team as a code owner March 16, 2025 11:47
@kinow kinow self-assigned this Mar 16, 2025
@kinow
Copy link
Member Author

kinow commented Mar 16, 2025

Urgh, some test failures. Still, having someone else to validate that at least the reactive part of parameters is working would be grand. I can fix the test another time 🏃 🏖️ 👋

@kinow
Copy link
Member Author

kinow commented Mar 16, 2025

Fixed other tests after reading their source code and verifying they were indeed not getting the correct result. Still have to add those changes to the changelog, now pending help from others to review it.

@kinow
Copy link
Member Author

kinow commented Mar 22, 2025

Well, no feedback here or in JIRA for this PR, so I will merge and proceed with other issues.

@kinow kinow merged commit 412b333 into master Mar 22, 2025
16 checks passed
@gokhansengun
Copy link

hey @kinow, thanks for you efforts, I am using this plugin extensively in different deployments and I tested the hpi you uploaded on JIRA. It seems to be fixing the issue we were experiencing for a while. As far as I can see, there are no regressions.

@kinow kinow deleted the JENKINS-75194 branch March 24, 2025 10:05
@kinow
Copy link
Member Author

kinow commented Mar 24, 2025

Thank you so much for confirming it worked in your environment, @gokhansengun !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants