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

Add query to determine whether a workspace has an alpha or beta connector #21417

Merged
merged 2 commits into from
Jan 17, 2023

Conversation

pmossman
Copy link
Contributor

What

The Free Connector Program info endpoint needs to return a boolean indicating whether or not a workspace contains at least one alpha or beta connector (The front-end will use this info to conditionally render a banner about the program).

This PR adds a method to the ConfigRepository to efficiently query for this info.

How

Add a method that joins actor with actor_definition and counts records that contain an alpha or beta release stage. This is in OSS because all tables involved are OSS tables in the config DB. The Cloud API handler will call this method to serve the free_connector_program_info endpoint.

@pmossman pmossman requested a review from a team as a code owner January 13, 2023 19:19
@pmossman pmossman temporarily deployed to more-secrets January 13, 2023 19:21 — with GitHub Actions Inactive
@pmossman pmossman temporarily deployed to more-secrets January 13, 2023 19:21 — with GitHub Actions Inactive
@pmossman pmossman temporarily deployed to more-secrets January 13, 2023 21:58 — with GitHub Actions Inactive
@@ -1517,6 +1517,30 @@ public Geography getGeographyForConnection(final UUID connectionId) throws IOExc
.fetchOneInto(Geography.class);
}

/**
* Specialized query for efficiently determining eligibility for the Free Connector Program. If a
Copy link
Contributor

Choose a reason for hiding this comment

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

Side thought I want to confirm:

If a workspace user signs up for the free connector program and also has connections with both GA source and destination, we should only consider connections with alpha/beta sources/destinations as free yes?

If a user does not sign up, but already has payment information with us, are they automatically enrolled in the free program?

We might have covered this already. So sorry if I missed it. Checking my understanding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If a workspace user signs up for the free connector program and also has connections with both GA source and destination, we should only consider connections with alpha/beta sources/destinations as free yes?

Yes, the credit processing cron will only set free_usage: true on Orb events for jobs that contain an alpha/beta connector.

If a user does not sign up, but already has payment information with us, are they automatically enrolled in the free program?

They are not. Currently our Stripe terms of use for credit payments only allow a single charge to complete that one purchase. So to enroll for the program, they need to explicitly step through the 'setup' mode Stripe checkout which contains a broader agreement for allowing Airbyte to charge that payment in the future

@pmossman pmossman temporarily deployed to more-secrets January 17, 2023 16:24 — with GitHub Actions Inactive
@pmossman pmossman temporarily deployed to more-secrets January 17, 2023 16:25 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

Airbyte Code Coverage

File Coverage [81.54%] 🍏
ConfigRepository.java 81.54% 🍏
Total Project Coverage 26.61% 🍏

@pmossman pmossman merged commit 72a9b29 into master Jan 17, 2023
@pmossman pmossman deleted the parker/repository-workspace-has-alpha-beta branch January 17, 2023 19:01
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