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

Bing Ads Integration #5197

Merged
merged 43 commits into from
Aug 28, 2024
Merged

Bing Ads Integration #5197

merged 43 commits into from
Aug 28, 2024

Conversation

galvana
Copy link
Contributor

@galvana galvana commented Aug 14, 2024

Closes INTS-164

Description Of Changes

We're adding a new Integration with Microsoft's Bing Ads Network. This allows us to remove the emails of users from the Audience's Customer List of our clients. At the time of development, this is the only PII avaliable on the microsoft Advertising Network

Since the API is SOAP based, we had to do some changes to the saas connector and schemas, in order to accept files

Code Changes

  • Creating a new suite of configurations for Microsoft Advertisment
  • Set up request Overrides for the suite
  • Updating src/fides/api/schemas/saas/shared_schemas.py and src/fides/api/service/connectors/saas/authenticated_client.py to accept a optional files parameters

Steps to Confirm

  • Microsoft Advertisment should appear as an option in the integrations
  • Said integration testing connection should work properly
  • local tests with valid .toml file should work properly

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Documentation:
  • Base documentation in Confluence
  • documentation complete, PR opened in fidesdocs
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented Aug 14, 2024

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

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 5:55pm

Copy link

cypress bot commented Aug 14, 2024

fides    Run #9720

Run Properties:  status check passed Passed #9720  •  git commit 54e0f79eff ℹ️: Merge 8f0fe95e60a0f4e647ce093dc6cfa941172b8fa7 into 4a2dc3a958503527c86d1901b870...
Project fides
Branch Review refs/pull/5197/merge
Run status status check passed Passed #9720
Run duration 00m 36s
Commit git commit 54e0f79eff ℹ️: Merge 8f0fe95e60a0f4e647ce093dc6cfa941172b8fa7 into 4a2dc3a958503527c86d1901b870...
Committer Adrian Galvan
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

Attention: Patch coverage is 23.63636% with 126 lines in your changes missing coverage. Please review.

Project coverage is 85.95%. Comparing base (4a2dc3a) to head (8f0fe95).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...tations/microsoft_advertising_request_overrides.py 21.25% 125 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5197      +/-   ##
==========================================
- Coverage   86.41%   85.95%   -0.46%     
==========================================
  Files         362      363       +1     
  Lines       22792    22955     +163     
  Branches     3060     3081      +21     
==========================================
+ Hits        19695    19732      +37     
- Misses       2538     2663     +125     
- Partials      559      560       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

galvana and others added 26 commits August 26, 2024 17:37
TBD: Set up the correct architecture on fides for the script
Considering ifan empty Audience List is a Fail State or not.
We might not want to raise an Exception on these case, but fail silently? To consider. Leaving a Comment
Moving the Fixture CSV to the proper Location
We have a tracking ID as a response that we do not use yet, We might want to use it on the future
Updated on Authenticated Client.
Since its an Optional Parameter, and its on the end, we should not have problems with this change
if they dont comply to the expect format, we wont get a result from the relevant fields. Thus there was an error with the response.
response.text should yield the XML string containing the Error description from the endpoint
Still with some problems in local. The configuration is not being sent properly
We might want to do a deeper Error handling, as there acan be detailed errors on the SOAP Structure
Updating Test, using the real reference
@Vagoasdf Vagoasdf marked this pull request as ready for review August 27, 2024 15:03
@Vagoasdf Vagoasdf requested a review from a team as a code owner August 27, 2024 15:03
@Vagoasdf Vagoasdf self-assigned this Aug 27, 2024
@@ -26,6 +26,7 @@ class SaaSRequestParams(BaseModel):
headers: Dict[str, Any] = {}
query_params: Dict[str, Any] = {}
body: Optional[str] = None
files: Optional[list] = None
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we use a more specific type hint here? How about this?

RequestFile = Tuple[str, Tuple[str, IO, str]]

...

class SaaSRequestParams(BaseModel):
    """
    Holds the method, path, headers, query, and body params to build a SaaS HTTP request.
    """

    method: HTTPMethod
    path: str
    headers: Dict[str, Any] = {}
    query_params: Dict[str, Any] = {}
    body: Optional[str] = None
    files: Optional[List[RequestFile]] = None
    model_config = ConfigDict(use_enum_values=True, arbitrary_types_allowed=True)

method: GET
client_config:
protocol: https
host: login.microsoftonline.com
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sure we have the prod versions before we commit this version


connector_params:
- name: domain
default_value: clientcenter.api.sandbox.bingads.microsoft.com # change to the prod URL for the default
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's change this to the prod default value and remove the comment

@galvana galvana added the run unsafe ci checks Runs fides-related CI checks that require sensitive credentials label Aug 28, 2024
@Vagoasdf Vagoasdf self-requested a review August 28, 2024 16:22
@galvana
Copy link
Contributor Author

galvana commented Aug 28, 2024

I opened this branch to give @Vagoasdf a starting point, it was just all the started test files for a new integration. I reviewed @Vagoasdf's implementation and I approve ✅

@galvana galvana merged commit 9b2784f into main Aug 28, 2024
36 of 40 checks passed
@galvana galvana deleted the bing-ads branch August 28, 2024 18:33
Copy link

cypress bot commented Aug 28, 2024

fides    Run #9721

Run Properties:  status check passed Passed #9721  •  git commit 9b2784f3a3: Bing Ads Integration (#5197)
Project fides
Branch Review main
Run status status check passed Passed #9721
Run duration 00m 37s
Commit git commit 9b2784f3a3: Bing Ads Integration (#5197)
Committer Adrian Galvan
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 4
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run unsafe ci checks Runs fides-related CI checks that require sensitive credentials
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants