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

Adds changes for one branch pipelines #945

Merged
merged 20 commits into from
Jul 28, 2022
Merged

Conversation

gurkanindibay
Copy link
Contributor

@gurkanindibay gurkanindibay commented Jul 25, 2022

Changes drop into three categories

  1. One branch pipelines needs images to stay in working state after image start. With the new environment variable which is set in one branch pipeline, image stay in working state
  2. Images are now being pushed into new Azure Container registry, 'citusengine' which is used by OneBeanch pipeline
  3. sudo package is added into deb based docker files since it is required for OneBranch and does not exist in debian based images by default

Note. Since nightlies are failing nightly tests in this PR fails as well. So I could not fix the problem in here I will fix it in another PR. Therefore please ignore nightly pipeline test fail for this PR
Related PRS:
citusdata/tools#233
https://msdata.visualstudio.com/Database%20Systems/_git/citus-packaging/pullrequest/817728

@@ -64,4 +64,10 @@ done <"${topdir}/os-list.csv"

echo -e "${args}" | xargs -t -L1 -P "${nprocs}" docker

docker tag citus/"${image_name}":"${tag}" citusengine.azurecr.io/citus/"${image_name}":"${tag}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACR Push code block

@@ -1,7 +1,16 @@
#!/bin/bash

# make bash behave
set -euo pipefail
set -eo pipefail
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When initializing the docker image in OneBranch, docker run process fall into this block so it does not die

Copy link
Member

@onurctirtir onurctirtir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please consider the comments before merging

@@ -71,6 +71,7 @@ RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ %%release%%-pgdg main' >
liblz4-1 \
libzstd1 \
libzstd-dev \
sudo \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not usually advised to use sudo in docker environment. Why is this addition necessary?

Did you consider gosu or USER docker directives instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it is ok then. We can not do anything about this if OneBranch decides to use an antipattern 😮‍💨

if [[ -z ${CONTAINER_BUILD_RUN_ENABLED} ]]; then
echo "INFO: Image working in waiting mode. Not executing build script"
tail -f /dev/null
exit 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is an error, does it make sense to return 0?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is this even reachable? How do we terminate or stop this docker image?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right I added it just to show that it is not error and a valid code path. It's better to remove it. It may be confusing

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we terminate the docker container then? Does it keep running forever indefinitely?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker stop :)

@gurkanindibay gurkanindibay merged commit 6c3fb8a into develop Jul 28, 2022
@gurkanindibay gurkanindibay deleted the one_branch_image_changes branch July 28, 2022 11:34
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

Successfully merging this pull request may close these issues.

3 participants