Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

1106 saas config shopify access endpoints #1220

Merged
merged 9 commits into from
Aug 31, 2022

Conversation

ghost
Copy link

@ghost ghost commented Aug 30, 2022

Purpose

  • Purpose of this PR is to add Shopify connector access endpoints

Changes

  • Added config for Shopify Access Endpoints
  • Added related dataset and configuration
  • Added associated tests and fixtures to validate above functionality

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Good unit test/integration test coverage
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #1106

@ghost ghost requested a review from galvana August 30, 2022 14:17
requests:
read:
method: GET
path: /admin/api/2022-07/customers/<customer_id>/orders.json?status=any
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you move status=any into query_params?

query_params:
  - name: status
    value: any

from fidesops.ops.schemas.redis_cache import PrivacyRequestIdentity
from fidesops.ops.task import graph_task
from tests.ops.graph.graph_test_util import assert_rows_match

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add a connection test here, look at test_datadog_task.py for an example. I think it's good to add this so we know if failures are caused by a connectivity issue vs a deeper problem.

Copy link
Author

Choose a reason for hiding this comment

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

I see, that's a nice test to know connectivity issue before diving into other endpoints.

- name: access_token
connector_param: access_token
data_path: articles
- name: blog_article_comments
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is missing data_path: comments, the data we are receiving is in the form

{
    "comments": [{},{},...],
    "comments": [{},{},...],
    ...

We need to "unwrap" it so we are just left with a single list of comment objects.

requests:
read:
method: GET
path: /admin/api/2022-07/comments.json
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is returning comments for emails other than just the email identity, we need to add a filter and an assertion to make sure that we are only returning comments for our identity email.

configuration:
source: headers
rel: next
- name: customer_addresses
Copy link
Collaborator

Choose a reason for hiding this comment

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

Need to unwrap this further by adding data_path: addresses.

configuration:
source: headers
rel: next
- name: customer_order_transactions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing data_path: transactions

configuration:
source: headers
rel: next
- name: customer_orders
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing data_path: orders

Copy link
Collaborator

@galvana galvana left a comment

Choose a reason for hiding this comment

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

A few endpoints are missing the data_path field which are causing the dataset and assertions to be incorrect. I'll stop the review here for now to start the fixes as soon as possible.

@ghost ghost linked an issue Aug 31, 2022 that may be closed by this pull request
Copy link
Collaborator

@galvana galvana left a comment

Choose a reason for hiding this comment

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

Thanks for making the requested changes, approved!

@galvana galvana merged commit 1e5d568 into main Aug 31, 2022
@galvana galvana deleted the 1106-saas-config-shopify-access-endpoints branch August 31, 2022 17:53
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shopify [Access]
1 participant