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

Ignore extra kwargs on perform() in WebhooksManagerJob #1466

Merged
merged 2 commits into from
Jul 6, 2022

Conversation

minichate
Copy link
Contributor

@minichate minichate commented Jul 6, 2022

What this PR does

This changes the perform() method of WebhooksManagerJob to accept-and-ignore additional keyword arguments.

One of the things we noticed during upgrade from v18 to >=v19 is that https://github.com/Shopify/shopify_app/blob/main/lib/shopify_app/jobs/webhooks_manager_job.rb#L9 used to take a webhooks parameter to the function, but no longer does. This manifests in errors where webhooks that have been registered with Core pre-upgrade include that parameter on delivery, and so error out.

image

I plan on porting this fix to v19.1 branch and v20 branch along with main, since I think it's a useful change and removes a gotcha for upgrades.

Reviewer's guide to testing

  • Install a version of the app that is on an older (v18) version which has webhook(s) registered. For example, a app/uninstalled handler;
  • Upgrade the application to v19 or v20
  • Uninstall the app (assuming app/uninstalled webhooks are registered!)
  • The webhook should not generate error(s) anymore

Checklist

Before submitting the PR, please consider if any of the following are needed:

  • Update CHANGELOG.md if the changes would impact users
  • Update README.md, if appropriate.
  • Update any relevant pages in /docs, if necessary
  • For security fixes, the Disclosure Policy must be followed.

@minichate minichate merged commit f47b906 into main Jul 6, 2022
@minichate minichate deleted the ignore-extra-kwargs branch July 6, 2022 17:02
@minichate minichate mentioned this pull request Jul 6, 2022
1 task
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems July 6, 2022 17:25 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.

None yet

3 participants