feat: official support for custom remote cache providers - #331
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| * Upload a local artifact to remote storage | ||
| * @param artifact - Local artifact to upload, as returned by `download` method | ||
| * @param loader - Optional progress indicator | ||
| * @returns Remote artifact info if upload successful, null otherwise |
There was a problem hiding this comment.
"otherwise" implies error or a different case (e.g. no support)?
maybe better to throw error instead or return an object with additional info that the CLI could display?
There was a problem hiding this comment.
The upload is something I haven't given too much thought yet, as GitHub API doesn't support it. I'll make it return RemoteArtifact or throw
| }: { | ||
| artifactName: string; | ||
| }): Promise<RemoteArtifact | null>; | ||
| artifactName: string | undefined; |
There was a problem hiding this comment.
why would artifact name be needed to list artifacts 🤔
There was a problem hiding this comment.
It's for listing matching artifacts to your local fingerprint. Could make it optional though
6a4c19e to
22b6884
Compare
74b16d4 to
cbc376c
Compare
|
Now it's time to implement this spec for the 3rd party provider and validate it in the wild 😁 |
* origin/main: feat: official support for custom remote cache providers (#331)
Summary
This diff adds support for writing your own custom remote providers, which was quasi-supported previously.
Notable changes:
remoteCacheProviderto accept a function that returns a class that implementsRemoteBuildCache, so that we can configure input parameters, such as auth data, or repo informationdeletemethod for GitHub provider that deletes all matching artifacts (there can be many with the same name)querytolistthat returns a list of artifactsTest plan
Added unit test for creating and using remote cache provider.