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

Source Greenhouse: unpin CDK #35988

Merged
merged 7 commits into from
Mar 14, 2024
Merged

Source Greenhouse: unpin CDK #35988

merged 7 commits into from
Mar 14, 2024

Conversation

ChristoGrab
Copy link
Contributor

@ChristoGrab ChristoGrab commented Mar 12, 2024

What

Unpinning CDK version for source Greenhouse.

How

  • Updated poetry dependencies and manifest version
  • Small change to the StreamSlicer custom component to return a StreamSlice (instead of a dict) to account for changes made to the CDK in 0.68.2

Copy link

vercel bot commented Mar 12, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
airbyte-docs ⬜️ Ignored (Inspect) Visit Preview Mar 14, 2024 2:37pm

@ChristoGrab ChristoGrab marked this pull request as ready for review March 13, 2024 17:08
@octavia-squidington-iv octavia-squidington-iv requested a review from a team March 13, 2024 17:10
@@ -17,7 +17,7 @@ include = "source_greenhouse"

[tool.poetry.dependencies]
python = "^3.9,<3.12"
airbyte-cdk = "==0.63.2"
airbyte-cdk = "^0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's better to use ">=0.63.2", but not blocking on this one.

@@ -109,11 +110,14 @@ def stream_slices(self) -> Iterable[StreamSlice]:
sync_mode=SyncMode.full_refresh, cursor_field=None, stream_slice=parent_stream_slice, stream_state=None
):
parent_state_value = parent_record.get(self.parent_key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

What if there is no parent_state_value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Took another look, and now realizing the variable name is a bit misleading. This is set to the value of the current parent record's primary key, so we can assume it always exists. I've updated the variable name to parent_primary_key for clarity.

Copy link
Contributor

@brianjlai brianjlai left a comment

Choose a reason for hiding this comment

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

some nits. In particular please get rid of the extra print statement before merging. But don't need to block on approval

@@ -25,7 +25,8 @@ def __post_init__(self, parameters: Mapping[str, Any]):
self._state = {}

def stream_slices(self) -> Iterable[StreamSlice]:
yield {self.request_cursor_field: self._state.get(self.cursor_field, self.START_DATETIME)}
slice = StreamSlice(partition={}, cursor_slice={self.request_cursor_field: self._state.get(self.cursor_field, self.START_DATETIME)})
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: if we're only yielding one slice in the subsequent line, can we just do this in one line instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍

parent_primary_key = parent_record.get(self.parent_key)

partition = {self.stream_slice_field: parent_primary_key}
print(self.stream_slice_field)
Copy link
Contributor

Choose a reason for hiding this comment

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

remove extra print statement

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh whoops! Thanks for catching, removed

@ChristoGrab ChristoGrab merged commit ea2ca73 into master Mar 14, 2024
31 checks passed
@ChristoGrab ChristoGrab deleted the christo/greenhouse-cdk branch March 14, 2024 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/greenhouse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants