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

fix: consumerTable.get returns customer #435

Merged
merged 5 commits into from
Nov 12, 2024
Merged

Conversation

fforbeck
Copy link
Member

Context

While testing the Egress Tracking System in Staging, an error occurred indicating that the router couldn't resolve the customer:

✘ [ERROR] Failed to record egress for space did:key:z6MkkYoZNccuPxDxc8kh6YgPSZwyXCqeS2QYqhtQtYyEKYTt {
    name: 'FieldError',
    message: 'Object contains invalid field "customer":\n' +
      '  - Expected value of type string instead got undefined'
    ...

Issue

The error arises because the consumerTable.get query does not include the customer field in its projection, despite the customer existing in consumerTable and being manually retrievable.

Fix

This PR updates the consumerTable.get query to ensure the customer field is projected correctly, allowing the router to resolve the customer as expected. It also fixes the related tests to reflect this change accurately.

Copy link

seed-deploy bot commented Nov 12, 2024

View stack outputs

Copy link
Member

@travis travis left a comment

Choose a reason for hiding this comment

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

This is good to merge, but if you could swap out the exponential retry function for p-retry it'd be even good-er to merge.

billing/test/lib/egress-traffic.js Outdated Show resolved Hide resolved
@seed-deploy seed-deploy bot temporarily deployed to pr435 November 12, 2024 22:17 Inactive
@fforbeck fforbeck merged commit e3275b1 into main Nov 12, 2024
3 checks passed
@fforbeck fforbeck deleted the fix/resolve-egress-customer branch November 12, 2024 22:31
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.

3 participants