Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Sps/token migration tweak, ActionResult casing. #462

Merged
merged 1 commit into from
May 11, 2020

Conversation

TingluoHuang
Copy link
Member

No description provided.

@@ -572,7 +597,7 @@ private async Task<VssCredentials> GetNewOAuthAuthorizationSetting(CancellationT
Trace.Verbose("No authorization url updates");
}
}
catch (Exception ex)
catch (Exception ex) when (!token.IsCancellationRequested)
Copy link
Member Author

Choose a reason for hiding this comment

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

don't report migration error when user ctrl-c the runner.

{
Trace.Info("Start checking oauth authorization url update.");
while (true)
{
var backoff = BackoffTimerHelper.GetRandomBackoff(TimeSpan.FromMinutes(30), TimeSpan.FromMinutes(45));
Copy link
Member Author

Choose a reason for hiding this comment

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

move the sleep to the end of the iteration, since most runner has finished migration. there are a small number of runners connected to the server once a while only for a few minutes, so the delay is too long for them.

@@ -164,6 +164,27 @@ public async Task<Boolean> CreateSessionAsync(CancellationToken token)
}
}

if (ex is TaskAgentSessionConflictException)
Copy link
Member Author

Choose a reason for hiding this comment

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

try migration even on session conflict since there are a small number of runners (might be orchestrated by some auto-provision/scaling tools) hitting session conflict all the time.

@@ -21,7 +21,7 @@ public sealed class JobContext : DictionaryContextData
}
set
{
this["status"] = new StringContextData(value.ToString());
this["status"] = new StringContextData(value.ToString().ToLowerInvariant());
Copy link
Member Author

Choose a reason for hiding this comment

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

change to lower case to match GitHub check result

{
var step = GetStep(scopeName, stepName);
step["conclusion"] = new StringContextData(conclusion);
step["conclusion"] = new StringContextData(conclusion.ToString().ToLowerInvariant());
Copy link
Member Author

Choose a reason for hiding this comment

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

change to lower case to match GitHub check result

{
var step = GetStep(scopeName, stepName);
step["outcome"] = new StringContextData(outcome);
step["outcome"] = new StringContextData(outcome.ToString().ToLowerInvariant());
Copy link
Member Author

Choose a reason for hiding this comment

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

change to lower case to match GitHub check result

@TingluoHuang TingluoHuang requested a review from ericsciple May 2, 2020 04:11
@TingluoHuang TingluoHuang force-pushed the users/tihuang/stuff branch from 4d0636f to c5d5a2a Compare May 11, 2020 15:14
@TingluoHuang TingluoHuang merged commit 6922f3c into master May 11, 2020
@TingluoHuang TingluoHuang deleted the users/tihuang/stuff branch May 11, 2020 16:36
AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 28, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants