Skip to content

Conversation

sdarwin
Copy link
Contributor

@sdarwin sdarwin commented Aug 20, 2025

This is to facilitate discussion of issue #4712

Usually the username on windows comes from runner_run_as: Administrator. Recently that has broken and it's always System.

In start-runner.ps1 move everything back inside a "Register-ScheduledTask" so the username can be set. This fixes the issue.

However, start-runner.ps1 also included a relatively new section:

Write-Host "Terminating instance"
aws ec2 terminate-instances --instance-ids "$InstanceId" --region "$Region"

By removing it, instances fail to terminate. How did this work before? ( in 2023) Why is it necessary to terminate instance from start-runner.ps1 instead of how it used to work before?

By removing terminate-instances, the instances continue to run, which is obviously not the desired result.

Where should terminate-instances be placed, or can the earlier solution handle that task.

@sdarwin sdarwin requested a review from a team as a code owner August 20, 2025 18:25
@npalm npalm marked this pull request as draft August 20, 2025 20:12
@sdarwin sdarwin changed the title start-runner.ps1 set username - DRAFT - don't merge start-runner.ps1 set username Sep 25, 2025
@sdarwin sdarwin changed the title start-runner.ps1 set username fix: start-runner.ps1 set username Sep 25, 2025
@sdarwin
Copy link
Contributor Author

sdarwin commented Sep 25, 2025

@npalm this PR has been tested and is ready to review.

Closes #4712

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