-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Adds automated user creation in production image #13728
Adds automated user creation in production image #13728
Conversation
When adding this one, it was already too much of a logic where function were mixed with code in the entrypoint so I used the opportunity to follow Google's guidelines and extract the logic into functions and call the functions - instead of inlining the logic. Looks much neater and it is easy to understand what happens step-by-step. Corresponding to that I also updated the documentation to describe what happens in the prod image entrypoint so that users are not surprised by what happens by default and still can (if they really want) try out the image and start webserver or generally initialise the DB inside of airflow by just passing the right variables. Good for quick sanity checks. |
The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*. |
1977824
to
d5e63da
Compare
Temprary failures - it's good to go. |
d5e63da
to
ed8b783
Compare
ed8b783
to
c3cf1ef
Compare
d2c0f3f
to
1bd4b5d
Compare
This PR implements automated user creation for production image controlled by environment variables. This is a solution for anyone who would like to make a quick test with the production image and would like to: * init/upgrade the db automatically * create a user This is particularly useful for internal sqlite db initialization but can also be used to initialize the user in docker-compose or similar cases where there is no equivalent of init containers that are usually used to perform the initilization. Closes apache#8606
1bd4b5d
to
93712ba
Compare
All points addressed @kaxil ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 (commented only a minor suggestion)
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Co-authored-by: Felix Uellendall <[email protected]>
* Adds automated user creation in the production image This PR implements automated user creation for the production image controlled by environment variables. This is a solution for anyone who would like to make a quick test of the production image and would like to: * init/upgrade the DB automatically * create a user This is particularly useful for internal SQLite db initialization but can also be used to initialize the user in docker-compose or similar cases where there is no equivalent of init containers that are usually used to perform the initialization. Closes #860 (cherry picked from commit bc026cf)
This PR implements automated user creation for production image
controlled by environment variables.
This is a solution for anyone who would like to make a quick test
with the production image and would like to:
This is particularly useful for internal sqlite db initialization
but can also be used to initialize the user in docker-compose
or similar cases where there is no equivalent of init containers
that are usually used to perform the initilization.
Closes #8606
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.