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

Remove unified deployments beta flag code #2936

Merged
merged 13 commits into from
Nov 6, 2023
Merged

Conversation

matteodepalo
Copy link
Contributor

@matteodepalo matteodepalo commented Oct 6, 2023

WHY are these changes introduced?

We still have code that deals with simplified deployments branching logic. Because everyone is on simplified deployments now we can remove that code.

WHAT is this pull request doing?

I've removed what I could find related to unified deployments. We still need to differentiate between releasing or not releasing when doing a deploy so I've changed the mode to a simple release boolean.
Also, we don't need to fetch functions anymore as part of the fetchAppExtensionRegistrations query.

How to test your changes?

Run deploy and deploy --no-release and everything should work.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2023

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/theme-code-tools
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/cli-foundations

@matteodepalo matteodepalo force-pushed the clean-up-old-code branch 4 times, most recently from 98d6641 to 7f43432 Compare October 12, 2023 09:17
@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.86% (-0.43% 🔻)
6108/8383
🟡 Branches
70% (-0.41% 🔻)
2968/4240
🟡 Functions
71.51% (-0.33% 🔻)
1564/2187
🟡 Lines
74.06% (-0.4% 🔻)
5800/7831
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / app.ts
85.56% (-1.11% 🔻)
63.16%
83.87% (-3.23% 🔻)
88.61% (-1.27% 🔻)
🟢
... / extension-instance.ts
79.79% (-4.91% 🔻)
72.06% (-3.94% 🔻)
87.5% (-3.13% 🔻)
81.82% (-3.9% 🔻)
🟢
... / context.ts
89.71% (-0.43% 🔻)
87.79% (-0.7% 🔻)
87.1% (-0.4% 🔻)
90.1% (-0.44% 🔻)
🟢
... / deploy.ts
86.11% (-0.47% 🔻)
92.86% (+0.75% 🔼)
87.5% (+8.55% 🔼)
88.24% (-0.08% 🔻)
🟢
... / identifiers-extensions.ts
91.94% (+1.17% 🔼)
82.14% (-1.64% 🔻)
100%
92.59% (+1.36% 🔼)
🟢
... / identifiers.ts
87.5% (-6.25% 🔻)
80% (-12.31% 🔻)
100%
85.71% (-7.14% 🔻)
🟢
... / prompts.ts
83.33% (-3.48% 🔻)
79.17% (-8.33% 🔻)
76% (-4% 🔻)
85.71% (-1.94% 🔻)
🔴
... / draftable-extension.ts
28.57% (-4.76% 🔻)
10% (-6.67% 🔻)
33.33%
29.17% (-5.45% 🔻)

Test suite run success

1430 tests passing in 664 suites.

Report generated by 🧪jest coverage report action from b49cce5

@matteodepalo matteodepalo marked this pull request as ready for review October 31, 2023 13:45
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.

Copy link
Contributor

@gonzaloriestra gonzaloriestra left a comment

Choose a reason for hiding this comment

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

Nice work! 🔥

I've checked that everything keeps working and commented a few things that I don't understand, but they are probably fine.

Copy link
Contributor

@mattnoakes mattnoakes left a comment

Choose a reason for hiding this comment

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

Looks and works great!! I just have some questions about removing what seemed to be legacy functions code from before they moved onto the app module framework.

Also, do you want to keep set_beta_flag.ts around, or can it be removed too?

packages/app/src/cli/services/context/identifiers.test.ts Outdated Show resolved Hide resolved
packages/app/src/cli/services/context/identifiers.ts Outdated Show resolved Hide resolved
}

const functionExtensions = options.app.allExtensions.filter((ext) => ext.isFunctionExtension)
functionExtensions.forEach((ext) => (ext.usingExtensionsFramework = true))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this logic be removed now that all functions are on the app module framework?

packages/app/src/cli/services/context/prompts.test.ts Outdated Show resolved Hide resolved
@matteodepalo
Copy link
Contributor Author

All good points, thanks @mattnoakes , I'll address them!

Copy link
Contributor

@mattnoakes mattnoakes left a comment

Choose a reason for hiding this comment

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

Thanks for addressing our feedback!! Everything still works!

@matteodepalo
Copy link
Contributor Author

I should have addressed all feedback but for some reason the test coverage run fails 🤔

@matteodepalo
Copy link
Contributor Author

I've removed the code that deals with legacy functions, I'd rather have that in a separate PR. @mattnoakes could I get another round of QA just to be extra sure? Everything should still work. If it does we can merge tomorrow.

Copy link
Contributor

@mattnoakes mattnoakes left a comment

Choose a reason for hiding this comment

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

Looks good! Deploy works as expected!

title: 'C',
type: 'PRODUCT_DISCOUNTS',
}

const LOCAL_APP = (uiExtensions: ExtensionInstance[], functionExtensions: ExtensionInstance[] = []): AppInterface => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const LOCAL_APP = (uiExtensions: ExtensionInstance[], functionExtensions: ExtensionInstance[] = []): AppInterface => {
const LOCAL_APP = (uiExtensions: ExtensionInstance[]): AppInterface => {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to keep the function related changes separate from this PR, we can go around and clean them up later.

@matteodepalo matteodepalo added this pull request to the merge queue Nov 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 3, 2023
@matteodepalo matteodepalo added this pull request to the merge queue Nov 6, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2023
Copy link
Contributor

github-actions bot commented Nov 6, 2023

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/public/node/ruby.d.ts
@@ -12,7 +12,6 @@ interface ExecCLI2Options {
     signal?: AbortSignal;
     stdout?: Writable;
     stderr?: Writable;
-    unifiedDeployment?: boolean;
 }
 /**
  * Execute CLI 2.0 commands.

@matteodepalo matteodepalo added this pull request to the merge queue Nov 6, 2023
Merged via the queue into main with commit 29166a9 Nov 6, 2023
@matteodepalo matteodepalo deleted the clean-up-old-code branch November 6, 2023 15:14
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.

4 participants