Fix: Allow compliance webhooks with legacy install flow #6108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WHY are these changes introduced?
Fixes #6003 regression - After PR #6003, users reported that the CLI incorrectly prevents deployment when using only compliance webhooks with
use_legacy_install_flow = true
.The validation treats ALL webhook subscriptions as app-specific, including compliance topics which are mandatory for public apps and should be allowed with legacy install flow.
User report: https://community.shopify.dev/t/compliance-topics-issue/18702
WHAT is this pull request doing?
This PR fixes the webhook validation logic to properly distinguish between app-specific webhooks and compliance webhooks:
topics
field as app-specificThe fix allows compliance-only webhook configurations to work with legacy install flow, which is necessary because:
compliance_topics
field, not thetopics
fieldHow to test your changes?
use_legacy_install_flow = true
shopify app deploy
- it should now succeedtopics
- deployment should fail as expectedPost-release steps
None required.
Measuring impact
How do we know this change was effective? Please choose one:
Checklist