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

refactor(analytics): Adds tenant ID to Analytics Provider #4594

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

RaghavRox
Copy link

Closes #4521

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Adds TenantID field to SqlxClient and ClickHouseClient

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@RaghavRox RaghavRox requested review from a team as code owners May 8, 2024 14:10
@RaghavRox
Copy link
Author

I have added tenant_id param to from_conf method. Is that the correct way? @lsampras

Comment on lines 67 to 68
#[derive(Clone, Debug)]
pub struct TenantID(String);
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this struct definition to the common_utils crate?

Copy link
Author

Choose a reason for hiding this comment

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

I moved it to types.rs in common_utils crate and added #[allow(unused)] in some places so clippy can stop complaining. Is that fine?

lsampras
lsampras previously approved these changes May 13, 2024
@lsampras
Copy link
Member

@RaghavRox the latest commit fails to compile due to some errors,
can you address the CI failures here.

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.

[REFACTOR] Update AnalyticsPool to hold variables for tenant ID
2 participants