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 ruby bundler config when app is of rails type and uses bundler local config #3024

Merged

Conversation

alvaro-shopify
Copy link
Contributor

@alvaro-shopify alvaro-shopify commented Oct 27, 2023

WHY are these changes introduced?

Fixes https://github.com/Shopify/develop-app-management/issues/1517

WHAT is this pull request doing?

  • Instead of modifying the local bundle configuration that could be used by the app, equivalent env variables are used
  • Fix ruby unit tests as some of them were not being run because the method inTemporaryDirectory was mocked

How to test your changes?

  • Create a spin instance for a 1P app that uses local bundle config
spin up shopify_chat:theme-extension -c shopify_chat.branch=theme-extension-spin
  • Access the spin terminal
spin ssh
  • Modify the package.json to use the cli version 0.0.0-experimental-20231027101204
  • Restart the cli process
  • Restart the server process
  • No error should be shown

Tested on Windows and Ubuntu

  • npm init @shopify/app@0.0.0-experimental-20231027101204 -- --template ruby
  • cd in the app folder and npm run shopify app generate extension -- --template theme_app_extension
  • npm run dev
  • Theme app extension server should be run without any error
  • 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
    • I've made sure that any changes to dev or deploy have been reflected in the internal flowchart.

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.48% (+0.4% 🔼)
6216/8460
🟡 Branches
70.42% (+0.49% 🔼)
3047/4327
🟡 Functions
71.95% (+0.5% 🔼)
1580/2196
🟡 Lines
74.67% (+0.37% 🔼)
5898/7899
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / ConcurrentOutput.tsx
97.62% (-2.38% 🔻)
75% (-8.33% 🔻)
100%
97.44% (-2.56% 🔻)

Test suite run success

1452 tests passing in 675 suites.

Report generated by 🧪jest coverage report action from 28e6290

@alvaro-shopify alvaro-shopify force-pushed the ruby-bundler-emebed-use-env-variables-not-config branch 2 times, most recently from e0a82b2 to a5af09a Compare October 27, 2023 10:11
@github-actions
Copy link
Contributor

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/common/version.d.ts
@@ -1 +1,2 @@
-export declare const CLI_KIT_VERSION = "3.50.0";
\ No newline at end of file
+export declare const CLI_KIT_VERSION = "3.50.0";
+export declare const getCliKitVersion: () => string;
\ No newline at end of file

@alvaro-shopify alvaro-shopify marked this pull request as ready for review October 27, 2023 10:23
@alvaro-shopify alvaro-shopify force-pushed the ruby-bundler-emebed-use-env-variables-not-config branch from a5af09a to 28e6290 Compare October 27, 2023 10:31
@alvaro-shopify alvaro-shopify changed the title Fix ruby bundler config when Rails app that uses bundler local config Fix ruby bundler config when app is of rails type and uses bundler local config Oct 27, 2023
Copy link
Contributor

@Arkham Arkham left a comment

Choose a reason for hiding this comment

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

Really good fix, LGTM 🙏

@alvaro-shopify alvaro-shopify added this pull request to the merge queue Oct 31, 2023
Merged via the queue into main with commit 09d638d Oct 31, 2023
@alvaro-shopify alvaro-shopify deleted the ruby-bundler-emebed-use-env-variables-not-config branch October 31, 2023 10:52
@shopify-shipit shopify-shipit bot temporarily deployed to nightly October 31, 2023 11:28 Inactive
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