-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add support for compliance_topics in the app TOML #3392
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
Coverage report
Show files with reduced coverage 🔻
Test suite run success1615 tests passing in 754 suites. Report generated by 🧪jest coverage report action from 1be6420 |
e25e8b9
to
d58b34c
Compare
e000ee3
to
9defd1a
Compare
.../app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.test.ts
Outdated
Show resolved
Hide resolved
packages/app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.ts
Outdated
Show resolved
Hide resolved
packages/app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code looks mostly good to me! 😄 Just some small comments here and there. Another note is that I think we should maybe start keeping track of all the places we are changing due to beta flags, as I assume we want to rollback a number of these changes once we declarative-webhooks
beta is rolled out 100%?
.../app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.test.ts
Outdated
Show resolved
Hide resolved
}, | ||
{ | ||
compliance_topics: ['shop/redact'], | ||
uri: 'https://example.com/shop-deletion', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will the uri's here change to something like uri: '/shop-deletion'
with Alex's PR where relative paths are supported, or compliance webhooks should be unaffected here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I guess we should support relative paths here as well. We can leave it for a later PR once both are merged. Cc @alexanderMontague
6f4c649
to
619dd6a
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
48cde9a
to
8c46f29
Compare
da97d0f
to
630abd8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, we should try to get this merged! Will need a rebase, tophat looks great too but lmk if you want to go over this again once cleaned up.
packages/app/src/cli/models/extensions/specifications/validation/app_config_webhook.ts
Outdated
Show resolved
Hide resolved
packages/app/src/cli/models/extensions/specifications/validation/app_config_webhook.ts
Outdated
Show resolved
Hide resolved
.../app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.test.ts
Outdated
Show resolved
Hide resolved
packages/app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.ts
Outdated
Show resolved
Hide resolved
packages/app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.ts
Outdated
Show resolved
Hide resolved
packages/app/src/cli/models/extensions/specifications/app_config_privacy_compliance_webhooks.ts
Show resolved
Hide resolved
917c4b8
to
9de15c6
Compare
b044d85
to
ae16c52
Compare
c5c5e93
to
d1ea26b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, amazing jog with this 🎉 !
…to compliance_topics
Differences in type declarationsWe 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:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/public/common/array.d.ts@@ -20,6 +20,13 @@ export declare function getArrayRejectingUndefined<T>(array: (T | undefined)[]):
* @returns True if the array contains duplicates.
*/
export declare function getArrayContainsDuplicates<T>(array: T[]): boolean;
+/**
+ * Removes duplicated items from an array.
+ *
+ * @param array - The array to inspect.
+ * @returns Returns the new duplicate free array.
+ */
+export declare function uniq<T>(array: T[]): T[];
/**
* This method is like except that it accepts which is
* invoked for each element in to generate the criterion by which
packages/cli-kit/dist/public/common/object.d.ts@@ -69,4 +69,11 @@ export declare function setPathValue(object: object, path: string, value?: unkno
* @param object - The value to check.
* @returns - Returns true if value is empty, else false.
*/
-export declare function isEmpty(object: object): boolean;
\ No newline at end of file
+export declare function isEmpty(object: object): boolean;
+/**
+ * Removes the undefined elements.
+ *
+ * @param object - The object whose undefined will be deleted.
+ * @returns A copy of the object with the undefined elements deleted.
+ */
+export declare function compact(object: object): object;
\ No newline at end of file
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been testing it and everything works as expected 👌
@gracejychang thanks for taking care of it, great job!
WHY are these changes introduced?
Fixes https://github.com/Shopify/develop-app-management/issues/1600
WHAT is this pull request doing?
[[webhooks.subscriptions]]
withcompliance_topics
[webhooks.privacy_compliance]
compliance_topics
, but withouttopics
. It raises if none is present.declarative_webhooks
beta is enabled (code taken from Specs reverse transform receives betas #3416)How to test your changes?
With
declarative_webhooks
flag:Without
declarative_webhooks
flag:Measuring impact
How do we know this change was effective? Please choose one:
Checklist
dev
ordeploy
have been reflected in the internal flowchart.