Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Nov 19, 2024

No description provided.

@ghost ghost requested review from arilton and hsyyid November 19, 2024 15:02
@ghost ghost self-assigned this Nov 19, 2024
@@ -1,41 +1,46 @@
#!/usr/bin/env python

from setuptools import setup
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have changes in this file?

Copy link
Author

Choose a reason for hiding this comment

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

Fixed


try:
import tests.utils as test_utils
import tests.utils as test_utils # type: ignore
Copy link
Member

Choose a reason for hiding this comment

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

Why do we have changes in the tests folder?

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

batch_summary["updated"] += updated_lines
except Exception as e:
for batch_bookmark in batch_bookmarks:
batch_bookmark["reason"] = str(e)
Copy link
Member

Choose a reason for hiding this comment

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

I think this should actually be "error" – I didn't give you a good example for that, sorry

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

"hash": build_record_hash(record),
"success": True,
"external_id": record.get('cid',""),
"reason": ""
Copy link
Member

Choose a reason for hiding this comment

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

We don't need this reason key

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

"hash": build_record_hash(record),
"success": False,
"external_id": record.get('cid',""),
"reason": str(e)
Copy link
Member

Choose a reason for hiding this comment

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

Same feedback as below, this should be "error"

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

batch_state["bookmarks"][stream].append({
"hash": build_record_hash(record),
"success": False,
"external_id": record.get('cid',""),
Copy link
Member

Choose a reason for hiding this comment

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

What is cid in this context? Is it guaranteed to always exist or was it just an example from your data.singer? In other targets we check if the user has supplied externalId and if not we don't include this external_id in the bookmark for this record

Copy link
Author

Choose a reason for hiding this comment

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

It was particular to the data.singer. Fixed to check if externalId was supplied.

@ghost ghost requested a review from hsyyid November 19, 2024 17:33
@hsyyid hsyyid changed the title Feature/hgi 6804 HGI-6804: add target_state Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants