From 9a65c7ddc387add7598b545eae8c7768b9cd5bbe Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Mon, 21 Apr 2025 21:45:50 +0800 Subject: [PATCH 1/5] [connector] CI fix Signed-off-by: Future-Outlier --- .github/workflows/pythonpublish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 14256f73ef..3581f1642d 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -214,7 +214,7 @@ jobs: with: context: "." platforms: linux/arm64, linux/amd64 - target: agent-slim + target: connector-slim push: ${{ github.event_name == 'release' }} tags: ${{ steps.flyteagent-slim-names.outputs.tags }} build-args: | From f7e1356d9015f7a56bd2876f528b662f6d57648b Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Tue, 22 Apr 2025 16:00:21 +0800 Subject: [PATCH 2/5] [CI] connector image publish fix Signed-off-by: Future-Outlier --- .github/workflows/build_image.yml | 10 +++++----- .github/workflows/pythonpublish.yml | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index 23bc635d7d..60569bccb9 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -47,7 +47,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - build-and-push-flyteagent-images-manual: + build-and-push-flyteconnector-images-manual: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -64,12 +64,12 @@ jobs: registry: ghcr.io username: "${{ secrets.FLYTE_BOT_USERNAME }}" password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Prepare Flyte Agent Image Names - id: flyteagent-names + - name: Prepare Flyte Connector Image Names + id: flyteconnector-names uses: docker/metadata-action@v3 with: images: | - ghcr.io/${{ github.repository_owner }}/flyteagent + ghcr.io/${{ github.repository_owner }}/flyteconnector tags: | ${{ github.sha }} - name: Push External Plugin Service Image to GitHub Registry @@ -78,7 +78,7 @@ jobs: context: "." platforms: linux/arm64, linux/amd64 push: true - tags: ${{ steps.flyteagent-names.outputs.tags }} + tags: ${{ steps.flyteconnector-names.outputs.tags }} build-args: | VERSION=${{ github.sha }} file: ./Dockerfile.connector diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 3581f1642d..2e8d6a2e54 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -170,7 +170,7 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - build-and-push-flyteagent-images: + build-and-push-flyteconnector-images: runs-on: ubuntu-latest needs: deploy steps: @@ -189,50 +189,50 @@ jobs: registry: ghcr.io username: "${{ secrets.FLYTE_BOT_USERNAME }}" password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Prepare Flyte Agent Slim Image Names - id: flyteagent-slim-names + - name: Prepare Flyte Connector Slim Image Names + id: flyteconnector-slim-names uses: docker/metadata-action@v3 with: images: | - ghcr.io/${{ github.repository_owner }}/flyteagent-slim + ghcr.io/${{ github.repository_owner }}/flyteconnector-slim tags: | latest ${{ github.sha }} ${{ needs.deploy.outputs.version }} - - name: Prepare Flyte Agent Image Names - id: flyteagent-names + - name: Prepare Flyte Connector Image Names + id: flyteconnector-names uses: docker/metadata-action@v3 with: images: | - ghcr.io/${{ github.repository_owner }}/flyteagent + ghcr.io/${{ github.repository_owner }}/flyteconnector tags: | latest ${{ github.sha }} ${{ needs.deploy.outputs.version }} - - name: Push flyteagent-slim Image to GitHub Registry + - name: Push flyteconnector-slim Image to GitHub Registry uses: docker/build-push-action@v2 with: context: "." platforms: linux/arm64, linux/amd64 target: connector-slim push: ${{ github.event_name == 'release' }} - tags: ${{ steps.flyteagent-slim-names.outputs.tags }} + tags: ${{ steps.flyteconnector-slim-names.outputs.tags }} build-args: | VERSION=${{ needs.deploy.outputs.version }} file: ./Dockerfile.connector cache-from: type=gha cache-to: type=gha,mode=max - - name: Confirm Agent can start + - name: Confirm Connector can start run: | - docker run --rm ghcr.io/${{ github.repository_owner }}/flyteagent-slim:${{ github.sha }} pyflyte serve agent --port 8000 --timeout 1 - - name: Push flyteagent-all Image to GitHub Registry + docker run --rm ghcr.io/${{ github.repository_owner }}/flyteconnector-slim:${{ github.sha }} pyflyte serve connector --port 8000 --timeout 1 + - name: Push flyteconnector-all Image to GitHub Registry uses: docker/build-push-action@v2 with: context: "." platforms: linux/arm64, linux/amd64 - target: agent-all + target: connector-all push: ${{ github.event_name == 'release' }} - tags: ${{ steps.flyteagent-names.outputs.tags }} + tags: ${{ steps.flyteconnector-names.outputs.tags }} build-args: | VERSION=${{ needs.deploy.outputs.version }} file: ./Dockerfile.connector From 3e14b48c4340094e0e29daf8eec9ac24469b5d68 Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Tue, 22 Apr 2025 16:20:15 +0800 Subject: [PATCH 3/5] update Signed-off-by: Future-Outlier --- .github/workflows/build_image.yml | 38 ---------------- .github/workflows/pythonpublish.yml | 69 ----------------------------- 2 files changed, 107 deletions(-) diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml index 60569bccb9..4123ebf4c6 100644 --- a/.github/workflows/build_image.yml +++ b/.github/workflows/build_image.yml @@ -84,41 +84,3 @@ jobs: file: ./Dockerfile.connector cache-from: type=gha cache-to: type=gha,mode=max - - build-and-push-flyteconnector-images-manual: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "0" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "${{ secrets.FLYTE_BOT_USERNAME }}" - password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Prepare Flyte Connector Image Names - id: flyteconnector-names - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/flyteconnector - tags: | - ${{ github.sha }} - - name: Push External Plugin Service Image to GitHub Registry - uses: docker/build-push-action@v2 - with: - context: "." - platforms: linux/arm64, linux/amd64 - push: true - tags: ${{ steps.flyteconnector-names.outputs.tags }} - build-args: | - VERSION=${{ github.sha }} - file: ./Dockerfile.connector - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 2e8d6a2e54..79379a54ef 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -239,75 +239,6 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - build-and-push-flyteconnector-images: - runs-on: ubuntu-latest - needs: deploy - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "0" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - if: ${{ github.event_name == 'release' }} - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "${{ secrets.FLYTE_BOT_USERNAME }}" - password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Prepare Flyte connector Slim Image Names - id: flyteconnector-slim-names - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/flyteconnector-slim - tags: | - latest - ${{ github.sha }} - ${{ needs.deploy.outputs.version }} - - name: Prepare Flyte Connector Image Names - id: flyteconnector-names - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/flyteconnector - tags: | - latest - ${{ github.sha }} - ${{ needs.deploy.outputs.version }} - - name: Push flyteconnector-slim Image to GitHub Registry - uses: docker/build-push-action@v2 - with: - context: "." - platforms: linux/arm64, linux/amd64 - target: connector-slim - push: ${{ github.event_name == 'release' }} - tags: ${{ steps.flyteconnector-slim-names.outputs.tags }} - build-args: | - VERSION=${{ needs.deploy.outputs.version }} - file: ./Dockerfile.connector - cache-from: type=gha - cache-to: type=gha,mode=max - - name: Confirm Connector can start - run: | - docker run --rm ghcr.io/${{ github.repository_owner }}/flyteconnector-slim:${{ github.sha }} pyflyte serve connector --port 8000 --timeout 1 - - name: Push flyteconnector-all Image to GitHub Registry - uses: docker/build-push-action@v2 - with: - context: "." - platforms: linux/arm64, linux/amd64 - target: connector-all - push: ${{ github.event_name == 'release' }} - tags: ${{ steps.flyteconnector-names.outputs.tags }} - build-args: | - VERSION=${{ needs.deploy.outputs.version }} - file: ./Dockerfile.connector - cache-from: type=gha - cache-to: type=gha,mode=max - build-and-push-spark-images: runs-on: ubuntu-latest needs: deploy From 826071f1140ff3922f0c37be79b2239d76ee2fb3 Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Tue, 22 Apr 2025 16:20:49 +0800 Subject: [PATCH 4/5] update Signed-off-by: Future-Outlier --- .github/workflows/pythonpublish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 79379a54ef..e6b6a6e13a 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -189,7 +189,7 @@ jobs: registry: ghcr.io username: "${{ secrets.FLYTE_BOT_USERNAME }}" password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Prepare Flyte Connector Slim Image Names + - name: Prepare Flyte connector Slim Image Names id: flyteconnector-slim-names uses: docker/metadata-action@v3 with: From 3d5496c154025150fc4d1b735eaf8e7910750bbd Mon Sep 17 00:00:00 2001 From: Future-Outlier Date: Tue, 22 Apr 2025 16:22:30 +0800 Subject: [PATCH 5/5] lint Signed-off-by: Future-Outlier --- .github/workflows/pythonpublish.yml | 68 ----------------------------- 1 file changed, 68 deletions(-) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 3581f1642d..c11cbf4cde 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -170,74 +170,6 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max - build-and-push-flyteagent-images: - runs-on: ubuntu-latest - needs: deploy - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "0" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - if: ${{ github.event_name == 'release' }} - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "${{ secrets.FLYTE_BOT_USERNAME }}" - password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Prepare Flyte Agent Slim Image Names - id: flyteagent-slim-names - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/flyteagent-slim - tags: | - latest - ${{ github.sha }} - ${{ needs.deploy.outputs.version }} - - name: Prepare Flyte Agent Image Names - id: flyteagent-names - uses: docker/metadata-action@v3 - with: - images: | - ghcr.io/${{ github.repository_owner }}/flyteagent - tags: | - latest - ${{ github.sha }} - ${{ needs.deploy.outputs.version }} - - name: Push flyteagent-slim Image to GitHub Registry - uses: docker/build-push-action@v2 - with: - context: "." - platforms: linux/arm64, linux/amd64 - target: connector-slim - push: ${{ github.event_name == 'release' }} - tags: ${{ steps.flyteagent-slim-names.outputs.tags }} - build-args: | - VERSION=${{ needs.deploy.outputs.version }} - file: ./Dockerfile.connector - cache-from: type=gha - cache-to: type=gha,mode=max - - name: Confirm Agent can start - run: | - docker run --rm ghcr.io/${{ github.repository_owner }}/flyteagent-slim:${{ github.sha }} pyflyte serve agent --port 8000 --timeout 1 - - name: Push flyteagent-all Image to GitHub Registry - uses: docker/build-push-action@v2 - with: - context: "." - platforms: linux/arm64, linux/amd64 - target: agent-all - push: ${{ github.event_name == 'release' }} - tags: ${{ steps.flyteagent-names.outputs.tags }} - build-args: | - VERSION=${{ needs.deploy.outputs.version }} - file: ./Dockerfile.connector - cache-from: type=gha - cache-to: type=gha,mode=max build-and-push-flyteconnector-images: runs-on: ubuntu-latest