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

ci: use output from nbgv instead of env variables #1564

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

egil
Copy link
Member

@egil egil commented Sep 24, 2024

Pull request description

PR meta checklist

  • Pull request is targeted at main branch for code
    or targeted at stable branch for documentation that is live on bunit.dev.
  • Pull request is linked to all related issues, if any.
  • I have read the CONTRIBUTING.md document.

Code PR specific checklist

  • My code follows the code style of this project and AspNetCore coding guidelines.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have updated the appropriate sub section in the CHANGELOG.md.
  • I have added, updated or removed tests to according to my changes.
    • All tests passed.

@egil egil force-pushed the ci-fix-warnings-in-workflows branch from 76d3889 to 5bd5bdb Compare October 4, 2024 15:30
…getting triggered before check gets a chance to complete
Comment on lines +63 to +93
// Create the wait task and run the initial check
// and subscribe to the OnAfterRender event.
// This must happen before the timer is started,
// as the check happens inside the renderers synchronization context,
// and that may be blocked longer than the timeout on overloaded systems,
// resulting in the timer completing before a single check has
// has a chance to complete.
WaitTask = CreateWaitTask();
timer = new Timer(
static (state) =>
{
var @this = (WaitForHelper<T>)state!;
@this.logger.LogWaiterTimedOut(@this.renderedFragment.ComponentId);
@this.checkPassedCompletionSource.TrySetException(
new WaitForFailedException(
@this.TimeoutErrorMessage ?? string.Empty,
@this.checkCount,
@this.renderedFragment.RenderCount,
@this.renderer.RenderCount,
@this.capturedException));
},
this,
GetRuntimeTimeout(timeout),
Timeout.InfiniteTimeSpan);

InitializeWaiting();
CheckAndInitializeWaiting();

// If the initial check did not complete successfully,
// start the timer and recheck after every render until the timer expires.
if (!WaitTask.IsCompleted)
{
timer = new Timer(
static (state) =>
{
var @this = (WaitForHelper<T>)state!;
@this.logger.LogWaiterTimedOut(@this.renderedFragment.ComponentId);
@this.checkPassedCompletionSource.TrySetException(
new WaitForFailedException(
@this.TimeoutErrorMessage ?? string.Empty,
@this.checkCount,
@this.renderedFragment.RenderCount,
@this.renderer.RenderCount,
@this.capturedException));
},
this,
GetRuntimeTimeout(timeout),
Timeout.InfiniteTimeSpan);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@linkdotnet it turns out this order is significant. After the change in the other PR I unskipped a few tests and one of the failed. Its check count was 0. This should ensure that we always perform at one check before the timer is started. It's needed because the checks happens inside the renderes sync context and that may be blocked so the first check never happens.

@egil egil merged commit f709c88 into main Oct 4, 2024
8 checks passed
@egil egil deleted the ci-fix-warnings-in-workflows branch October 4, 2024 16:17
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.

1 participant