Skip to content

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

Open
vdusek wants to merge 2 commits into
masterfrom
fix/api-url-v2-suffix
Open

vdusek wants to merge 2 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.47%. Comparing base (53a9954) to head (f77e27b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1141      +/-   ##
==========================================
+ Coverage   95.43%   95.47%   +0.03%     
==========================================
  Files          61       61              
  Lines        5935     5940       +5     
==========================================
+ Hits         5664     5671       +7     
+ Misses        271      269       -2     
Flag Coverage Δ
integration 90.65% <90.90%> (-0.15%) ⬇️
unit 88.88% <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.

This branch has not been deployed

No deployments
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