Skip to content

Commit ef164d1

Browse files
Source Mailchimp: revert extra logging (#22405)
* #1058 source Mailchimp: revert extra logging * #1058 source Mailchimp: upd changelog * auto-bump connector version --------- Co-authored-by: Octavia Squidington III <[email protected]>
1 parent 22838c2 commit ef164d1

File tree

5 files changed

+4
-13
lines changed

5 files changed

+4
-13
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@
987987
- name: Mailchimp
988988
sourceDefinitionId: b03a9f3e-22a5-11eb-adc1-0242ac120002
989989
dockerRepository: airbyte/source-mailchimp
990-
dockerImageTag: 0.3.3
990+
dockerImageTag: 0.3.4
991991
documentationUrl: https://docs.airbyte.com/integrations/sources/mailchimp
992992
icon: mailchimp.svg
993993
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7895,7 +7895,7 @@
78957895
supportsNormalization: false
78967896
supportsDBT: false
78977897
supported_destination_sync_modes: []
7898-
- dockerImage: "airbyte/source-mailchimp:0.3.3"
7898+
- dockerImage: "airbyte/source-mailchimp:0.3.4"
78997899
spec:
79007900
documentationUrl: "https://docs.airbyte.com/integrations/sources/mailchimp"
79017901
connectionSpecification:

airbyte-integrations/connectors/source-mailchimp/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ COPY main.py ./
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

15-
LABEL io.airbyte.version=0.3.3
15+
LABEL io.airbyte.version=0.3.4
1616
LABEL io.airbyte.name=airbyte/source-mailchimp

airbyte-integrations/connectors/source-mailchimp/source_mailchimp/streams.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def request_params(
5555
return params
5656

5757
def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
58-
self.logger.info(f"Parsing response for stream {self.name}")
5958
response_json = response.json()
6059
yield from response_json[self.data_field]
6160

@@ -98,13 +97,11 @@ def get_updated_state(self, current_stream_state: MutableMapping[str, Any], late
9897
def stream_slices(
9998
self, *, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
10099
) -> Iterable[Optional[Mapping[str, Any]]]:
101-
self.logger.info(f"Slicing stream: {self.name}")
102100
slice_ = {}
103101
stream_state = stream_state or {}
104102
cursor_value = stream_state.get(self.cursor_field)
105103
if cursor_value:
106104
slice_[self.filter_field] = cursor_value
107-
self.logger.info(f"Yielding slice {slice_}")
108105
yield slice_
109106

110107
def request_params(self, stream_state=None, stream_slice=None, **kwargs):
@@ -113,7 +110,6 @@ def request_params(self, stream_state=None, stream_slice=None, **kwargs):
113110
params = super().request_params(stream_state=stream_state, stream_slice=stream_slice, **kwargs)
114111
default_params = {"sort_field": self.sort_field, "sort_dir": "ASC", **stream_slice}
115112
params.update(default_params)
116-
self.logger.info(f"Request params are {params}")
117113
return params
118114

119115

@@ -148,20 +144,16 @@ def stream_slices(
148144
self, *, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
149145
) -> Iterable[Optional[Mapping[str, Any]]]:
150146
stream_state = stream_state or {}
151-
self.logger.info(f"Slicing the stream: {self.name}")
152147
if self.campaign_id:
153148
# this is a workaround to speed up SATs and enable incremental tests
154149
campaigns = [{"id": self.campaign_id}]
155150
else:
156-
self.logger.info("Reading campaigns")
157151
campaigns = Campaigns(authenticator=self.authenticator).read_records(sync_mode=SyncMode.full_refresh)
158-
self.logger.info("Starting for loop to slice the stream")
159152
for campaign in campaigns:
160153
slice_ = {"campaign_id": campaign["id"]}
161154
cursor_value = stream_state.get(campaign["id"], {}).get(self.cursor_field)
162155
if cursor_value:
163156
slice_[self.filter_field] = cursor_value
164-
self.logger.info(f"Yielding slice {slice_}")
165157
yield slice_
166158

167159
def path(self, stream_slice: Mapping[str, Any] = None, **kwargs) -> str:
@@ -187,7 +179,6 @@ def get_updated_state(self, current_stream_state: MutableMapping[str, Any], late
187179
return current_stream_state
188180

189181
def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
190-
self.logger.info(f"Parsing response for stream {self.name}")
191182
response_json = response.json()
192183
# transform before save
193184
# [{'campaign_id', 'list_id', 'list_is_active', 'email_id', 'email_address', 'activity[array[object]]', '_links'}] ->
@@ -196,4 +187,3 @@ def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapp
196187
for item in data:
197188
for activity_item in item.pop("activity", []):
198189
yield {**item, **activity_item}
199-
self.logger.info("Parsed response")

docs/integrations/sources/mailchimp.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ Now that you have set up the Mailchimp source connector, check out the following
230230

231231
| Version | Date | Pull Request | Subject |
232232
|---------|------------|----------------------------------------------------------|----------------------------------------------------------------------------|
233+
| 0.3.4 | 2023-02-06 | [22405](https://github.com/airbytehq/airbyte/pull/22405) | Revert extra logging |
233234
| 0.3.3 | 2023-02-01 | [22228](https://github.com/airbytehq/airbyte/pull/22228) | Add extra logging |
234235
| 0.3.2 | 2023-01-27 | [22014](https://github.com/airbytehq/airbyte/pull/22014) | Set `AvailabilityStrategy` for streams explicitly to `None` |
235236
| 0.3.1 | 2022-12-20 | [20720](https://github.com/airbytehq/airbyte/pull/20720) | Use stream slices as a source for request params instead of a stream state |

0 commit comments

Comments
 (0)