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

Warn less often about scope mismatch #4574

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

shauns
Copy link
Contributor

@shauns shauns commented Oct 3, 2024

WHY are these changes introduced?

We show a warning if we think the developer may have forgotten to run deploy prior to dev, in particular if the developer has changed their app scopes in their local TOML file, but they're out of sync with what is found remotely. There are cases where this check is giving a false alarm.

WHAT is this pull request doing?

Normalise the scope strings before comparing them.

How to test your changes?

Tricky one... there's an automated test. And we have an internal app that has one of these false alarms that I'm happy to share once we have a testable patch in place.

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 3, 2024

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

github-actions bot commented Oct 3, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
72.66% (+0.06% 🔼)
8536/11748
🟡 Branches
69.66% (+0.13% 🔼)
4187/6011
🟡 Functions
71.67% (+0.06% 🔼)
2209/3082
🟡 Lines
72.99% (+0.07% 🔼)
8078/11068

Test suite run success

1942 tests passing in 874 suites.

Report generated by 🧪jest coverage report action from 5c5618a

@shauns
Copy link
Contributor Author

shauns commented Oct 3, 2024

/snapit

Copy link
Contributor

github-actions bot commented Oct 3, 2024

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

Test the snapshot by intalling your package globally:

pnpm i -g @shopify/cli@0.0.0-snapshot-20241003175935

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.

Copy link
Contributor

@dmerand dmerand left a comment

Choose a reason for hiding this comment

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

Logic looks good to me, should lead to fewer false positives on mismatch 👍🏼 I didn't tophat per the note in the PR that it's a bit tricky; the tests look to cover the case well.

@shauns shauns added this pull request to the merge queue Oct 4, 2024
@shauns
Copy link
Contributor Author

shauns commented Oct 4, 2024

Thanks Donald -- I checked it with the snapshot build on the affected app and the warning went away.

Merged via the queue into main with commit 8da87af Oct 4, 2024
37 checks passed
@shauns shauns deleted the bug-scope-match-warning branch October 4, 2024 09:16
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