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 Github Action CI tests on Postgres cluster for versions <= 11 #9

Open
nicolas-fricke opened this issue Apr 19, 2021 · 0 comments
Open
Labels
CI & Code Quality Improvements to the code quality or tests of the gem

Comments

@nicolas-fricke
Copy link
Member

Around April 15th the CI setup testing against Postgres started failing. This failure was unrelated to any code changes and started happening during the setup steps of the job, before running any code from the repository.

The error seems to originate from the ankane/setup-postgres step and seems related to it not being able to download and install the correct postgresql package via apt:

Run ankane/setup-postgres@v1
sudo pg_dropcluster 13 main
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/pgdg.list" -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
Reading package lists...
W: Unable to read /etc/apt/-/ - DirectoryExists (2: No such file or directory)
W: Unable to read /etc/apt/sources.list.d/pgdg.list - RealFileExists (2: No such file or directory)
sudo apt-get install postgresql-11
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql-11
child_process.js:660
    throw err;
    ^

Error: Command failed: sudo apt-get install postgresql-11
    at checkExecSyncError (child_process.js:621:11)
    at execSync (child_process.js:657:15)
    at run (/home/runner/work/_actions/ankane/setup-postgres/v1/index.js:7:3)
    at Object.<anonymous> (/home/runner/work/_actions/ankane/setup-postgres/v1/index.js:96:5)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11 {
  status: 100,
  signal: null,
  output: [ null, null, null ],
  pid: 2392,
  stdout: null,
  stderr: null
}

This is an example of the error occuring.

@nicolas-fricke nicolas-fricke added the CI & Code Quality Improvements to the code quality or tests of the gem label Apr 19, 2021
nicolas-fricke added a commit that referenced this issue Apr 19, 2021
Since around April 15th the tests on Postgres started failing due to
having issues will running `sudo apt-get install postgresql-<version>`.
This is done internally by the `ankane/setup-postgres` step and up to
that point worked without issues. Up to that date we used Ubuntu 18.04
but there, no Postgres version could be installed via the script
anymore. While investigating, we found that on Ubuntu 20.04 Postgres 12
and 13 could at least still be installed.

This was unrelated to any changes done in this repository. Therefore, to
unblock further development of this gem, upgrade the PG tests to use
Ubuntu 20.04 and remove the PG versions that no longer seem to work from
the test matrix.

Also, create #9 to
re-enable tests for older Postgres versions to ensure compatibility of
the gem.
@nicolas-fricke nicolas-fricke linked a pull request Apr 19, 2021 that will close this issue
nicolas-fricke added a commit that referenced this issue Apr 19, 2021
Since around April 15th the tests on Postgres started failing due to
having issues will running `sudo apt-get install postgresql-<version>`.
This is done internally by the `ankane/setup-postgres` step and up to
that point worked without issues. Up to that date we used Ubuntu 18.04
but there, no Postgres version could be installed via the script
anymore. While investigating, we found that on Ubuntu 20.04 Postgres 12
and 13 could at least still be installed.

This was unrelated to any changes done in this repository. Therefore, to
unblock further development of this gem, upgrade the PG tests to use
Ubuntu 20.04 and remove the PG versions that no longer seem to work from
the test matrix.

Also, create #9 to
re-enable tests for older Postgres versions to ensure compatibility of
the gem.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI & Code Quality Improvements to the code quality or tests of the gem
Projects
None yet
Development

No branches or pull requests

1 participant