Skip to content

enabled filtering of /subscriptions by external customer ID #5937

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

Merged
merged 8 commits into from
Jul 10, 2025

Conversation

mshra
Copy link
Contributor

@mshra mshra commented Jun 18, 2025

solves #5828

Copy link

vercel bot commented Jun 18, 2025

@mshra is attempting to deploy a commit to the polar-sh Team on Vercel.

A member of the Team first needs to authorize it.

@frankie567
Copy link
Member

Thank you @mshra, that's exactly it. May I ask you to run the linter?

cd server/
uv run task lint && uv run task lint_types

@frankie567
Copy link
Member

Another thing @mshra:

Can we call the parameter external_customer_id, to be consistent with other API (related to #5787)?

@mshra
Copy link
Contributor Author

mshra commented Jun 18, 2025

Thank you @mshra, that's exactly it. May I ask you to run the linter?

cd server/
uv run task lint && uv run task lint_types

apparently, when I ran uv run task lint_types
I get this output

pyproject.toml:1: error: Error importing plugin "pydantic.mypy": No module named 'pydantic'  [misc]
Found 1 error in 1 file (errors prevented further checking)

which is weird because I do have pydantic as my dependencies when I freeze

> uv pip freeze | grep "pydantic"
pydantic==2.10.6
pydantic-core==2.27.2
pydantic-extra-types==2.10.5
pydantic-settings==2.9.1

am I missing something?

@mshra
Copy link
Contributor Author

mshra commented Jun 18, 2025

Another thing @mshra:

Can we call the parameter external_customer_id, to be consistent with other API (related to #5787)?

Sure thing @frankie567 , will look into this 👍🏽

@frankie567
Copy link
Member

Thank you @mshra, that's exactly it. May I ask you to run the linter?

cd server/
uv run task lint && uv run task lint_types

apparently, when I ran uv run task lint_types I get this output

pyproject.toml:1: error: Error importing plugin "pydantic.mypy": No module named 'pydantic'  [misc]
Found 1 error in 1 file (errors prevented further checking)

which is weird because I do have pydantic as my dependencies when I freeze

> uv pip freeze | grep "pydantic"
pydantic==2.10.6
pydantic-core==2.27.2
pydantic-extra-types==2.10.5
pydantic-settings==2.9.1

am I missing something?

Weird indeed. Did you run uv sync before running the command? It should install all the required dependencies.

@mshra
Copy link
Contributor Author

mshra commented Jun 18, 2025

Apparently, my uv version was out of date. My bad and thank you for assistance @frankie567

Copy link

vercel bot commented Jun 19, 2025

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

Name Status Preview Comments Updated (UTC)
polar ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 2:42pm
polar-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 2:42pm

@malthejorgensen
Copy link
Contributor

malthejorgensen commented Jul 2, 2025

@mshra We can merge this if you rename customer_external_id to external_customer_id

(from #5937 (comment))

@mshra
Copy link
Contributor Author

mshra commented Jul 8, 2025

Hi @frankie567 @malthejorgensen , I have a question regarding naming convention for CustomerExternalID, should that be changed to ExternalCustomerID as well (to match customer_id and CustomerID convention) ?

As the CustomerExternalID also has a dependency in server/polar/customer/endpoints.py

@frankie567
Copy link
Member

@mshra Good point, and I would say, ideally, yes :) If you can change that too, would be awesome 🙏

@mshra
Copy link
Contributor Author

mshra commented Jul 9, 2025

noted @frankie567 and pushed the latest changes

@frankie567 frankie567 merged commit 57d0abf into polarsource:main Jul 10, 2025
4 of 7 checks passed
@frankie567
Copy link
Member

Perfect, thanks 🙏

@mshra mshra deleted the list-subs/customer_external_id branch July 10, 2025 08:05
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