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

Update/Add Postgres Version option #11531

Open
1 of 16 tasks
PaulieScanlon opened this issue Feb 3, 2025 · 9 comments · May be fixed by #11734
Open
1 of 16 tasks

Update/Add Postgres Version option #11531

PaulieScanlon opened this issue Feb 3, 2025 · 9 comments · May be fixed by #11734

Comments

@PaulieScanlon
Copy link

Tool name

postgresql.service

Tool license

MIT

Add or update?

  • Add
  • Update

Desired version

postgresql 17

Approximate size

No response

Brief description of tool

I've been using postgresql.service to perform scheduled dump/restore of my postgres database and it works great with the built-in version. However. Since the built-in service is set to "latest" there might be cases where i'll hit mismatch errors.

It would be so good if, when using the built-in service i could set which version of Postgres to use. E. g

jobs:
  dump-and-restore:
    runs-on: ubuntu-latest

    steps:
      - name: Start PostgreSQL Service
        run: |
          sudo systemctl start postgresql.service -v 17 // i've added the -v 17 to show one way this could work

Watta you think?

URL for tool's homepage

No response

Provide a basic test case to validate the tool's functionality.

Platforms where you need the tool

  • Azure DevOps
  • GitHub Actions

Runner images where you need the tool

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Can this tool be installed during the build?

Tool installation time in runtime

No response

Are you willing to submit a PR?

No response

@PaulieScanlon PaulieScanlon changed the title Update/Add [tool name] Update/Add Postgres Version option Feb 3, 2025
@lakshminarayana02
Copy link

Hi
We are validating your request and according to the description, we assume that it is required for latest Ubuntu version.

@PaulieScanlon
Copy link
Author

Hi @lakshminarayana02, wow, thanks. Super quick.

Hmm, great question. I don't know enough about Ubuntu, but would it be safe to assume that "Ubuntu latest" would work with any version of PostgreSQL?

I suppose there might be a risk with providing a -v option for the version of PostgreSQL and then later running into issues because it can't run on whatever version of Ubuntu the runner is currently using.

What do you think?

@lakshminarayana02
Copy link

Hi
acknowledged, we'll keep you updated.

@PaulieScanlon
Copy link
Author

Great, thanks @lakshminarayana02!

@lakshminarayana02
Copy link

lakshminarayana02 commented Feb 24, 2025

Hi
We tested it, and changes are likely to be implemented in forthcoming deployments based on the internal process. Please bear with us.

@PaulieScanlon
Copy link
Author

Hey @lakshminarayana02, super stuff. Thank you.!

@Prabhatkumar59
Copy link
Contributor

Hi @PaulieScanlon - The requirement will be taken care under this announcement(#11723).
Thanks!

GIgako19929 added a commit to GIgako19929/runner-images that referenced this issue Mar 5, 2025
Fixes actions#11531

Add a test for PostgreSQL service with specified version in `Databases.Tests.ps1`.

* Add a new test case to start PostgreSQL service with version 17.
* Validate that PostgreSQL service is accepting connections.
* Stop the PostgreSQL service after the test.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/actions/runner-images/issues/11531?shareId=XXXX-XXXX-XXXX-XXXX).
@GIgako19929 GIgako19929 linked a pull request Mar 5, 2025 that will close this issue
@GIgako19929
Copy link

``

@PaulieScanlon
Copy link
Author

Thanks, @Prabhatkumar59. I've reviewed the update, and perhaps I'm not understanding correctly. My original request was to allow users to choose which version of Postgres to install, not to update the current version to 17.

E.g, this example uses the -v flag to install version 17.

jobs:
  dump-and-restore:
    runs-on: ubuntu-latest

    steps:
      - name: Start PostgreSQL Service
        run: |
          sudo systemctl start postgresql.service -v 17

Or, in this example it uses the -v flag to install version 14.

jobs:
  dump-and-restore:
    runs-on: ubuntu-latest

    steps:
      - name: Start PostgreSQL Service
        run: |
          sudo systemctl start postgresql.service -v 14

The idea is that users will be able to decide which version of Postgres the built-in service installs in the runner. Is that going to be possible with the next update?

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

Successfully merging a pull request may close this issue.

6 participants