-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎉 Source Salesforce: reduce info logs (#37340)
Co-authored-by: cristina.mariscal <[email protected]> Co-authored-by: Maxime Carbonneau-Leclerc <[email protected]>
- Loading branch information
1 parent
1f9dd51
commit 6f69a00
Showing
9 changed files
with
74 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] | |
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry] | ||
version = "2.5.7" | ||
version = "2.5.8" | ||
name = "source-salesforce" | ||
description = "Source implementation for Salesforce." | ||
authors = [ "Airbyte <[email protected]>",] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...grations/connectors/source-salesforce/unit_tests/resource/http/response/job_response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"id": "750Tn000004ZoR3IAK", | ||
"operation": "queryAll", | ||
"object": "ActiveFeatureLicenseMetric", | ||
"createdById": "0050900000Bf63SAAR", | ||
"createdDate": "2024-04-25T15:50:37.000+0000", | ||
"systemModstamp": "2024-04-25T15:50:37.000+0000", | ||
"state": "UploadComplete", | ||
"concurrencyMode": "Parallel", | ||
"contentType": "CSV", | ||
"apiVersion": 57.0, | ||
"lineEnding": "LF", | ||
"columnDelimiter": "COMMA" | ||
} |
35 changes: 35 additions & 0 deletions
35
...e-integrations/connectors/source-salesforce/unit_tests/salesforce_job_response_builder.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright (c) 2024 Airbyte, Inc., all rights reserved. | ||
|
||
import json | ||
|
||
from airbyte_cdk.test.mock_http import HttpResponse | ||
from airbyte_cdk.test.mock_http.response_builder import HttpResponseBuilder, find_template | ||
|
||
|
||
class SalesforceJobResponseBuilder: | ||
def __init__(self): | ||
self._response = find_template("job_response", __file__) | ||
self._status_code = 200 | ||
|
||
def with_id(self, id: str) -> "HttpResponseBuilder": | ||
self._response["id"] = id | ||
return self | ||
|
||
def with_state(self, state: str) -> "HttpResponseBuilder": | ||
self._response["state"] = state | ||
return self | ||
|
||
def with_status_code(self, status_code: int) -> "HttpResponseBuilder": | ||
self._status_code = status_code | ||
return self | ||
|
||
def with_error_message(self, error_message: int) -> "HttpResponseBuilder": | ||
self._response["errorMessage"] = error_message | ||
return self | ||
|
||
def get_response(self) -> any: | ||
return self._response | ||
|
||
def build(self) -> HttpResponse: | ||
return HttpResponse(json.dumps(self._response), self._status_code) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters