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 Mixpanel: Fix Mixpanel 429 status code is not handled #12286

Closed
wants to merge 5 commits into from
Closed

🎉 Source Mixpanel: Fix Mixpanel 429 status code is not handled #12286

wants to merge 5 commits into from

Conversation

itaseskii
Copy link
Contributor

What

Fix Mixpanel 429 status code is not handled

Closes #9410

How

The previous implementation had rate limit of 400 req/h for all https://mixpanel.com/api/2.0/ endpoints which is not the correct value according to the Mixpanel documentation https://help.mixpanel.com/hc/en-us/articles/115004602563-Rate-Limits-for-Export-API-Endpoints. This PR decreases the rate limiting to 60 req/h

Recommended reading order

  1. x.java
  2. y.python

🚨 User Impact 🚨

Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.

Pre-merge Checklist

Expand the relevant checklist and delete the others.

New Connector

Community member or Airbyter

  • Community member? 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
    • docs/SUMMARY.md
    • docs/integrations/<source or destination>/<name>.md including changelog. See changelog example
    • docs/integrations/README.md
    • airbyte-integrations/builds.md
  • PR name follows PR naming conventions

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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub by running the /publish command described here
  • After the connector is published, connector added to connector index as described here
  • Seed specs have been re-generated by building the platform and committing the changes to the seed spec files, as described here
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

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
  • If new credentials are required for use in CI, add them to GSM. Instructions.
  • /test connector=connectors/<name> command is passing
  • New Connector version released on Dockerhub and connector version bumped by running the /publish command described here
Connector Generator
  • Issue acceptance criteria met
  • PR name follows PR naming conventions
  • If adding a new generator, add it to the list of scaffold modules being tested
  • The generator test modules (all connectors with -scaffold in their name) have been updated with the latest scaffold by running ./gradlew :airbyte-integrations:connector-templates:generator:testScaffoldTemplates then checking in your changes
  • Documentation which references the generator is updated as needed

Tests

Unit

Put your unit tests output here.

Integration

Put your integration tests output here.

Acceptance

Put your acceptance tests output here.

@github-actions github-actions bot added the area/connectors Connector related issues label Apr 22, 2022
@itaseskii itaseskii changed the title fix mixpanel rate limiting 🎉 Source Mixpanel: Fix Mixpanel 429 status code is not handled Apr 22, 2022
@harshithmullapudi harshithmullapudi self-requested a review April 25, 2022 15:04
@harshithmullapudi harshithmullapudi self-assigned this Apr 25, 2022
@harshithmullapudi
Copy link
Contributor

Hey @itaseskii can you follow these steps in the doc to update the Dockerfile

@github-actions github-actions bot added the area/documentation Improvements or additions to documentation label May 2, 2022
@itaseskii
Copy link
Contributor Author

Hey @itaseskii can you follow these steps in the doc to update the Dockerfile

Hey @harshithmullapudi I have bumped the version to 0.1.14 and updated the changelog with the new version.

@@ -699,7 +699,7 @@ class Export(DateSlicesMixin, IncrementalMixpanelStream):

primary_key: str = None
cursor_field: str = "time"
reqs_per_hour_limit: str = 60 # 1 query per minute
reqs_per_hour_limit: int = 60 # 1 query per minute
Copy link
Contributor

Choose a reason for hiding this comment

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

Since IncrementalMixpanelStream extends MixpanelStream and now this value is equal to MixpanelStream#reqs_per_hour_limit, I think you don't have to have this property here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed & removed.

Copy link
Contributor

@lgomezm lgomezm left a comment

Choose a reason for hiding this comment

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

Hi @itaseskii. Thank you for fixing this issue. This looks good to me.

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented May 4, 2022

/test connector=source-mixpanel

🕑 source-mixpanel https://github.com/airbytehq/airbyte/actions/runs/2268711708
❌ source-mixpanel https://github.com/airbytehq/airbyte/actions/runs/2268711708
🐛 https://gradle.com/s/u7h5372icub7y

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented May 5, 2022

/test connector=source-mixpanel

🕑 source-mixpanel https://github.com/airbytehq/airbyte/actions/runs/2273854605

@CLAassistant
Copy link

CLAassistant commented May 5, 2022

CLA assistant check
All committers have signed the CLA.

@LuisMunozVillarreal
Copy link

Thanks for working on this. It's affecting me too.

CI is failing due to google-github-actions/setup-gcloud failed with: no credentials provided to export

Based on this message, I believe the issue has been already fixed in master, but I'm not sure.

@itaseskii
Copy link
Contributor Author

Hey @harshithmullapudi I have just resigned the CLA and everything seems to be fine now. Is there anything blocking this from being merged?

@LuisMunozVillarreal
Copy link

LuisMunozVillarreal commented May 11, 2022

Hi @itaseskii,

CI is blocking this from being merged. I believe you have to bring the latest changes from master to fix it.

Could you try? Thanks

@itaseskii
Copy link
Contributor Author

The merge conflicts have been resolved and the connector was bumped to 0.1.16

@LuisMunozVillarreal
Copy link

Hi @harshithmullapudi. Could you trigger another CI build on this? Thanks

@harshithmullapudi
Copy link
Contributor

harshithmullapudi commented May 16, 2022

/test connector=source-mixpanel

🕑 source-mixpanel https://github.com/airbytehq/airbyte/actions/runs/2331212027

@harshithmullapudi
Copy link
Contributor

Can you take a look at this? Do you see integration tests running in local?

@itaseskii
Copy link
Contributor Author

Sure. what exactly do I need to look into? :)

@harshithmullapudi
Copy link
Contributor

Can you confirm if the integration tests are passing?

@itaseskii
Copy link
Contributor Author

Can we run the test pipeline again? From what I can see the last build has failed with the following reason

The self-hosted runner: ip-10-0-11-70 lost communication with the server. Verify the machine is running and has a healthy network connection. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

@roman-romanov-o
Copy link
Contributor

roman-romanov-o commented May 25, 2022

/test connector=source-mixpanel

🕑 source-mixpanel https://github.com/airbytehq/airbyte/actions/runs/2384077394
🕑 source-mixpanel https://github.com/airbytehq/airbyte/actions/runs/2384077394

@misteryeo
Copy link
Contributor

@harshithmullapudi bumping this

@alafanechere alafanechere added bounty-S Maintainer program: claimable small bounty PR bounty labels Jun 2, 2022
@itaseskii
Copy link
Contributor Author

itaseskii commented Jun 2, 2022

@alafanechere How should we proceed with this? Should we close it in favor of #13372 since this fix was merged with the PR.

@harshithmullapudi
Copy link
Contributor

Hey closing this then as the fix is already merged

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 bounty bounty-S Maintainer program: claimable small bounty PR community connectors/source/mixpanel reward-50
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

🐛 Source Mixpanel: 429 status code is not handled