-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add tests against latest stable releases of Postgres 11, 12, & 13 #67
Open
richardmcmillen
wants to merge
8
commits into
Squarespace:master
Choose a base branch
from
richardmcmillen:add-tests-for-postgresql-11-12-13
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add tests against latest stable releases of Postgres 11, 12, & 13 #67
richardmcmillen
wants to merge
8
commits into
Squarespace:master
from
richardmcmillen:add-tests-for-postgresql-11-12-13
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As of 21 March 2021 running `make build` on the default branch of this repository breaks with the following error: ``` ERROR: Command errored out with exit status 1: command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bfkg7hzw/markupsafe_2ff6d76a552d4703960c9f49f15673c8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bfkg7hzw/markupsafe_2ff6d76a552d4703960c9f49f15673c8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-hn261ajv cwd: /tmp/pip-install-bfkg7hzw/markupsafe_2ff6d76a552d4703960c9f49f15673c8/ Complete output (5 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-bfkg7hzw/markupsafe_2ff6d76a552d4703960c9f49f15673c8/setup.py", line 6, in <module> from setuptools import setup, Extension, Feature ImportError: cannot import name 'Feature' ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/MarkupSafe-1.0.tar.gz#sha256=a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665 (from https://pypi.org/simple/markupsafe/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement MarkupSafe==1.0 ERROR: No matching distribution found for MarkupSafe==1.0 ``` There is a Closed issue logged in the MarkupSafe repository, pallets/markupsafe#116 where a maintainer explained upgrading shouldn't have any compatibility issues. So the MarkupSafe requirement has been set to 1.1.1
richardmcmillen
changed the title
Add tests for postgresql 11 12 13
Add tests against latest stable releases of Postgres 11, 12, & 13
Mar 21, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR; Add tests against latest stable releases of Postgres 11, 12, & 13
Thanks to this PR #59 for giving me a head start. However, I didn't end up integrating some of the changes in their diff. Unless I am missing something I believe it was how the test failures manifested which led them down the path of having to do the
except
ownership but I don't think this is necessary.Although it should be restated that the tool probably does work fine on versions 11, 12, 13 and this change is more about allowing the project to prove this officially by updating the expectations in tests.
Diff explanation
The changes in the tests were driven by two things:
postgres
superuser is not created. There were some assumptions made in tests that reasonably expected this user to be there which need to be conditionally handled depending on the version under test.Concretely the differences can be seen by generating a spec from freshly initialized Postgres clusters. This uses parts of the Makefile already in the repository.
I will put the contents of each version here but the main difference is between 10.4 and 11.11. It appears that since version 11 the
postgres
superuser isn't created when given an alternative user through thePOSTGRES_USER
environment variable. As a consequence of this the user provided owns all the items which thepostgres
superuser would have before.In addition to these changes, you can see that version 11 also introduces some new roles not existing in older versions.
postgres-10.4.yml
postgres-11.11.yml
postgres-12.6.yml
postgres-13.2.yml
Summary
The changes I have made here a very brute force attempt at getting everything working here so maybe there is a more elegant way to address these changes. For now, all the commits are marked WIP and I intend to tidy them up, squash them, update the docs, and add more code comments if the maintainers of the repository are interested in having this submission. It's just at this juncture I am unsure about the maintainer status of the project and so I don't want to sink too much time in unless there is a chance of getting things merged.
A general sidenote just to say that I love the idea of this project and it would be great to use if I can address some of the other issues (#3, #49, #17) which I am fairly motivated to do. Once again, many thanks. :)