Skip to content

Commit

Permalink
Activate metadata-api only for internal CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
pcholakov committed Feb 7, 2025
1 parent 8a8556d commit 0a4ff2a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
name: Create docker image
uses: ./.github/workflows/docker.yml
with:
features: 'metadata-api'
uploadImageAsTarball: true
platforms: linux/amd64

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
pushToDockerHub: true
parca: true
buildIndividually: true
releaseBuild: true

docker-cli:
name: Push CLI Docker image
Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ on:
required: false
default: ""
type: string
releaseBuild:
description: "prevent non-release features from being included in build"
required: false
default: false
type: boolean
pushToDockerHub:
description: "push image to DockerHub"
required: false
Expand Down Expand Up @@ -166,6 +171,14 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Check for non-release features in release builds
if: ${{ inputs.releaseBuild }}
run: |
if [[ "${{ inputs.features }}" =~ "metadata-api" ]]; then
echo "Release builds should not contain non-release only features: ${{ inputs.features }}"
exit 1
fi
- name: Build${{(inputs.uploadImageAsTarball != true || github.ref == 'refs/heads/main') && ' and push ' || ' '}}Docker image
id: build
uses: docker/build-push-action@v6
Expand All @@ -186,7 +199,7 @@ jobs:
CARGO_PROFILE_RELEASE_DEBUG=${{ inputs.debug || inputs.parca }}
BUILD_INDIVIDUALLY=${{ inputs.buildIndividually }}
UPLOAD_DEBUGINFO=${{ inputs.parca }}
RESTATE_FEATURES=${{ inputs.features || '' }}
RESTATE_FEATURES=${{ inputs.features || releaseBuild && '' || 'metadata-api' }}
secrets: |
parca=${{ secrets.PARCA_TOKEN }}
cache-from: type=gha,url=http://127.0.0.1:49160/
Expand Down
2 changes: 1 addition & 1 deletion crates/admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license.workspace = true
publish = false

[features]
default = ["replicated-loglet", "serve-web-ui", "metadata-api"]
default = ["replicated-loglet", "serve-web-ui"]
clients = []
options_schema = ["restate-service-client/options_schema"]
memory-loglet = ["restate-bifrost/memory-loglet"]
Expand Down

0 comments on commit 0a4ff2a

Please sign in to comment.