Skip to content

Updating to latest Shopify Partner API Version - #12768

Merged
michelle0927 merged 4 commits into
PipedreamHQ:masterfrom
ctrlaltdylan:pierce/shopify-partner-2024-10
Jul 17, 2024
Merged

michelle0927 merged 4 commits into
PipedreamHQ:masterfrom
ctrlaltdylan:pierce/shopify-partner-2024-10

Conversation

@ctrlaltdylan

@ctrlaltdylan ctrlaltdylan commented Jul 10, 2024 •

Copy link
Copy Markdown
Contributor

WHY

Shopify Partner API's version has deprecated 2024-01 and needs to be updated in order to continue to function.

I've updated these components to use 2024-10 the latest version.

Summary by CodeRabbit

  • New Features

    • Introduced dynamic API versioning in Shopify Partner integration.
  • Enhancements

    • Improved logging and restructured variable declarations in various modules for better readability and maintainability.
  • Version Updates

    • Updated versions across multiple modules for consistency and new features:
      • @pipedream/shopify_partner to 0.1.3.
      • Various source modules to 0.1.3.
      • verify-webhook action to 0.1.3.

@vercel

vercel Bot commented Jul 10, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 15, 2024 3:19pm

@vercel

vercel Bot commented Jul 10, 2024

Copy link
Copy Markdown

@ctrlaltdylan is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 10, 2024 •

Copy link
Copy Markdown
Contributor

Walkthrough

This update focuses on refining the Shopify Partner component. Key changes include version increments, description updates, and format adjustments for better readability and logging. Notably, a new constant PARTNER_API_VERSION has been introduced to dynamically handle API versions. These adjustments ensure improved maintainability and consistency across the component.

Changes

File Changes Summary
components/shopify_partner/package.json Updated version from "0.1.2" to "0.1.3".
components/shopify_partner/shopify_partner.app.mjs Introduced PARTNER_API_VERSION, updated descriptions, and dynamically used API version in the URL.
components/shopify_partner/sources/new-app-charges/new-app-charges.mjs Updated version from "0.0.17" to "0.1.3". Reformatted run method and improved logging.
components/shopify_partner/sources/new-app-installs/new-app-installs.mjs Updated version from "0.1.2" to "0.1.3". Refactored async run() method.
components/shopify_partner/sources/new-app-relationship-events/new-app-relationship-events.mjs Updated version from "0.1.2" to "0.1.3". Modified descriptions and query logic based on pagination.
components/shopify_partner/actions/verify-webhook/verify-webhook.mjs Updated version from "0.0.4" to "0.1.3".
components/shopify_partner/sources/new-app-uninstalls/new-app-uninstalls.mjs Updated version from "0.1.2" to "0.1.3". Simplified variable declarations in run method.

Poem

🐰 Amidst the lines of code we dove,
A constant named and versions roved.
Descriptions clear, methods refined,
In this update, progress shines!
With logs improved and structure sound,
The Shopify Partner stands its ground. 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dylburger dylburger added User submitted Submitted by a user triaged For maintainers: This issue has been triaged by a Pipedream employee labels Jul 10, 2024

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3739a98 and 9ab59c4.

Files selected for processing (5)
  • components/shopify_partner/package.json (1 hunks)
  • components/shopify_partner/shopify_partner.app.mjs (3 hunks)
  • components/shopify_partner/sources/new-app-charges/new-app-charges.mjs (3 hunks)
  • components/shopify_partner/sources/new-app-installs/new-app-installs.mjs (2 hunks)
  • components/shopify_partner/sources/new-app-relationship-events/new-app-relationship-events.mjs (3 hunks)
Files skipped from review due to trivial changes (2)
  • components/shopify_partner/package.json
  • components/shopify_partner/sources/new-app-installs/new-app-installs.mjs
Additional comments not posted (7)
components/shopify_partner/sources/new-app-charges/new-app-charges.mjs (2)

8-8: Version Update Approved

The version update from "0.0.17" to "0.1.3" is appropriate and aligns with the PR objectives.


52-54: Logging Refactor Approved

The refactored logging for transaction IDs improves visibility and is correctly implemented.

components/shopify_partner/sources/new-app-relationship-events/new-app-relationship-events.mjs (2)

10-10: Version Update Approved

The version update from "0.1.2" to "0.1.3" is appropriate and aligns with the PR objectives.


11-12: Description Update Approved

The description update improves clarity and is correct.

components/shopify_partner/shopify_partner.app.mjs (3)

4-4: New Constant Introduction Approved

The introduction of the new constant PARTNER_API_VERSION with the value "2024-10" is appropriate and aligns with the PR objectives.


12-13: Description Update Approved

The description updates improve clarity and are correct.

Also applies to: 51-52


81-81: Dynamic Endpoint Approved

The dynamic endpoint correctly uses the new constant PARTNER_API_VERSION, improving maintainability.

Ensure all references to the endpoint are updated to use the new constant.

Verification successful

Dynamic Endpoint Approved

The dynamic endpoint correctly uses the new constant PARTNER_API_VERSION, improving maintainability.

No other references to variations of the endpoint URL were found in the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all references to the endpoint use the new constant.

# Test: Search for endpoint references. Expect: Only occurances using the new constant.
rg --type js -A 5 $'partners.shopify.com/${this.$auth.organization_id}/api/${PARTNER_API_VERSION}/graphql.json'

Length of output: 308


Script:

#!/bin/bash
# Description: Verify all references to the endpoint use the new constant.

# Test: Search for endpoint references. Expect: Only occurrences using the new constant.
rg --type js -A 5 'partners\.shopify\.com/\$\{this\.\$auth\.organization_id\}/api/\$\{PARTNER_API_VERSION\}/graphql\.json'

Length of output: 124


Script:

#!/bin/bash
# Description: Verify all references to the endpoint, checking for any variations that might not use the constant.

# Test: Search for endpoint references with potential variations.
rg --type js -A 5 'partners\.shopify\.com/.*/api/.*/graphql\.json'

Length of output: 68

@michelle0927 michelle0927 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good, but you need to update the versions of verify-webhook and new-app-uninstalls.

@ctrlaltdylan

Copy link
Copy Markdown
Contributor Author

Thanks @michelle0927 , updated those two component versions

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9ab59c4 and acb2da0.

Files selected for processing (2)
  • components/shopify_partner/actions/verify-webhook/verify-webhook.mjs (1 hunks)
  • components/shopify_partner/sources/new-app-uninstalls/new-app-uninstalls.mjs (2 hunks)
Files skipped from review due to trivial changes (2)
  • components/shopify_partner/actions/verify-webhook/verify-webhook.mjs
  • components/shopify_partner/sources/new-app-uninstalls/new-app-uninstalls.mjs

michelle0927
michelle0927 previously approved these changes Jul 10, 2024
@vunguyenhung

Copy link
Copy Markdown
Contributor

Hi everyone, all test cases are passed! Ready for release!

Test report
https://vunguyenhung.notion.site/Updating-to-latest-Shopify-Partner-API-Version-12768-488d79dc3f554ad08e29c47b72941cfd

@luancazarine luancazarine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @ctrlaltdylan, there are some versions that I'm not sure are correct, could you check please?

…ok.mjs

Co-authored-by: Luan Cazarine <luanhc@gmail.com>
@ctrlaltdylan

Copy link
Copy Markdown
Contributor Author

@luancazarine the skipping of versions was intentional. It was just easier for me to maintain when all versions were synced. But not a problem, I applied your suggestions.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between acb2da0 and 31df016.

Files selected for processing (1)
  • components/shopify_partner/actions/verify-webhook/verify-webhook.mjs (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • components/shopify_partner/actions/verify-webhook/verify-webhook.mjs

…rges.mjs

Co-authored-by: Luan Cazarine <luanhc@gmail.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 31df016 and 1210015.

Files selected for processing (1)
  • components/shopify_partner/sources/new-app-charges/new-app-charges.mjs (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • components/shopify_partner/sources/new-app-charges/new-app-charges.mjs

@luancazarine luancazarine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@vunguyenhung

Copy link
Copy Markdown
Contributor

Hi everyone, all test cases are passed! Ready for release!

Test report
https://vunguyenhung.notion.site/Updating-to-latest-Shopify-Partner-API-Version-12768-488d79dc3f554ad08e29c47b72941cfd

@michelle0927

Copy link
Copy Markdown
Collaborator

Merging on behalf of @ctrlaltdylan

@michelle0927
michelle0927 merged commit cf79b9c into PipedreamHQ:master Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triaged For maintainers: This issue has been triaged by a Pipedream employee User submitted Submitted by a user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants