Skip to content

Commit 22b9138

Browse files
franciscojavierarceotchughesivlokeshrangineni
authored
fix: Fix GitHub Actions to pass authentication (feast-dev#4963)
* fix: Update workflows to also use workflow_call Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Also adding workflow_call to release version Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Adding type to release version input Signed-off-by: Francisco Javier Arceo <[email protected]> * chore: Fix operator release workflow (v0.43-branch) (feast-dev#4937) fix operator release workflow Signed-off-by: Tommy Hughes <[email protected]> * fix: Updated type in yaml Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Updating publish.yml Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Update type in publish_images Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Updating publish helm charts Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Updating publish java sdk Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Updating environment variable in the build_wheels Signed-off-by: Francisco Javier Arceo <[email protected]> * updating input parameters to build wheels Signed-off-by: Francisco Javier Arceo <[email protected]> * formatting issue Signed-off-by: Francisco Javier Arceo <[email protected]> * chore: Fix operator release for 0.43.0 (v0.43-branch) (feast-dev#4939) fix operator release for 0.43.0 Signed-off-by: Tommy Hughes <[email protected]> * renaming args and adding more Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Adding outputs to build_wheels workflow Signed-off-by: Francisco Javier Arceo <[email protected]> * reverting changes Signed-off-by: Francisco Javier Arceo <[email protected]> * chore: Add ability to change default feature-server image during Operator deploy (v0.43-branch) (feast-dev#4941) chore: Add ability to change default feature-server image during Operator deploy (feast-dev#4940) Signed-off-by: Tommy Hughes <[email protected]> * chore: CR image no longer needed for e2e (v0.43-branch) (feast-dev#4943) CR image no longer needed for e2e Signed-off-by: Tommy Hughes <[email protected]> * chore: Fix publish, versions issue (feast-dev#4944) fix publish, versions issue Signed-off-by: Tommy Hughes <[email protected]> * chore: Fix publish, versions issue (feast-dev#4945) fix publish, versions issue Signed-off-by: Tommy Hughes <[email protected]> * chore: Fix publish, versions issue (feast-dev#4946) fix publish, versions issue Signed-off-by: Tommy Hughes <[email protected]> * chore: Fix publish, versions issue (feast-dev#4947) fix publish, versions issue Signed-off-by: Tommy Hughes <[email protected]> * fix publish, versions issue (feast-dev#4948) Signed-off-by: Tommy Hughes <[email protected]> * fix: adding checkout to publish sdk Signed-off-by: Francisco Javier Arceo <[email protected]> * chore: Change get version workflow to an action (feast-dev#4951) change get version workflow to an action Signed-off-by: Tommy Hughes <[email protected]> * fix: Release Fix - Added the workflow_call element in missing workflows (feast-dev#4954) Added the workflow_call element in all the workflows wherever there is a workflow_dispatch element to see if that fixes the problem to be able to call the workflow from another workflow. Signed-off-by: lrangine <[email protected]> * chore: Build wheels fix (feast-dev#4957) dev Signed-off-by: Tommy Hughes <[email protected]> * chore: Fix python-sdk workflow (feast-dev#4958) dev Signed-off-by: Tommy Hughes <[email protected]> * fix: adding type and workflow_call to build_wheels.yml Signed-off-by: Francisco Javier Arceo <[email protected]> * chore: Remove checkout from get-version action (feast-dev#4959) dev Signed-off-by: Tommy Hughes <[email protected]> * chore: Fixing build wheels pre-release image build (feast-dev#4960) dev Signed-off-by: Tommy Hughes <[email protected]> * fix: Updating pypi upload to use legacy repo url (feast-dev#4962) Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Updating repostiry to repostory url Signed-off-by: Francisco Javier Arceo <[email protected]> * converting to dash to see if that works Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Updating pypi publish action and adding name Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: moving back to kebab case Signed-off-by: Francisco Javier Arceo <[email protected]> * fix: Trying to hardcode gh-action version Signed-off-by: Francisco Javier Arceo <[email protected]> * trying new version with oidc false Signed-off-by: Francisco Javier Arceo <[email protected]> * trying without attestations Signed-off-by: Francisco Javier Arceo <[email protected]> * reverting again to old action and removing checkout action Signed-off-by: Francisco Javier Arceo <[email protected]> * reverting code to existing master without actions checkout Signed-off-by: Francisco Javier Arceo <[email protected]> * logging token length to validate it and adding quotes to password Signed-off-by: Francisco Javier Arceo <[email protected]> * adding logging to the build wheels to see if secret is present there Signed-off-by: Francisco Javier Arceo <[email protected]> * adding secrets to jobs keyword Signed-off-by: Francisco Javier Arceo <[email protected]> * adding input parameters to build wheels and publish python sdk Signed-off-by: Francisco Javier Arceo <[email protected]> * addding inherit Signed-off-by: Francisco Javier Arceo <[email protected]> * commenting out the publish python sdk and adding inherit Signed-off-by: Francisco Javier Arceo <[email protected]> * commenting out the needs Signed-off-by: Francisco Javier Arceo <[email protected]> * removing commented out code and logging to incorporate code that worked Signed-off-by: Francisco Javier Arceo <[email protected]> * adding one more change to remove logging Signed-off-by: Francisco Javier Arceo <[email protected]> * removing changes outside of actions Signed-off-by: Francisco Javier Arceo <[email protected]> * removing makefile change Signed-off-by: Francisco Javier Arceo <[email protected]> * removing yamls Signed-off-by: Francisco Javier Arceo <[email protected]> * removing changes files and reverting move of file Signed-off-by: Francisco Javier Arceo <[email protected]> * reverting changed files Signed-off-by: Francisco Javier Arceo <[email protected]> --------- Signed-off-by: Francisco Javier Arceo <[email protected]> Signed-off-by: Tommy Hughes <[email protected]> Signed-off-by: lrangine <[email protected]> Co-authored-by: Tommy Hughes IV <[email protected]> Co-authored-by: lokeshrangineni <[email protected]>
1 parent b026d0c commit 22b9138

File tree

9 files changed

+264
-159
lines changed

9 files changed

+264
-159
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Get semantic release version
2+
description: ""
3+
inputs:
4+
custom_version: # Optional input for a custom version
5+
description: "Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing"
6+
required: false
7+
token:
8+
description: "Personal Access Token"
9+
required: true
10+
default: ""
11+
outputs:
12+
release_version:
13+
description: "The release version to use (e.g., v1.2.3)"
14+
value: ${{ steps.get_release_version.outputs.release_version }}
15+
version_without_prefix:
16+
description: "The release version to use without 'v' (e.g., 1.2.3)"
17+
value: ${{ steps.get_release_version_without_prefix.outputs.version_without_prefix }}
18+
highest_semver_tag:
19+
description: "The highest semantic version tag without the 'v' prefix (e.g., 1.2.3)"
20+
value: ${{ steps.get_highest_semver.outputs.highest_semver_tag }}
21+
runs:
22+
using: composite
23+
steps:
24+
- name: Get release version
25+
id: get_release_version
26+
shell: bash
27+
env:
28+
GITHUB_TOKEN: ${{ inputs.token }}
29+
GIT_AUTHOR_NAME: feast-ci-bot
30+
GIT_AUTHOR_EMAIL: [email protected]
31+
GIT_COMMITTER_NAME: feast-ci-bot
32+
GIT_COMMITTER_EMAIL: [email protected]
33+
run: |
34+
if [[ -n "${{ inputs.custom_version }}" ]]; then
35+
VERSION_REGEX="^v[0-9]+\.[0-9]+\.[0-9]+$"
36+
echo "Using custom version: ${{ inputs.custom_version }}"
37+
if [[ ! "${{ inputs.custom_version }}" =~ $VERSION_REGEX ]]; then
38+
echo "Error: custom_version must match semantic versioning (e.g., v1.2.3)."
39+
exit 1
40+
fi
41+
echo "::set-output name=release_version::${{ inputs.custom_version }}"
42+
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
43+
echo "Using tag reference: ${GITHUB_REF#refs/tags/}"
44+
echo "::set-output name=release_version::${GITHUB_REF#refs/tags/}"
45+
else
46+
echo "Defaulting to branch name: ${GITHUB_REF#refs/heads/}"
47+
echo "::set-output name=release_version::${GITHUB_REF#refs/heads/}"
48+
fi
49+
- name: Get release version without prefix
50+
id: get_release_version_without_prefix
51+
shell: bash
52+
env:
53+
RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }}
54+
run: |
55+
if [[ "${RELEASE_VERSION}" == v* ]]; then
56+
echo "::set-output name=version_without_prefix::${RELEASE_VERSION:1}"
57+
else
58+
echo "::set-output name=version_without_prefix::${RELEASE_VERSION}"
59+
fi
60+
- name: Get highest semver
61+
id: get_highest_semver
62+
shell: bash
63+
env:
64+
RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }}
65+
run: |
66+
if [[ -n "${{ inputs.custom_version }}" ]]; then
67+
HIGHEST_SEMVER_TAG="${{ inputs.custom_version }}"
68+
echo "::set-output name=highest_semver_tag::$HIGHEST_SEMVER_TAG"
69+
echo "Using custom version as highest semantic version: $HIGHEST_SEMVER_TAG"
70+
else
71+
source infra/scripts/setup-common-functions.sh
72+
SEMVER_REGEX='^v[0-9]+\.[0-9]+\.[0-9]+(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$'
73+
if echo "${RELEASE_VERSION}" | grep -P "$SEMVER_REGEX" &>/dev/null ; then
74+
echo ::set-output name=highest_semver_tag::$(get_tag_release -m)
75+
echo "Using infra/scripts/setup-common-functions.sh to generate highest semantic version: $HIGHEST_SEMVER_TAG"
76+
fi
77+
fi
78+
- name: Check output
79+
shell: bash
80+
env:
81+
RELEASE_VERSION: ${{ steps.get_release_version.outputs.release_version }}
82+
VERSION_WITHOUT_PREFIX: ${{ steps.get_release_version_without_prefix.outputs.version_without_prefix }}
83+
HIGHEST_SEMVER_TAG: ${{ steps.get_highest_semver.outputs.highest_semver_tag }}
84+
run: |
85+
echo $RELEASE_VERSION
86+
echo $VERSION_WITHOUT_PREFIX
87+
echo $HIGHEST_SEMVER_TAG

.github/workflows/build_wheels.yml

Lines changed: 57 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1-
name: build_wheels
1+
name: build wheels
22

33
# Call this workflow from other workflows in the repository by specifying "uses: ./.github/workflows/build_wheels.yml"
44
# Developers who are starting a new release should use this workflow to ensure wheels will be built correctly.
55
# 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.
66
on:
7-
workflow_dispatch:
8-
tags:
9-
- 'v*.*.*'
10-
workflow_call:
7+
workflow_dispatch: # Allows manual trigger of the workflow
118
inputs:
12-
release_version:
13-
description: 'The release version to use (e.g., v1.2.3)'
9+
custom_version: # Optional input for a custom version
10+
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
11+
required: false
12+
type: string
13+
token:
14+
description: 'Personal Access Token'
1415
required: true
16+
default: ""
17+
type: string
18+
workflow_call:
19+
inputs:
20+
custom_version: # Optional input for a custom version
21+
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
22+
required: false
1523
type: string
16-
highest_semver_tag:
17-
description: 'The highest semantic version tag without the "v" prefix (e.g., 1.2.3)'
24+
token:
25+
description: 'Personal Access Token'
1826
required: true
27+
default: ""
1928
type: string
2029

2130
jobs:
22-
get-version:
23-
uses: ./.github/workflows/get_semantic_release_version.yml
24-
with:
25-
custom_version: ${{ github.event.inputs.custom_version }}
26-
token: ${{ github.event.inputs.token }}
27-
2831
build-python-wheel:
2932
name: Build wheels
3033
runs-on: ubuntu-latest
@@ -42,10 +45,18 @@ jobs:
4245
registry-url: 'https://registry.npmjs.org'
4346
- name: Build UI
4447
run: make build-ui
48+
- id: get-version
49+
uses: ./.github/actions/get-semantic-release-version
50+
with:
51+
custom_version: ${{ github.event.inputs.custom_version }}
52+
token: ${{ github.event.inputs.token }}
4553
- name: Build wheels
54+
env:
55+
VERSION: ${{ steps.get-version.outputs.release_version }}
56+
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
4657
run: |
4758
git fetch --tags
48-
git checkout v0.42.0
59+
git checkout ${VERSION}
4960
python -m pip install build
5061
python -m build --wheel --outdir wheelhouse/
5162
- uses: actions/upload-artifact@v4
@@ -69,11 +80,18 @@ jobs:
6980
with:
7081
node-version-file: './ui/.nvmrc'
7182
registry-url: 'https://registry.npmjs.org'
83+
- id: get-version
84+
uses: ./.github/actions/get-semantic-release-version
85+
with:
86+
custom_version: ${{ github.event.inputs.custom_version }}
87+
token: ${{ github.event.inputs.token }}
7288
- name: Build and install dependencies
89+
env:
90+
VERSION: ${{ steps.get-version.outputs.release_version }}
7391
# There's a `git restore` in here because `make install-go-ci-dependencies` is actually messing up go.mod & go.sum.
7492
run: |
7593
git fetch --tags
76-
git checkout v0.42.0
94+
git checkout ${VERSION}
7795
pip install -U pip setuptools wheel twine
7896
make build-ui
7997
git status
@@ -89,11 +107,12 @@ jobs:
89107

90108
# We add this step so the docker images can be built as part of the pre-release verification steps.
91109
build-docker-images:
110+
name: Build Docker images
92111
runs-on: ubuntu-latest
93-
needs: get-version
112+
needs: [ build-python-wheel, build-source-distribution ]
94113
strategy:
95114
matrix:
96-
component: [ feature-server, feature-server-java, feature-transformation-server, feast-operator ]
115+
component: [ feature-server-dev, feature-server-java, feature-transformation-server, feast-operator ]
97116
env:
98117
REGISTRY: feastdev
99118
steps:
@@ -102,15 +121,23 @@ jobs:
102121
uses: docker/setup-qemu-action@v1
103122
- name: Set up Docker Buildx
104123
uses: docker/setup-buildx-action@v1
124+
- id: get-version
125+
uses: ./.github/actions/get-semantic-release-version
126+
with:
127+
custom_version: ${{ github.event.inputs.custom_version }}
128+
token: ${{ github.event.inputs.token }}
105129
- name: Build image
130+
env:
131+
VERSION_WITHOUT_PREFIX: ${{ steps.get-version.outputs.version_without_prefix }}
132+
RELEASE_VERSION: ${{ steps.get-version.outputs.release_version }}
106133
run: |
134+
echo "Building docker image for ${{ matrix.component }} with version $VERSION_WITHOUT_PREFIX and release version $RELEASE_VERSION"
107135
make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${VERSION_WITHOUT_PREFIX}
108-
env:
109-
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
110136
111137
verify-python-wheels:
138+
name: Verify Python wheels
112139
runs-on: ${{ matrix.os }}
113-
needs: [ build-python-wheel, build-source-distribution, get-version ]
140+
needs: [ build-python-wheel, build-source-distribution ]
114141
strategy:
115142
matrix:
116143
os: [ ubuntu-latest, macos-13 ]
@@ -129,8 +156,8 @@ jobs:
129156
else
130157
echo "Succeeded!"
131158
fi
132-
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
133159
steps:
160+
- uses: actions/checkout@v4
134161
- name: Setup Python
135162
id: setup-python
136163
uses: actions/setup-python@v5
@@ -160,7 +187,14 @@ jobs:
160187
if: ${{ matrix.from-source }}
161188
run: pip install dist/*tar.gz
162189
# Validate that the feast version installed is not development and is the correct version of the tag we ran it off of.
190+
- id: get-version
191+
uses: ./.github/actions/get-semantic-release-version
192+
with:
193+
custom_version: ${{ github.event.inputs.custom_version }}
194+
token: ${{ github.event.inputs.token }}
163195
- name: Validate Feast Version
196+
env:
197+
VERSION_WITHOUT_PREFIX: ${{ steps.get-version.outputs.version_without_prefix }}
164198
run: |
165199
feast version
166200
if ! VERSION_OUTPUT=$(feast version); then

.github/workflows/get_semantic_release_version.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,52 @@ on:
99
custom_version: # Optional input for a custom version
1010
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
1111
required: false
12+
type: string
13+
token:
14+
description: 'Personal Access Token'
15+
required: true
16+
default: ""
17+
type: string
18+
workflow_call: # Allows trigger the workflow from other workflow
19+
inputs:
20+
custom_version: # Optional input for a custom version
21+
description: 'Custom version to publish (e.g., v1.2.3) -- only edit if you know what you are doing'
22+
required: false
23+
type: string
1224
token:
1325
description: 'Personal Access Token'
1426
required: true
1527
default: ""
1628
type: string
1729

1830
jobs:
19-
get-version:
20-
uses: ./.github/workflows/get_semantic_release_version.yml
21-
with:
22-
custom_version: ${{ github.event.inputs.custom_version }}
23-
token: ${{ github.event.inputs.token }}
24-
2531
publish-python-sdk:
2632
uses: ./.github/workflows/publish_python_sdk.yml
33+
secrets: inherit
2734
with:
2835
custom_version: ${{ github.event.inputs.custom_version }}
2936
token: ${{ github.event.inputs.token }}
3037

3138
build-publish-docker-images:
3239
uses: ./.github/workflows/publish_images.yml
33-
needs: [ get-version, publish-python-sdk ]
40+
needs: [ publish-python-sdk ]
41+
secrets: inherit
3442
with:
3543
custom_version: ${{ github.event.inputs.custom_version }}
3644
token: ${{ github.event.inputs.token }}
3745

3846
publish-helm-charts:
3947
uses: ./.github/workflows/publish_helm_charts.yml
40-
needs: [ get-version, publish-python-sdk ]
48+
needs: [ publish-python-sdk ]
49+
secrets: inherit
4150
with:
4251
custom_version: ${{ github.event.inputs.custom_version }}
4352
token: ${{ github.event.inputs.token }}
4453

4554
publish-java-sdk:
4655
uses: ./.github/workflows/publish_java_sdk.yml
47-
needs: [ get-version, publish-python-sdk ]
56+
needs: [ publish-python-sdk ]
57+
secrets: inherit
4858
with:
4959
custom_version: ${{ github.event.inputs.custom_version }}
5060
token: ${{ github.event.inputs.token }}

0 commit comments

Comments
 (0)