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-Stripe - Removed Updated col from customer_balance_transactions (Fix of PR 49811) #49976

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

williamkaper
Copy link
Contributor

@williamkaper williamkaper commented Dec 20, 2024

What

  • This PR fixes a previous PR where I missed removing the updated column from the schema. 🐛Source-Stripe - Fix for Customer_Balance_Transaction records occasionally getting missed #49811.

  • Unrelated, there was an issue with the invoice line items and subscription items lazy loading with the updated cursor. The events were the parent events, and the logic was exposed to use the sub_attrib element to drill into lines and items respectively to pull out the correct nested object. For now, I've fixed it by just changing the stream to pull those non-lazy from the API when the parent is updated.

How

  • I've removed updated from schema

Review guide

  1. metadata.yml - version bump
  2. pyproject.toml - version bump
  3. source-stripe/source.py
  4. source-stripe/streams.py
  5. source-stripe/schemas/customer_balance_transactions.json
  6. stripe.md - Updated the documentation

User Impact

  • Schema should detect the dropped column

Can this PR be safely reverted and rolled back?

I believe so assuming column backfill is enabled.

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Dec 20, 2024

@williamkaper is attempting to deploy a commit to the Airbyte Growth Team on Vercel.

A member of the Team first needs to authorize it.

@octavia-squidington-iii octavia-squidington-iii added the area/documentation Improvements or additions to documentation label Dec 20, 2024
@williamkaper
Copy link
Contributor Author

@marcosmarxm @maxi297 I just realized I missed removing updated from the schema in the PR last week. It doesn't seem to cause any issues, but I don't want to leave this in a pigged up spot. I apologize for missing this last PR.

@marcosmarxm
Copy link
Member

Thanks for the quick fix @williamkaper I triggered tests let's wait them.

@williamkaper
Copy link
Contributor Author

Thanks for the quick fix @williamkaper I triggered tests let's wait them.

Thanks. I found a bug in one of @alafanechere changes on one of my older PRs that is already merged. I'm testing a fix for that now. If its tests out, I may just add it to this PR

@@ -206,7 +206,7 @@ def streams(self, config: MutableMapping[str, Any]) -> List[Stream]:
],
**args,
)
subscription_items = UpdatedCursorIncrementalStripeLazySubStream(
subscription_items = ParentIncrementalStripeSubStream(
Copy link
Contributor Author

@williamkaper williamkaper Jan 3, 2025

Choose a reason for hiding this comment

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

Changed subscription_items and invoice_line_items from UpdatedCursorIncrementalStripeLazySubStream to ParentIncrementalStripeSubStream because UpdatedCursorIncrementalStripeLazySubStream on update used the events from the parent, but the logic is missing to use sub_items_attr to dig out the elements from the invoice/subscription object that comes back from the events.

StripeLazy handles the digging properly
UpdatedCursorIncrementalStripeStream does not

@@ -698,6 +698,12 @@ def __init__(
legacy_cursor_field=legacy_cursor_field,
event_types=event_types,
response_filter=response_filter,
record_extractor=UpdatedCursorIncrementalRecordExtractor(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was added to mirror the change @alafanechere made below for StripeLazySubStream

@marcosmarxm
Copy link
Member

@alafanechere and @maxi297 this is a small hotfix to solve a bug in previous contribution. Can we take a look at this?

@CLAassistant
Copy link

CLAassistant commented Jan 28, 2025

CLA assistant check
All committers have signed the CLA.

@ericvanbenschoten-dv01 ericvanbenschoten-dv01 force-pushed the williamkaper/source-stripe-customer-balance-transactions-stream-fix-updated-col branch from 11fa9ed to 12bdc4c Compare February 10, 2025 16:23
@@ -698,12 +700,6 @@ def __init__(
legacy_cursor_field=legacy_cursor_field,
event_types=event_types,
response_filter=response_filter,
record_extractor=UpdatedCursorIncrementalRecordExtractor(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ericvanbenschoten-dv01 why was this removed?

@ericvanbenschoten-dv01 ericvanbenschoten-dv01 force-pushed the williamkaper/source-stripe-customer-balance-transactions-stream-fix-updated-col branch from 12bdc4c to 568828d Compare February 10, 2025 16:43
@marcosmarxm
Copy link
Member

Hello 👋, I apologize if your contribution hasn't been reviewed or updated yet. I'm working to address the community contribution backlog. I created this GitHub project to help you understand when to expect a review. This week, my goal is to complete all contributions related to Marketplace and Manifest-only connectors. Next week, I will focus on API Certified Connectors, followed by DB Java Connector contributions. If you have any questions about your contribution, please feel free to send me a direct message in the Airbyte Community Slack (and include the link to your pull request).

@marcosmarxm
Copy link
Member

marcosmarxm commented Feb 18, 2025

/format-fix

Format-fix job started... Check job output.

✅ Changes applied successfully. (7d4a6e8)

@marcosmarxm
Copy link
Member

marcosmarxm commented Mar 6, 2025

@ericvanbenschoten-dv01 need you to sign the CLA to continue the process here.

@ericvanbenschoten-dv01
Copy link

@ericvanbenschoten-dv01 need you to sign the CLA to continue the process here.

@marcosmarxm thank you! CLA has been signed

Copy link

vercel bot commented Mar 13, 2025

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

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2025 3:14pm

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 community connectors/source/stripe
Projects
Development

Successfully merging this pull request may close these issues.

6 participants