Skip to content

Move Azure cache implementation to plugin#1057

Draft
Copilot wants to merge 15 commits intomasterfrom
copilot/move-azure-cache-implementation
Draft

Move Azure cache implementation to plugin#1057
Copilot wants to merge 15 commits intomasterfrom
copilot/move-azure-cache-implementation

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

  • Create change file for the PR with all modified packages and appropriate semver types
  • Address PR review comments:
    • 1. Share CacheStorage class from backfill-cache instead of duplicating in azure-blob-cache-storage
    • 2. Share hashFile from backfill-cache instead of duplicating in azure-blob-cache-storage
    • 3. Delete .npmignore from azure-blob-cache-storage (not needed with package.json files)
    • 4. Resolve plugin path relative to cwd in getCacheStorageProvider.ts
    • 5. Remove the old CustomStorageConfig from cacheConfig.ts and all references
    • 6. Use "email not defined" in change file instead of a random email
  • Address follow-up review comments:
    • 7. Restore original comments in CredentialCache.ts
    • 8. Remove cacheStorageConfig override in CacheOptions.ts
    • 9. Move plugin implementation from index.ts to separate file
    • 10. Fix mock plugin string in api.test.ts
  • Remove disallowedChangeTypes from beachball.config.js to allow major version bumps
Original prompt

This section details on the original issue you should resolve

<issue_title>Move Azure cache implementation to plugin</issue_title>
<issue_description>For the many users of lage (and indirectly backfill) who don't use remote caching, it would be nice if the Azure cache implementation could be moved to a plugin instead of being included by default (due to the significant dependency+parsing bulk). Making this approach extensible would also open the opportunity for other remote cache backends.

Probably something like this:

interface CustomCacheStoragePlugin<TOptions> {
  name: string;
  getProvider: (logger: Logger, cwd: string, options: TOptions) => ICacheStorage;
}

interface CustomCacheStorageConfig<TOptions = unknown> {
  provider: "custom";
  // Can be either a path or a package name.
  // If a package name, it's resolved from the location of the config file.
  // (Maybe come up with a better prop name...?)
  plugin: string;
  options: TOptions;
}

// REMOVED: AzureBlobCacheStorageConfig (now a plugin)
type CacheStorageConfig =
  | { provider: "local" }
  | { provider: "local-skip" }
  | NpmCacheStorageConfig
  | CustomCacheStorageConfig;

// lage.config.js
const lageConfig = {
  cacheOptions: {
    cacheStorageConfig: {
      provider: "custom",
      plugin: "@lage-run/azure-blob-cache-storage",
      options: { /*...*/ }
    }
  }
}
```</issue_description>

<agent_instructions>1. Update the types in packages/backfill-config/src/cacheConfig.ts as described in the issue.
2. Move all the Azure-related types, code, and dependencies from `packages/backfill-cache` to a new package `packages/azure-blob-cache-storage` (name: `@lage-run/azure-blob-cache-storage`). `backfill` and `lage` should not depend on this new package.
3. Update documentation (`docsite` plus any mentions in readmes) to describe the new approach</agent_instructions>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move Azure cache implementation to plugin

2 participants