Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cloudblueconnect/connect-extension-runner:33.2
FROM cloudblueconnect/connect-extension-runner:37

COPY pyproject.toml /install_temp/.
COPY poetry.* /install_temp/.
Expand Down
9 changes: 8 additions & 1 deletion connect_ext_datalake/services/payloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
'revoked': 'update',
}

TRANSLATION_ATTRIBUTES_PAGE_SIZE = 1000


def remove_properties(obj: dict, properties: list):
for prop in properties:
Expand Down Expand Up @@ -361,7 +363,12 @@ def sanitize_translation_attribute(attribute: dict):

def include_translation_attributes(client: ConnectClient, translation: dict):
translation['attributes'] = []
attributes = client('localization').translations[translation['id']].attributes.all()
attributes = (
client('localization')
.translations[translation['id']]
.attributes.all()
.limit(TRANSLATION_ATTRIBUTES_PAGE_SIZE)
)
for attribute in attributes:
translation['attributes'].append(sanitize_translation_attribute(attribute))

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
tty: true
volumes:
- .:/extension
# - node_modules:/extension/node_modules
- node_modules:/extension/node_modules
env_file:
- .extension_xv_datalake_dev.env

Expand Down
1,146 changes: 670 additions & 476 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ readme = "./README.md"

[tool.poetry.dependencies]
python = ">=3.9,<4"
connect-eaas-core = ">=33,<34"
connect-eaas-core = ">=33,<38"
google-cloud-pubsub = "^2.23.1"

[tool.poetry.dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions tests/events/test_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_publish_translations_success(
).mock(
return_value=[marketplace],
)
client_mocker('localization').translations[translation['id']].attributes.all().mock(
client_mocker('localization').translations[translation['id']].attributes.all().limit(1000).mock(
return_value=translation_attributes,
)

Expand Down Expand Up @@ -112,7 +112,7 @@ def test_publish_translations_individual_failure(
).mock(
return_value=[marketplace],
)
client_mocker('localization').translations[translation['id']].attributes.all().mock(
client_mocker('localization').translations[translation['id']].attributes.all().limit(1000).mock(
status_code=400,
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def test_handle_translation_change_success(
).mock(
return_value=[marketplace],
)
client_mocker('localization').translations[translation['id']].attributes.all().mock(
client_mocker('localization').translations[translation['id']].attributes.all().limit(1000).mock(
return_value=translation_attributes,
)

Expand Down Expand Up @@ -769,7 +769,7 @@ def test_handle_translation_change_failed(
).mock(
return_value=[marketplace],
)
client_mocker('localization').translations[translation['id']].attributes.all().mock(
client_mocker('localization').translations[translation['id']].attributes.all().limit(1000).mock(
status_code=400,
)

Expand Down