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

fixed bug which crashes okta log incremental sync #7584

Merged
merged 3 commits into from
Nov 3, 2021
Merged

fixed bug which crashes okta log incremental sync #7584

merged 3 commits into from
Nov 3, 2021

Conversation

colleen-love
Copy link
Contributor

@colleen-love colleen-love commented Nov 3, 2021

What

Okta logs failed when doing an incremental sync.

How

The logs endpoint uses different filtering from the users and groups endpoints. Instead of using a query param called filter, it uses a query param called since. Here's Okta's documentation on this.

Recommended reading order

  1. airbyte-integrations/connectors/source-okta/source_okta/source.py
  2. airbyte-integrations/connectors/source-okta/integration_tests/configured_catalog.json

Pre-merge Checklist

Expand the relevant checklist and delete the others.

Updating a connector

Community member or Airbyter

  • Grant edit access to maintainers (instructions)
  • Secrets in the connector's spec are annotated with airbyte_secret
  • Unit & integration tests added and passing. Community members, please provide proof of success locally e.g: screenshot or copy-paste unit, integration, and acceptance test output. To run acceptance tests for a Python connector, follow instructions in the README. For java connectors run ./gradlew :airbyte-integrations:connectors:<name>:integrationTest.
  • Code reviews completed
  • Documentation updated
    • Connector's README.md
    • Connector's bootstrap.md. See description and examples
    • Changelog updated in docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
  • PR name follows PR naming conventions
  • Connector version bumped like described here

Airbyter

If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.

  • Create a non-forked branch based on this PR and test the below items on it
  • Build is successful
  • Credentials added to Github CI. Instructions.
  • /test connector=connectors/<name> command is passing.
  • New Connector version released on Dockerhub by running the /publish command described here

@CLAassistant
Copy link

CLAassistant commented Nov 3, 2021

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the area/connectors Connector related issues label Nov 3, 2021
@colleen-love
Copy link
Contributor Author

Capture

@@ -82,17 +83,22 @@ def cursor_field(self) -> str:
pass

def get_updated_state(self, current_stream_state: MutableMapping[str, Any], latest_record: Mapping[str, Any]) -> Mapping[str, Any]:
lowest_date = str(pendulum.datetime.min)
lowest_date = str(datetime.min)
Copy link
Member

Choose a reason for hiding this comment

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

why this change from pendulum to datetime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

pendulum.datetime.min wasn't resolving on my machine.

Copy link
Member

Choose a reason for hiding this comment

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

you need to run tests with pyenv activated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reverted it back to pendulum

@marcosmarxm marcosmarxm temporarily deployed to more-secrets November 3, 2021 02:41 Inactive
@jrhizor jrhizor temporarily deployed to more-secrets November 3, 2021 02:42 Inactive
Copy link
Member

@marcosmarxm marcosmarxm left a comment

Choose a reason for hiding this comment

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

thanks @collinscangarella

@marcosmarxm marcosmarxm merged commit c9c38e4 into airbytehq:master Nov 3, 2021
lmossman pushed a commit that referenced this pull request Nov 3, 2021
* fixed bug which crashes okta log incremental sync

* bump connector version

* revert to pendulum
schlattk pushed a commit to schlattk/airbyte that referenced this pull request Jan 4, 2022
* fixed bug which crashes okta log incremental sync

* bump connector version

* revert to pendulum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants