Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependency-security-post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
postfix="-v${short_sha}"

cd citus
sed -i -E "s|(image_suffix:\s*)\"-v[0-9a-f]+\"|\1\"${postfix}\"|" .github/workflows/build_and_test.yml
sed -i -E "s#(image_suffix:\s*)\"-(v|dev-)[0-9a-f]+\"#\1\"${postfix}\"#" .github/workflows/build_and_test.yml

if git diff --quiet -- .github/workflows/build_and_test.yml; then
echo "No build_and_test.yml image_suffix change needed."
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/dependency-security-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ jobs:
run: |
cd citus/src/test/regress
base=$(pipenv requirements)
dev=$(pipenv requirements --dev)
dev=$(pipenv requirements --dev-only)
cd "$GITHUB_WORKSPACE"
ref="citusdata/citus#${CITUS_PR}"
base_header=$'# generated from Citus\'s Pipfile.lock (in src/test/regress) as of '"${ref}"$'\n# using `pipenv requirements > requirements.txt`, so as to avoid the\n# need for pipenv/pyenv in this image\n\n'
dev_header=$'# generated from Citus\'s Pipfile.lock (in src/test/regress) as of '"${ref}"$'\n# using `pipenv requirements --dev > requirements.txt`, so as to avoid the\n# need for pipenv/pyenv in this image\n\n'
dev_header=$'# generated from Citus\'s Pipfile.lock (in src/test/regress) as of '"${ref}"$'\n# using `pipenv requirements --dev-only > requirements.txt`, so as to avoid the\n# need for pipenv/pyenv in this image\n\n'
for f in \
circleci/images/citusupgradetester/files/etc/requirements.txt \
circleci/images/failtester/files/etc/requirements.txt \
Expand Down Expand Up @@ -184,6 +184,28 @@ jobs:
fi
echo "THE_PROCESS_PR=$pr_number" >> "$GITHUB_ENV"

- name: Point citus CI at the-process dev image
if: steps.sync.outputs.addressed != ''
run: |
# Synced requirements ship in the-process dev images tagged -dev-<sha>
# built when the automation branch is pushed. Point the citus PR at that
# image so its CI validates the new deps (skip if nothing was rebuilt).
if [ "$(git rev-list --count origin/master..HEAD)" -eq 0 ]; then
echo "No the-process commit; leaving citus image_suffix unchanged."
exit 0
fi
tp_sha=$(git rev-parse --short HEAD)
cd citus
source "$GITHUB_WORKSPACE/.github/scripts/safe_push.sh"
sed -i -E "s|(image_suffix:\s*)\"[^\"]*\"|\1\"-dev-${tp_sha}\"|" .github/workflows/build_and_test.yml
if git diff --quiet -- .github/workflows/build_and_test.yml; then
echo "citus image_suffix already -dev-${tp_sha}."
else
git add .github/workflows/build_and_test.yml
git commit -m "Point CI at the-process dev image for synced requirements"
safe_push automation/dependency-security-sync origin/main
fi

- name: Summary
if: steps.alerts.outputs.count != '0'
run: |
Expand Down