Skip to content

fix: wait for network config to settle #12317

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gjasny
Copy link

@gjasny gjasny commented Jun 4, 2025

Sometimes the install-actions-cache.sh fails to resolve api.github.com. This is probably happening due to the reboot in the provisioning step before. Add a 30 seconds pause like in the other block.

I read the section about macOS PRs. Feel free to pick that commit and and incorporate it in any form into your code base.

Sometimes the install-actions-cache.sh fails to resolve api.github.com.
This is probably happening due to the reboot in the provisioning step
before. Add a 30 seconds pause like in the other block.
@Copilot Copilot AI review requested due to automatic review settings June 4, 2025 13:29
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses intermittent network resolution issues by adding a fixed 30-second pause before executing certain provisioning scripts across multiple macOS template files.

  • A 30s delay is added to various macOS provisioning configurations.
  • The change applies uniformly to macOS-13, macOS-14, and macOS-15 configuration files in both arm64 and non-arm64 variants.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
images/macos/templates/macOS-15.arm64.anka.pkr.hcl Added pause_before of "30s" to delay script execution
images/macos/templates/macOS-15.anka.pkr.hcl Added pause_before of "30s" to delay script execution
images/macos/templates/macOS-14.arm64.anka.pkr.hcl Added pause_before of "30s" to delay script execution
images/macos/templates/macOS-14.anka.pkr.hcl Added pause_before of "30s" to delay script execution
images/macos/templates/macOS-13.arm64.anka.pkr.hcl Added pause_before of "30s" to delay script execution
images/macos/templates/macOS-13.anka.pkr.hcl Added pause_before of "30s" to delay script execution

@@ -233,6 +233,7 @@ build {
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The pause_before configuration is hardcoded to "30s"; consider centralizing this configuration to reduce duplication and ease future adjustments.

Suggested change
pause_before = "30s"
pause_before = local.pause_before_duration

Copilot uses AI. Check for mistakes.

@@ -232,6 +232,7 @@ build {
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The pause_before configuration is hardcoded to "30s"; consider centralizing this configuration to reduce duplication and ease future adjustments.

Suggested change
pause_before = "30s"
pause_before = "${local.pause_before_duration}"

Copilot uses AI. Check for mistakes.

@@ -234,6 +234,7 @@ build {
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The pause_before configuration is hardcoded to "30s"; consider centralizing this configuration to reduce duplication and ease future adjustments.

Suggested change
pause_before = "30s"
pause_before = "${local.pause_before_duration}"

Copilot uses AI. Check for mistakes.

@@ -233,6 +233,7 @@ build {
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The pause_before configuration is hardcoded to "30s"; consider centralizing this configuration to reduce duplication and ease future adjustments.

Suggested change
pause_before = "30s"
pause_before = local.pause_before_duration

Copilot uses AI. Check for mistakes.

@@ -235,6 +235,7 @@ build {
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The pause_before configuration is hardcoded to "30s"; consider centralizing this configuration to reduce duplication and ease future adjustments.

Copilot uses AI. Check for mistakes.

@@ -234,6 +234,7 @@ build {
provisioner "shell" {
environment_vars = ["API_PAT=${var.github_api_pat}", "IMAGE_FOLDER=${local.image_folder}"]
execute_command = "chmod +x {{ .Path }}; source $HOME/.bash_profile; {{ .Vars }} {{ .Path }}"
pause_before = "30s"
Copy link
Preview

Copilot AI Jun 4, 2025

Choose a reason for hiding this comment

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

[nitpick] The pause_before configuration is hardcoded to "30s"; consider centralizing this configuration to reduce duplication and ease future adjustments.

Suggested change
pause_before = "30s"
pause_before = local.pause_before_duration

Copilot uses AI. Check for mistakes.

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