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

[Windows] Unpin Postgres allowing latest v14 version #11047

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lawrencegripper
Copy link

@lawrencegripper lawrencegripper commented Nov 26, 2024

Description

New tool, Bug fixing, or Improvement?

  • Version update

Please include a summary of the change and which issue is fixed. Also include relevant motivation and context.

  • Currently patch version of postgres is pinned on Windows. This removes that pin to allow the latest minor version of v14 to be installed.

For new tools, please provide total size and installation time.

Related issue:

Check list

  • Related issue / work item is attached
  • Tests are written (if applicable)
  • Documentation is updated (if applicable)
  • Changes are tested and related VM images are successfully generated

removed these by accident, postgres releases are
signed with same key so keeping this allows us
to validate it
@lawrencegripper lawrencegripper changed the title [WIP] Unpin Postgres on Windows images allowing latest v14 version. [Windows] Unpin Postgres allowing latest v14 version Nov 26, 2024
@lawrencegripper
Copy link
Author

Hitting this when running the CI. Having a look at debugging now.

==> azure-arm.image: Provisioning with powershell script: /home/runner/work/runner-images-ci/runner-images-ci/images/windows/templates/../scripts/build/Install-PostgreSQL.ps1
    azure-arm.image: Downloading package from https://get.enterprisedb.com/postgresql/postgresql-14.15-1-windows-x64.exe to C:\Users\packer\AppData\Local\Temp\postgresql-14.15-1-windows-x64.exe...
    azure-arm.image: Package downloaded in 1.27 seconds
    azure-arm.image: Signature for C:\Users\packer\AppData\Local\Temp\postgresql-14.15-1-windows-x64.exe is valid
    azure-arm.image: Starting Install ...
    azure-arm.image: Installation process returned unexpected exit code: 1
    azure-arm.image: Time elapsed: 141.61 seconds

@lawrencegripper
Copy link
Author

lawrencegripper commented Nov 27, 2024

With a local Windows box I can reproduce this error.

I get:

There has been an error. Error running ...\getlocales.exe : child killed: unknown signal

Searching this maps to the issue seen here

https://stackoverflow.com/questions/71790488/postgresql-error-running-c-getlocales-exe-child-killed-unknown-signal

Running postgres.exe --help shows that --install-runtimes 0 skips installing the necessary MSVC Redistributable which the installer needs.

Testing locally, with that param removed the installation goes ahead

screenshot-2024-11-27-15-57-24

I think this worked with previous versions as they used aka.ms/vs/17/release/vc_redist.x64.exe which is installed by out Install-VisualStudio.ps1 command here:

https://github.com/lawrencegripper/runner-images/blob/181b98660dd23f8de32e6cb068d261e98b6bdad0/images/windows/templates/windows-2019.pkr.hcl#L388

https://github.com/lawrencegripper/runner-images/blob/181b98660dd23f8de32e6cb068d261e98b6bdad0/images/windows/scripts/helpers/VisualStudioHelpers.ps1#L35

As that that provisioner is invoked before postgres the MSVC Redistributable was present when we got to installing postgres.

Now that postgres needs MSVC 17 that is no longer the case.

I've removed the --install_runtimes 0 from the postgres install so it'll add MSVC 17 and in future auto add newer ones as it requires them.

Newer postgres installes require MSVC 17 which isn't
on the box by default.

Previously this worked as they required MSVC 16
which was installed by Visual Studio

actions#11047 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant