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

fix: fly delegated entrypoint handler fallback #1178

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/workflows/dockerhub-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- ".github/workflows/dockerhub-release.yml"
- "common.vars*"
workflow_dispatch:

jobs:
settings:
Expand Down
2 changes: 1 addition & 1 deletion common.vars.pkr.hcl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
postgres-version = "15.1.1.90"
postgres-version = "15.1.1.93"
29 changes: 15 additions & 14 deletions docker/all-in-one/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ function configure_services {
}

function enable_swap {
fallocate -l 1G /mnt/swapfile
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile
fallocate -l 512M /data/swapfile
chmod 600 /data/swapfile
mkswap /data/swapfile
swapon /data/swapfile
}

function push_lsn_checkpoint_file {
Expand Down Expand Up @@ -218,7 +218,7 @@ function fetch_and_execute_delegated_payload {

if [ ! -f $DELEGATED_ARCHIVE_PATH ]; then
echo "No delegated payload found, bailing"
return
return 1
fi

# only extract a valid archive
Expand All @@ -238,14 +238,17 @@ function fetch_and_execute_delegated_payload {
fi
else
echo "Invalid TAR archive"
return
fi

# Run our delegated entry script here
if [ -f "$DELEGATED_ENTRY_PATH" ]; then
chmod +x $DELEGATED_ENTRY_PATH
bash -c "$DELEGATED_ENTRY_PATH $START_TIME"
else
return 1
fi

exit 0
}

# Increase max number of open connections
Expand Down Expand Up @@ -356,11 +359,9 @@ fi
touch "$CONFIGURED_FLAG_PATH"
run_prelaunch_hooks

if [ -n "${DELEGATED_INIT_LOCATION:-}" ]; then
fetch_and_execute_delegated_payload
else
DURATION=$(calculate_duration "$START_TIME" "$(date +%s%N)")
echo "E: Execution time to starting supervisor: $DURATION milliseconds"
start_supervisor
push_lsn_checkpoint_file
fi
fetch_and_execute_delegated_payload

DURATION=$(calculate_duration "$START_TIME" "$(date +%s%N)")
echo "E: Execution time to starting supervisor: $DURATION milliseconds"
start_supervisor
push_lsn_checkpoint_file
Loading