Skip to content

fix: append /v2 to api_url only when it is missing - #1141

Merged
vdusek merged 3 commits into
masterfrom
fix/api-url-v2-suffix
Oct 19, 2026
Merged

vdusek merged 3 commits into
masterfrom
fix/api-url-v2-suffix

Conversation

@vdusek

@vdusek vdusek commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

ApifyClient(api_url='https://api.apify.com/v2') sent every request to /v2/v2/.... Both clients now append the /v2 segment to api_url and api_public_url only when the URL path doesn't already end with it, the same as the JS client.

Closes: #1138

✍️ Drafted by Claude Code

@vdusek vdusek added the t-tooling Issues with this label are in the ownership of the tooling team. label Oct 16, 2026
@vdusek vdusek self-assigned this Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.51%. Comparing base (ecccadb) to head (59aa423).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1141   +/-   ##
=======================================
  Coverage   95.50%   95.51%           
=======================================
  Files          61       61           
  Lines        5942     5947    +5     
=======================================
+ Hits         5675     5680    +5     
  Misses        267      267           
Flag Coverage Δ
integration 90.61% <90.90%> (-0.01%) ⬇️
unit 88.96% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek
vdusek marked this pull request as ready for review October 16, 2026 11:21
@vdusek
vdusek requested a review from Mantisus October 16, 2026 11:21
@apify-service-account apify-service-account added the tested Temporary label used only programatically for some analytics. label Oct 16, 2026

@Mantisus Mantisus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@apify-approval-mirror apify-approval-mirror Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mirroring approval from @Mantisus.

# Conflicts:
#	src/apify_client/_apify_client.py
@vdusek
vdusek merged commit 909d916 into master Oct 19, 2026
32 checks passed
@vdusek
vdusek deleted the fix/api-url-v2-suffix branch October 19, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

api_url ending in /v2 produces /v2/v2 request URLs

3 participants