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

Woo installer: use new transfer endpoints in Calypso #58709

Merged
merged 15 commits into from
Dec 14, 2021

Conversation

allilevine
Copy link
Member

@allilevine allilevine commented Dec 1, 2021

Changes proposed in this Pull Request

  • Implement fetching data from the new transfer endpoints (one for Simple, one for Atomic)

Testing instructions

Error screenshot:

VWr8UYJ8

Related to #58384

@allilevine allilevine added the Woop WooCommerce on Plans Pod label Dec 1, 2021
@allilevine allilevine self-assigned this Dec 1, 2021
@github-actions
Copy link

github-actions bot commented Dec 1, 2021

@matticbot
Copy link
Contributor

matticbot commented Dec 1, 2021

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

lsl added a commit that referenced this pull request Dec 8, 2021
@lsl lsl force-pushed the add/atomic-transfer-with-plugin branch 2 times, most recently from 0dbff09 to ceb6e71 Compare December 10, 2021 02:38
client/state/atomic-transfer-with-plugin/actions/index.ts Outdated Show resolved Hide resolved
method: 'POST',
path: `/sites/${ action.siteId }/atomic/transfers/`,
body: {
software_set: action.softwareSet,
Copy link
Contributor

Choose a reason for hiding this comment

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

This parameter should be optional, we're going to need to add plugin, theme, plugin file, theme file, and later options along with it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Made this optional in the action so just needs to account for that here.

Copy link
Member Author

Choose a reason for hiding this comment

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

@lsl Attempted this here: 06e644c

client/state/atomic/transfers/actions.ts Outdated Show resolved Hide resolved
client/state/atomic/software/reducer.js Show resolved Hide resolved
client/state/action-types.ts Outdated Show resolved Hide resolved
@lsl
Copy link
Contributor

lsl commented Dec 10, 2021

@allilevine had to rebase both branches to make the reset work.

blog_id: number;
software_set: Record< string, { path: string; state: string } >;
applied: boolean;
error?: string;
Copy link
Contributor

@lsl lsl Dec 10, 2021

Choose a reason for hiding this comment

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

Don't really know how to do the error handling properly. Thoughts?

This is what ends up happening in the "front end" and I think its pretty brittle. Would just creating an error selector make sense? We probably want to fix up the object format anyway (fromApi or something like that does this I think?)

@obenland
Copy link
Member

@allilevine @lsl Is there anything in client/state/atomic-transfer that can be reused or built on?

@lsl
Copy link
Contributor

lsl commented Dec 13, 2021

That looks like v1 endpoint code so I don't think so, what did you have in mind?

@lsl
Copy link
Contributor

lsl commented Dec 13, 2021

Happy path is stable now, testing using #58848, error handling might need an update but I think we should merge this as is to simplify / clarify whats going on in 58848.

@lsl lsl marked this pull request as ready for review December 13, 2021 06:22
@lsl lsl added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 13, 2021
@allilevine allilevine force-pushed the add/atomic-transfer-with-plugin branch from 06e644c to f74e34e Compare December 13, 2021 15:53
@obenland
Copy link
Member

That looks like v1 endpoint code so I don't think so, what did you have in mind?

You're right, it is :(
It might be why /wpcom/v2/atomic/transfer is still unused. At one point that state was meant to be connected to it and client/state/automated-transfer to be retired.

@retrofox retrofox added the [Size] L Large sized issue label Dec 13, 2021
Copy link
Contributor

@retrofox retrofox left a comment

Choose a reason for hiding this comment

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

I've tested the approach using the #58848 branch. It works as expected, keep in mind that there are still some patches to go.
Testing instruction is described in the PR.
Probably it deserves a couple of additional eyes, too.

@lsl lsl merged commit 6dd5aad into trunk Dec 14, 2021
@lsl lsl deleted the add/atomic-transfer-with-plugin branch December 14, 2021 01:11
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 14, 2021
@a8ci18n
Copy link

a8ci18n commented Dec 14, 2021

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7039878

Thank you @allilevine for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Dec 21, 2021

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Size] L Large sized issue Woop WooCommerce on Plans Pod
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

6 participants