Skip to content

Commit 8e2a375

Browse files
authored
chore: Verification workflow in build wheels that ensures the wheels built are not development and the correct versions (#2893)
* Test Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix workflow Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix workflow Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Test Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * test Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * test Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
1 parent 80ea7a9 commit 8e2a375

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/build_wheels.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: build_wheels
22

33
# Call this workflow from other workflows in the repository by specifying "uses: ./.github/workflows/build_wheels.yml"
4-
on: [workflow_dispatch, workflow_call]
4+
# Developers who are starting a new release should use this workflow to ensure wheels will be built correctly.
5+
# Devs should check out their fork, add a tag to the last master commit on their fork, and run the release off of their fork on the added tag to ensure wheels will be built correctly.
6+
on:
7+
workflow_dispatch:
8+
tags:
9+
- 'v*.*.*'
10+
workflow_call:
511

612
jobs:
713
get-version:
@@ -134,7 +140,7 @@ jobs:
134140

135141
verify-python-wheels:
136142
runs-on: ${{ matrix.os }}
137-
needs: [build-python-wheel, build-source-distribution]
143+
needs: [build-python-wheel, build-source-distribution, get-version]
138144
strategy:
139145
matrix:
140146
os: [ubuntu-latest, macos-10.15 ]
@@ -153,6 +159,7 @@ jobs:
153159
else
154160
echo "Succeeded!"
155161
fi
162+
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
156163
steps:
157164
- name: Setup Python
158165
id: setup-python
@@ -190,6 +197,19 @@ jobs:
190197
- name: Install OS X dependencies
191198
if: matrix.os == 'macos-10.15'
192199
run: brew install coreutils
200+
# Validate that the feast version installed is not development and is the correct version of the tag we ran it off of.
201+
- name: Validate Feast Version
202+
run: |
203+
VERSION_REGEX='[0-9]+\.[0-9]+\.[0-9]+'
204+
OUTPUT_REGEX='^Feast SDK Version: "$VERSION_REGEX"$'
205+
VERSION_OUTPUT=$(feast version)
206+
VERSION=$(echo $VERSION_OUTPUT | grep -oE "$VERSION_REGEX")
207+
OUTPUT=$(echo $VERSION_OUTPUT | grep -E "$REGEX")
208+
if [ -n "$OUTPUT" ] && [ "$VERSION" = "$VERSION_WITHOUT_PREFIX" ]; then
209+
echo "Correct Feast Version Installed"
210+
else
211+
echo "$VERSION_OUTPUT from installed wheel is not in the correct format or doesn't have the right version $VERSION."
212+
fi
193213
- name: Smoke test
194214
run: |
195215
feast init test_repo
@@ -198,6 +218,7 @@ jobs:
198218
echo "$TEST_SCRIPT" > run-and-wait.sh
199219
bash run-and-wait.sh feast serve
200220
bash run-and-wait.sh feast ui
221+
201222
# We disable this test for the Python 3.10 binary since it does not include Go.
202223
- name: Smoke test with go
203224
if: matrix.python-version != '3.10' || matrix.os == 'ubuntu-latest'

0 commit comments

Comments
 (0)