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

fix: do not overwrite local plugin manifest if fetched manifest is invalid #1000

Merged
merged 2 commits into from
Nov 14, 2022

Conversation

charliecruzan-stripe
Copy link
Contributor

Reviewers

r? @vcheung-stripe
cc @stripe/developer-products

Summary

Previously, we'd fetch the remote plugin manifest and write it the local config. this caused issues if the remote manifest was invalid (for example, if it was empty), since the install step would fail, but it would break the stripe plugin upgrade and stripe plugin install commands from then on.
This PR changes it so that:

  • when running install, it will fail fast with a useful error
  • when running upgrade, it will log that we couldn't fetch the remote manifest, so we'll upgrade based off of the local plugins.toml

Screen Shot 2022-11-11 at 3 49 04 PM

@charliecruzan-stripe charliecruzan-stripe requested a review from a team as a code owner November 11, 2022 23:49
Copy link
Collaborator

@vcheung-stripe vcheung-stripe left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@ericfrank-stripe ericfrank-stripe left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for doing this!

@charliecruzan-stripe charliecruzan-stripe merged commit 8031001 into master Nov 14, 2022
@charliecruzan-stripe charliecruzan-stripe deleted the charliecruzan/RUN_DX-1553 branch November 14, 2022 17:36
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

3 participants