Skip to content
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

feat: add blobs-migrate recipe #6418

Merged
merged 7 commits into from Mar 7, 2024
Merged

feat: add blobs-migrate recipe #6418

merged 7 commits into from Mar 7, 2024

Conversation

eduardoboucas
Copy link
Member

@eduardoboucas eduardoboucas commented Mar 7, 2024

Summary

Adds a new blobs-migrate recipe that lets folks migrate a Netlify Blobs store as they update to version 7.0.0 of @netlify/blobs.

Keeping this as draft until netlify/blobs#148 is merged and the @netlify/blobs dependency is updated.

Part of ADN-370.

@eduardoboucas eduardoboucas requested a review from a team as a code owner March 7, 2024 11:24
@eduardoboucas eduardoboucas marked this pull request as draft March 7, 2024 11:26
Copy link

github-actions bot commented Mar 7, 2024

📊 Benchmark results

Comparing with 86b7781

  • Dependency count: 1,315 ⬆️ 0.15% increase vs. 86b7781
  • Package size: 287 MB ⬆️ 0.09% increase vs. 86b7781
  • Number of ts-expect-error directives: 1,179 ⬇️ 0.08% decrease vs. 86b7781

try {
return await runRecipe({ config, recipeName: sanitizedRecipeName, repositoryRoot })
return await runRecipe({ args, command, config, recipeName: sanitizedRecipeName, repositoryRoot })
Copy link
Member Author

Choose a reason for hiding this comment

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

We were previously not passing the command arguments to recipes, but it's useful when a recipe needs to take input from the user.

@eduardoboucas eduardoboucas marked this pull request as ready for review March 7, 2024 13:07
package.json Outdated
@@ -72,7 +72,7 @@
"dependencies": {
"@bugsnag/js": "7.20.2",
"@fastify/static": "6.10.2",
"@netlify/blobs": "6.5.0",
"@netlify/blobs": "^7.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

why is this the only dependency with a caret?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! We're pinning the exact versions of dependencies to avoid issues with transitive dependencies. It shouldn't be an issue here, since @netlify/blobs doesn't have any dependencies, but I've pinned it anyway in b0572b1.

...clientOptions,
name: storeName,
})
const { blobs } = await oldStore.list()
Copy link
Member

Choose a reason for hiding this comment

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

does this really return all blobs? no pagination?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@mraerino mraerino left a comment

Choose a reason for hiding this comment

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

i haven't tested this locally. this review is just to say the code looks fine

@eduardoboucas eduardoboucas merged commit 1638c69 into main Mar 7, 2024
40 checks passed
@eduardoboucas eduardoboucas deleted the feat/blobs-migrate branch March 7, 2024 17:50
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.

None yet

2 participants