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

Are patch versions of liquibase docker images expected to be immutable? #355

Open
ashleyheath opened this issue Jan 28, 2025 · 6 comments
Open
Assignees

Comments

@ashleyheath
Copy link

It appears that the image for 4.31.0 has been updated since it was originally pushed, which has in turn broken images that use it as a base.

Should we expect images referenced by patch version tags to change over time or is the intention that the most specific version number for a tag will always return the same artifact?

@jnewton03
Copy link
Contributor

hi @ashleyheath , can you provide more details on what broke? For context, the 4.31.0 tag of the docker container did not support custom policy checks out of the box.
https://github.com/liquibase/liquibase/releases/tag/v4.31.0

Policy Checks are undoubtedly one of Liquibase Pro's stickiest capabilities, for which we continually add database platforms, new checks, and customizations. But to get these developments, users would need to download and upgrade to the latest Liquibase. Not any more! With this new checks extension, you can deploy the latest Policy Checks powers by optionally upgrading just the Check Extension on your cadence. Conveniently, this extension is delivered "in the box" at /internal/extensions, so you do not have to change anything about your current Policy Checks workflow.
Learn more https://docs.liquibase.com/pro-extensions

This was because liquibase checks is built with graalvm and requires either a home dir or setting an env var. The simplest solution was to add the home dir for the liquibase user and re-ship 4.31.0.
#353

All of our automated tests passed and our QA team verified the changes.

To answer your question: no, we typically don't re-ship the same version except in rare scenarios like this. If you can provide more context on the issue you're facing we're happy to help.

@jnewton03 jnewton03 self-assigned this Jan 28, 2025
@ashleyheath
Copy link
Author

Hi @jnewton03,

Thanks for taking a look!

We use the liquibase image as a base image and install additional tooling on top to facilitate database connectivity. We were installing this (via bash) using ~/ to reference the liquibase user's home directory.

What appears to happen post this update is that ~/ expands to /liquibase rather than /home/liquibase.

@jnewton03
Copy link
Contributor

@ashleyheath are you using the standard or alpine tag?

@ashleyheath
Copy link
Author

Standard.

@jnewton03
Copy link
Contributor

@ashleyheath prior to 4.31.0 there was no home directory for the liquibase user:

docker run -it liquibase:4.30.0 bash
liquibase@b2f8b1924098:/liquibase$ pwd
/liquibase
liquibase@b2f8b1924098:/liquibase$ cd
bash: cd: /home/liquibase: No such file or directory
liquibase@b2f8b1924098:/liquibase$ ls ~
ls: cannot access '/home/liquibase': No such file or directory
liquibase@b2f8b1924098:/liquibase$ ls ~/
ls: cannot access '/home/liquibase/': No such file or directory
liquibase@b2f8b1924098:/liquibase$

That was the issue we ran into with liquibase checks. It would fail since there was no home directory because the useradd command does not create a home dir by default. Now with 4.31.0 we have an explicitly defined home directory:

docker run -it liquibase:4.31.0 bash
liquibase@b836400472a9:~$ pwd
/liquibase
liquibase@b836400472a9:~$ ls ~
ABOUT.txt  bin  changelog.txt  docker-entrypoint.sh  examples  GETTING_STARTED.txt  internal  lib  licenses  LICENSE.txt  liquibase  liquibase.bat  liquibase.docker.properties  README.txt  UNINSTALL.txt
liquibase@b836400472a9:~$ ls ~/
ABOUT.txt  bin  changelog.txt  docker-entrypoint.sh  examples  GETTING_STARTED.txt  internal  lib  licenses  LICENSE.txt  liquibase  liquibase.bat  liquibase.docker.properties  README.txt  UNINSTALL.txt

Can you share your dockerfile and perhaps I can be of some assistance?

@jnewton03
Copy link
Contributor

hi @ashleyheath , just following up to see if I can be of assistance or if this issue can be closed. Thanks!

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

No branches or pull requests

2 participants