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

Return empty string if index-url not provided to AuthedUrlBuilder #10035

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

wssbck
Copy link
Contributor

@wssbck wssbck commented Jun 18, 2024

What are you trying to accomplish?

While AuthedUrlBuilder could be provided no index-url, it does not handle this case, making the following line cause an exception:

url.sub("://", "://#{basic_auth_details}@")

This can happen, for example, when tools like Dependabot for Azure DevOps do not provide index-url generally, as described in this issue:

tinglesoftware/dependabot-azure-devops#1167

Anything you want to highlight for special attention from reviewers?

Another approach would be to make Dependabot for Azure DevOps provide index-url for Python dependencies in credentials, however this would not fix the general issue of AuthedUrlBuilder not handling a nil index-url.

How will you know you've accomplished your goal?

tinglesoftware/dependabot-azure-devops#1167 will essentially become irrelevant.

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

@wssbck wssbck requested a review from a team as a code owner June 18, 2024 18:13
@wssbck wssbck changed the title Return empty string if index-url is nil in AuthedUrlBuilder Return empty string if index-url not provided to AuthedUrlBuilder Jun 18, 2024
Copy link
Contributor

@kbukum1 kbukum1 left a comment

Choose a reason for hiding this comment

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

LGTM

@wssbck
Copy link
Contributor Author

wssbck commented Jun 26, 2024

@kbukum1 thank you for reviewing. Do I need to update the branch for the PR to be merged?

@kbukum1
Copy link
Contributor

kbukum1 commented Jun 26, 2024

@kbukum1 thank you for reviewing. Do I need to update the branch for the PR to be merged?

@wssbck, we will update the branch before merging. No action needed from your side right now.

@kbukum1 kbukum1 merged commit fce4037 into dependabot:main Jun 27, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants