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

Defer remote app creation during app init to include all default creation options. #4668

Merged
merged 8 commits into from
Oct 18, 2024

Conversation

isaacroldan
Copy link
Contributor

@isaacroldan isaacroldan commented Oct 17, 2024

WHY are these changes introduced?

With the changes to force a link after app init, we forgot to include the default creation options during app creation. Meaning that the app creation needs to happen after the cloning to have all the necessary context.

WHAT is this pull request doing?

  • Move template/prompts before org/app selection
  • Force authenticate before any prompt
  • Defer app creation (if you select to create a new app) until the project has been created successfully locally, that way we can know the scopes/default app url for app creation. And also don't pollute your account with zombie apps if the cloning fails.

How to test your changes?

With the snapshot, just try shopify app init, try being logged out and with different templates (check that the toml is correctly filled)

Post-release steps

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor

github-actions bot commented Oct 17, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.51% (-0.1% 🔻)
8370/11544
🟡 Branches
69.03% (-0.08% 🔻)
4115/5961
🟡 Functions
71.92% (-0.02% 🔻)
2190/3045
🟡 Lines
72.81% (-0.1% 🔻)
7913/10868

Test suite run success

1904 tests passing in 865 suites.

Report generated by 🧪jest coverage report action from 2c6fbd4

@Shopify Shopify deleted a comment from github-actions bot Oct 17, 2024
@Shopify Shopify deleted a comment from github-actions bot Oct 17, 2024
@isaacroldan
Copy link
Contributor Author

/snapit

Copy link
Contributor

🫰✨ Thanks @isaacroldan! Your snapshot has been published to npm.

Test the snapshot by intalling your package globally:

pnpm i -g @shopify/[email protected]

After installing, validate the version by running just shopify in your terminal
If the versions don't match, you might have multiple global instances installed.
Use which shopify to find out which one you are running and uninstall it.

@isaacroldan isaacroldan marked this pull request as ready for review October 17, 2024 10:35
Copy link
Contributor

We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset.
If the changes are user-facing, run "pnpm changeset add" to track your changes and include them in the next release CHANGELOG.

})

return {app}
}
}

export type SelectAppOrNewAppNameResult =
Copy link
Contributor

Choose a reason for hiding this comment

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

👌

@isaacroldan isaacroldan added this pull request to the merge queue Oct 17, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 17, 2024
@isaacroldan isaacroldan added this pull request to the merge queue Oct 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 18, 2024
@isaacroldan isaacroldan requested a review from a team as a code owner October 18, 2024 07:39
@isaacroldan isaacroldan added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit 7b8165f Oct 18, 2024
36 checks passed
@isaacroldan isaacroldan deleted the updates-to-init-linking branch October 18, 2024 07:56
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.

2 participants