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

Fix setup-sql-server GitHub Windows Larger Runner incompatibility (OSOE-796) #320

Closed
Piedone opened this issue Feb 4, 2024 · 5 comments · Fixed by #321
Closed

Fix setup-sql-server GitHub Windows Larger Runner incompatibility (OSOE-796) #320

Piedone opened this issue Feb 4, 2024 · 5 comments · Fixed by #321
Assignees
Labels
bug Something isn't working

Comments

@Piedone
Copy link
Member

Piedone commented Feb 4, 2024

When using setup-sql-server under Linux or under Windows but on either a GitHub-hosted Standard Runner or a GitRunners one, it runs to completion without issues. However, executing it under a GitHub-hosted Windows Larger Runner produces this output, failing the workflow:

Chocolatey v2.2.2
Installing the following packages:
sql-server-2022
By installing, you accept licenses for the packages.

chocolatey-dotnetfx.extension v1.0.1 [Approved]
chocolatey-dotnetfx.extension package files install completed. Performing other installation steps.
 Installed/updated chocolatey-dotnetfx extensions.
 The install of chocolatey-dotnetfx.extension was successful.
  Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-dotnetfx'

netfx-4.7.2 v4.7.2 [Approved]
netfx-4.7.2 package files install completed. Performing other installation steps.
Microsoft .NET Framework 4.7.2 or later is already installed.
 The install of netfx-4.7.2 was successful.
  Software install location not explicitly set, it could be in package or
  default install location of installer.

sql-server-2022 v16.0.1000.6 [Approved]
sql-server-2022 package files install completed. Performing other installation steps.
ERROR: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: A system reboot is pending. You must restart Windows first before installing SQL Server
The install of sql-server-2022 was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\sql-server-2022\tools\chocolateyinstall.ps1'.
 See log for details.

Chocolatey installed 2/3 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - sql-server-2022 (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\sql-server-2022\tools\chocolateyinstall.ps1'.
 See log for details.

See e.g. this run.

This might be an issue with Chocolatey or something that we can fix from our script.

Opened actions/runner-images#9277 about this but the maintainers closed it.

Once this is fixed, use a Larger Runner in the build-and-test-larger-runners job's config in OSOCE.

Jira issue

@Piedone Piedone added the bug Something isn't working label Feb 4, 2024
@github-actions github-actions bot changed the title Fix setup-sql-server GitHub Windows Larger Runner incompatibility Fix setup-sql-server GitHub Windows Larger Runner incompatibility (OSOE-796) Feb 4, 2024
@BenedekFarkas
Copy link
Member

You just love it when maintainers don't read the bug reports, just close them.

@Psichorex
Copy link
Contributor

Psichorex commented Feb 6, 2024

image
I assume this is the same as I get locally.
I remember this from OSOE-481. I believe this has to do something with chocolatey indeed. sql-express works perfectly. But the
sql-server-2022 had never worked for me.
So tihs would be a quick fix for this probably : choco install sql-server-express --version=2022.16.0.1000 I can dig into it if you like but I think we either swap from choco but then we induce inconsistency unless we swap that everywhere or we alter to the express version.
I tried to find a similar issue like I have locally but I couldn't find anything.

@Psichorex
Copy link
Contributor

Psichorex commented Feb 6, 2024

Well sadly after testing even sql-server-express is failing the same way. Investigating further.
Edit: I might be wrong here. I will update.

@Piedone
Copy link
Member Author

Piedone commented Feb 6, 2024

We need to stay with Chocolatey. Since this works with the Standard Runners but not the Larger ones, it's not some inherent bug with the approach, but something caused by the differences between the platforms.

@Psichorex
Copy link
Contributor

I got a working setup-sql-server job run by using sql-server-express I am doing some finishing touches to make the Tests able to connect to it. But the problematic job is not failing anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants