-
Notifications
You must be signed in to change notification settings - Fork 3
feat: rewrite #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: rewrite #79
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
ca823bd
wip: init commit
Yohe-Am aed2a1f
wip: 120 tests passing in s3-proxy, a million to go
Yohe-Am adf4f21
wip: ci setup
Yohe-Am ca2d65d
Merge remote-tracking branch 'origin/v2' into feat/base-s3-features
Yohe-Am d94c5da
feat(swift): objects CRUD (#77)
Yohe-Am d8fa85c
fix: enable build-image on all pushes
Yohe-Am 424887b
feat(swift): multipart support (#82)
Yohe-Am 97f37ce
feat: auth (#84)
Yohe-Am 78b12ee
fix: deno run instead of serve
Yohe-Am 1d8869b
fix: bad type bug
Yohe-Am 35b8211
feat: post object at `/` support
Yohe-Am f265890
fix: better instrumentation
Yohe-Am d247ebf
fix: remove default backend from chart
Yohe-Am 2176265
fix: more error logging
Yohe-Am 8f0ce6f
fix: config validation
Yohe-Am 845a5b0
fix: proper swift path encoding
Yohe-Am a9f6986
fix: better error logging
Yohe-Am 533aa97
fix(swift): zero byte multipart uploads
Yohe-Am 25d3245
fix: cors issue
Yohe-Am File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| HERALD_SWIFTTEST_OS_AUTH=$TF_VAR_OS_PASSWORD | ||
| HERALD_SWIFTTEST_OS_PASSWORD=$TF_VAR_OS_PASSWORD | ||
| HERALD_SWIFTTEST_OS_PROJECT_NAME=$TF_VAR_OS_PROJECT_NAME | ||
| HERALD_SWIFTTEST_OS_USERNAME=$TF_VAR_OS_USERNAME | ||
| HEARLD_SWIFTTEST_AUTH_URL=https://api.pub1.infomaniak.cloud/identity/v3 | ||
| HEARLD_SWIFTTEST_OS_REGION_NAME=dc3-a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: build image | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "src/**" | ||
| - "tools/**" | ||
| - ".github/workflows/build-image.yml" | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| paths: | ||
| - "src/**" | ||
| - "tools/**" | ||
| - ".github/workflows/build-image.yml" | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| REGISTRY: ghcr.io | ||
| IMAGE_NAME: ${{ github.repository }} | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log in to GitHub Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ${{ env.REGISTRY }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Prepare .dockerignore | ||
| run: cp tools/Containerfile.containerignore .dockerignore | ||
|
|
||
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v5 | ||
| with: | ||
| context: . | ||
| file: ./tools/Containerfile | ||
| push: true | ||
| tags: | | ||
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | ||
| ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| name: checks | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| DOCKER_CMD: docker | ||
| UV_CACHE_DIR: /tmp/.uv-cache | ||
|
|
||
| jobs: | ||
| checks: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - uses: DeterminateSystems/nix-installer-action@v16 | ||
|
|
||
| - uses: DeterminateSystems/flakehub-cache-action@v3 | ||
|
|
||
| - name: pre-commit hooks | ||
| run: nix develop --command prek run --all-files | ||
|
|
||
| - name: deno cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/deno | ||
| key: ${{ runner.os }}-deno-${{ hashFiles('deno.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-deno- | ||
|
|
||
| - name: uv cache | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: /tmp/.uv-cache | ||
| key: uv-${{ runner.os }}-${{ hashFiles('s3-tests/requirements.txt') }} | ||
| restore-keys: | | ||
| uv-${{ runner.os }}-${{ hashFiles('s3-tests/requirements.txt') }} | ||
| uv-${{ runner.os }} | ||
|
|
||
| - name: start container | ||
| run: nix develop --command deno run --allow-all x/compose-up.ts s3 swift db | ||
|
|
||
| - name: wait for services | ||
| run: | | ||
| echo "Waiting for MinIO..." | ||
| for i in {1..30}; do | ||
| if curl -sf http://localhost:9000/minio/health/live; then | ||
| echo "MinIO is ready" | ||
| break | ||
| fi | ||
| sleep 2 | ||
| done || (echo "MinIO failed to start" && exit 1) | ||
|
|
||
| echo "Waiting for SAIO..." | ||
| for i in {1..60}; do | ||
| if curl -sf http://localhost:8080/healthcheck; then | ||
| echo "SAIO is ready" | ||
| exit 0 | ||
| fi | ||
| sleep 2 | ||
| done | ||
| echo "SAIO failed to start" | ||
| exit 1 | ||
|
|
||
| - name: integration tests | ||
| run: nix develop --command deno task test | ||
|
|
||
| - name: benchmarks | ||
| run: nix develop --command deno bench --allow-all benchmarks/ | ||
|
|
||
| - name: s3-tests | ||
| if: false | ||
| run: | | ||
| set +e | ||
|
|
||
| run_minio() { | ||
| echo "=== Running s3-tests (MinIO) ===" | ||
| nix develop --command deno run --allow-all x/s3-tests.ts --backend minio --no-abort | ||
| echo "--- s3-tests/s3-tests.log (MinIO) ---" | ||
| cat s3-tests/s3-tests.log || true | ||
| echo "--- s3-tests/herald-proxy.log (MinIO) ---" | ||
| cat s3-tests/herald-proxy.log || true | ||
| } | ||
|
|
||
| run_swift() { | ||
| echo "=== Running s3-tests (Swift) ===" | ||
| nix develop --command deno run --allow-all x/s3-tests.ts --backend swift --no-abort | ||
| echo "--- s3-tests/s3-tests-swift.log (Swift) ---" | ||
| cat s3-tests/s3-tests-swift.log || true | ||
| echo "--- s3-tests/herald-proxy-swift.log (Swift) ---" | ||
| cat s3-tests/herald-proxy-swift.log || true | ||
| } | ||
|
|
||
| run_minio & | ||
| pid_minio=$! | ||
|
|
||
| run_swift & | ||
| pid_swift=$! | ||
|
|
||
| wait $pid_minio | ||
| status_minio=$? | ||
|
|
||
| wait $pid_swift | ||
| status_swift=$? | ||
|
|
||
| # Fail the step if either failed | ||
| if [ $status_minio -ne 0 ] || [ $status_swift -ne 0 ]; then | ||
| # exit 1 | ||
| fi | ||
|
|
||
| - name: prune uv cache | ||
| run: nix develop --command uv cache prune --ci |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid pushing images on PRs (forks will fail).
push: trueon pull_request triggers will typically fail because GITHUB_TOKEN lacks package write permissions on forks. Gate login/push to push events (or same-repo PRs) to keep CI green.🔧 Suggested fix
🤖 Prompt for AI Agents