Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: make agent scripts easier to troubleshoot#2922

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
johnstcn merged 9 commits intomainfromcj/gh-1544/agent-script-wait
Jul 13, 2022

Conversation

johnstcn
Copy link
Member

@johnstcnjohnstcn commentedJul 12, 2022
edited
Loading

This PR makes the following changes:

  • Adds distinct exit statuses to the bootstrap scripts
  • Makes the bootstrap scripts loop forever trying to download the coder agent
  • Surfaces and logs the status codes returned by the download tool

Tested Linux script with a Docker template, Windows script withaws-windows template, and Darwin script by running locally with an existing Coder agent token.

Note: I also ranPSScriptAnalyzer on the PowerShell script and changed things until it no longer complained.

@johnstcnjohnstcn self-assigned thisJul 12, 2022
Comment on lines +2 to +5
trap {
Write-Error '=== Agent script exited with non-zero code. Sleeping 24h to preserve logs...'
Start-Sleep -Seconds 86400
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

TIL that PS also hastrap

mafredri reacted with heart emoji
@johnstcnjohnstcn changed the titlefeature: make agent scripts easier to troubleshootfix: make agent scripts easier to troubleshootJul 12, 2022
Copy link
Member

@mafredrimafredri left a comment

Choose a reason for hiding this comment

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

Beautiful, and props on figuring out how to do this neatly in Windows! 🤩

@johnstcnjohnstcn merged commit0f5f30b intomainJul 13, 2022
@johnstcnjohnstcn deleted the cj/gh-1544/agent-script-wait branchJuly 13, 2022 09:17
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mafredrimafredrimafredri approved these changes

@kylecarbskylecarbsAwaiting requested review from kylecarbs

Assignees

@johnstcnjohnstcn

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@johnstcn@mafredri

[8]ページ先頭

©2009-2025 Movatter.jp