Skip to content

Commit 498c137

Browse files
committed
Release v3.0.5
1 parent 9a3ef78 commit 498c137

4 files changed

Lines changed: 32 additions & 1 deletion

File tree

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.0.4
1+
v3.0.5

action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,26 +77,37 @@ inputs:
7777
outputs:
7878
BUILD:
7979
description: Build ID of the build matching the description
80+
value: ${{ steps.convox-action.outputs.BUILD }}
8081
RELEASE:
8182
description: Release ID of the created build
83+
value: ${{ steps.convox-action.outputs.RELEASE }}
8284
DESIRED:
8385
description: Count of desired instances
86+
value: ${{ steps.convox-action.outputs.DESIRED }}
8487
RUNNING:
8588
description: Count of running instances
89+
value: ${{ steps.convox-action.outputs.RUNNING }}
8690
CPU:
8791
description: CPU scale value
92+
value: ${{ steps.convox-action.outputs.CPU }}
8893
MEMORY:
8994
description: Memory scale value
95+
value: ${{ steps.convox-action.outputs.MEMORY }}
9096
PARAM_VALUE:
9197
description: Rack parameter value
98+
value: ${{ steps.convox-action.outputs.PARAM_VALUE }}
9299
SCALING_EVENT:
93100
description: Boolean value to indicate if a scaling event is in progress
101+
value: ${{ steps.convox-action.outputs.SCALING_EVENT }}
94102
RUNNING_PROCESSES:
95103
description: Count of running processes for the service
104+
value: ${{ steps.convox-action.outputs.RUNNING_PROCESSES }}
96105
PENDING_PROCESSES:
97106
description: Count of pending processes for the service
107+
value: ${{ steps.convox-action.outputs.PENDING_PROCESSES }}
98108
UNHEALTHY_PROCESSES:
99109
description: Count of unhealthy processes for the service
110+
value: ${{ steps.convox-action.outputs.UNHEALTHY_PROCESSES }}
100111
runs:
101112
using: 'composite'
102113
steps:
@@ -108,6 +119,7 @@ runs:
108119
chmod 755 /tmp/convox
109120
sudo mv /tmp/convox /usr/local/bin/convox
110121
- name: Run convox action
122+
id: convox-action
111123
shell: bash
112124
run: bash "$GITHUB_ACTION_PATH/entrypoint.sh"
113125
env:

entrypoint-get-scale.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ write_output "PENDING_PROCESSES" "$pending_processes"
2727
write_output "UNHEALTHY_PROCESSES" "$unhealthy_processes"
2828

2929
# Parse scale values
30+
if [ -z "$scale_output" ]; then
31+
echo "::error::No scale row found for service $INPUT_SERVICE in app $INPUT_APP; refusing to assume zero"
32+
exit 1
33+
fi
34+
3035
desired=$(echo "$scale_output" | awk '{print $2}')
3136
running=$(echo "$scale_output" | awk '{print $3}')
3237
cpu=$(echo "$scale_output" | awk '{print $4}')

tests/common.bats

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,3 +283,17 @@ EOF
283283
[ "$status" -eq 0 ]
284284
grep -q "RUNNING_PROCESSES=1" "$GITHUB_OUTPUT"
285285
}
286+
287+
@test "get-scale fails when service scale row is missing" {
288+
setup_get_scale_stubs_with_ps "0" ""
289+
290+
export INPUT_APP="my-app"
291+
export INPUT_SERVICE="worker"
292+
export INPUT_RACK="my-rack"
293+
export INPUT_ERRORONZEROSCALE="false"
294+
295+
run sh entrypoint-get-scale.sh
296+
297+
[ "$status" -eq 1 ]
298+
[[ "$output" == *"No scale row found for service worker"* ]]
299+
}

0 commit comments

Comments
 (0)