Skip to content

feat(services/vercel): Add additional options to Vercel cache backend#7334

Merged
Xuanwo merged 3 commits intoapache:mainfrom
mmastrac:vercel_opts
Apr 8, 2026
Merged

feat(services/vercel): Add additional options to Vercel cache backend#7334
Xuanwo merged 3 commits intoapache:mainfrom
mmastrac:vercel_opts

Conversation

@mmastrac
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #7333.

Rationale for this change

The Vercel artifact backend has a well-known URL, but even at Vercel we often use the same HTTP protocol with a different backend endpoint (along with team ID and slug).

The API documentation page (https://vercel.com/docs/rest-api/artifacts/upload-a-cache-artifact) lists a number of other parameters, but endpoint URL and team id/slug are the most useful to configure when using opendal with the Vercel artifact backend.

What changes are included in this PR?

Three new configuration parameters for the VercelArtifacts backend:

  • endpoint: set the API endpoint (default: https://api.vercel.com)
  • team_id: optional Vercel team ID, appended as teamId query parameter
  • team_slug: optional Vercel team slug, appended as slug query parameter

Are there any user-facing changes?

Yes, a number of parameters are added (with sane defaults) to VercelArtifacts. Existing consumers will see no changes - this is only for advanced users.

AI Usage Statement

Generated with Claude Opus 4.6.

@mmastrac mmastrac requested a review from Xuanwo as a code owner March 30, 2026 18:36
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/feat The PR implements a new feature or has a title that begins with "feat" labels Mar 30, 2026
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Adds support for using Vercel's artifact cache as an sccache storage
backend via OpenDAL's built-in VercelArtifacts service.

Configure with SCCACHE_VERCEL_ARTIFACTS_TOKEN env var or via config file.
Also supports endpoint, team_id, and team_slug configuration (requires
apache/opendal#7334 to take effect — currently accepted but ignored).

Supports multi-level cache chains (e.g., disk -> vercel_artifacts).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Switches opendal crates.io patch from apache/opendal main to
mmastrac/opendal vercel_opts branch which adds endpoint, team_id,
and team_slug builder methods to the VercelArtifacts service.

Upstream: apache/opendal#7334

Once the upstream PR is merged, this patch can be folded back into
the apache/opendal main patch. Drop this patch entirely once opendal
publishes a release containing these changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Adds support for using Vercel's artifact cache as an sccache storage
backend via OpenDAL's built-in VercelArtifacts service.

Configure with SCCACHE_VERCEL_ARTIFACTS_TOKEN env var or via config file.
Also supports endpoint, team_id, and team_slug configuration (requires
apache/opendal#7334 to take effect — currently accepted but ignored).

Supports multi-level cache chains (e.g., disk -> vercel_artifacts).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Switches opendal crates.io patch from apache/opendal main to
mmastrac/opendal vercel_opts branch which adds endpoint, team_id,
and team_slug builder methods to the VercelArtifacts service.

Upstream: apache/opendal#7334

Once the upstream PR is merged, this patch can be folded back into
the apache/opendal main patch. Drop this patch entirely once opendal
publishes a release containing these changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys/prebuilt-nasm to avoid nasm build requirement
in CI.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys/prebuilt-nasm to avoid nasm build requirement
in CI.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mmastrac mmastrac changed the title Add additional options to Vercel cache backend feat: Add additional options to Vercel cache backend Mar 30, 2026
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 30, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mmastrac mmastrac changed the title feat: Add additional options to Vercel cache backend feat(services/vercel): Add additional options to Vercel cache backend Mar 31, 2026
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 31, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mmastrac added a commit to vercel/sccache that referenced this pull request Mar 31, 2026
Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io], which tracks apache/opendal main plus additional
Vercel Artifacts builder methods (endpoint, team_id, team_slug)
from apache/opendal#7334.

Adds layers-logging feature to retain LoggingLayer after upstream
split. Adds aws-lc-sys with prebuilt-nasm and bindgen features to
avoid nasm/bindgen build requirements in CI cross-compilation.

Adds Vercel Artifacts cache backend configured via:
- SCCACHE_VERCEL_ARTIFACTS_TOKEN (required)
- SCCACHE_VERCEL_ARTIFACTS_ENDPOINT (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_ID (optional)
- SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG (optional)

Upstream: apache/opendal#7334

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mmastrac
Copy link
Copy Markdown
Contributor Author

mmastrac commented Apr 2, 2026

@Xuanwo, I think you might be one of the people working on this part of the codebase -- is it possible to review and land it? We're testing this patch as-is in our sccache fork and it's working well. Would be awesome to land it if you have a chance. Thanks!

Copy link
Copy Markdown
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 8, 2026
@Xuanwo Xuanwo merged commit 5e2fb81 into apache:main Apr 8, 2026
379 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/feat The PR implements a new feature or has a title that begins with "feat" size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new feature: Add endpoint and team id/slug to Vercel artifact backend

2 participants