Skip to content

Conversation

@GreenHatHG
Copy link
Contributor

@GreenHatHG GreenHatHG commented Nov 22, 2025

@GreenHatHG GreenHatHG force-pushed the feat/webdav-dynamic-token-command branch from d8c3969 to da92966 Compare December 2, 2025 07:40
@GreenHatHG GreenHatHG force-pushed the feat/webdav-dynamic-token-command branch from 21f7c04 to 17c381f Compare December 2, 2025 07:53
Copy link
Collaborator

@skshetry skshetry left a comment

Choose a reason for hiding this comment

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

Thank you for contributing. This looks good overall. One question. Could you also add a few tests to exercise the BearerAuth code path? That would help ensure it works correctly and does not regress.

Also, contribution to dvc repositories now require accepting the CLA: https://cla-assistant.io/treeverse/dvc-webdav. It'd be great if you could do that. Thanks.

@CLAassistant
Copy link

CLAassistant commented Dec 4, 2025

CLA assistant check
All committers have signed the CLA.

@GreenHatHG
Copy link
Contributor Author

@skshetry
I've added the test cases covering BearerAuth as requested.
Also, to ensure end-to-end stability, I've added a corresponding integration test in the dvc repo (treeverse/dvc#10917).

# indicating no further retries will be attempted.
with pytest.raises(StopIteration):
flow.send(resp_401_again)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don’t see the need for tests beyond this line, especially the concurrent one. I doubt they would help catch the issue if it occurs in the future.

When I requested tests, my only concern was verifying that the command is called and behaves as expected: setting the token in the header on success and raising an error when it exits with a failure. Another goal was to ensure it works on Windows, though the current test doesn’t cover that since all subprocess calls are mocked and I’m okay with that.

I appreciate that you also added tests for token refresh, but the rest feels excessive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback!
I agree that the test suite was getting a bit heavy. I've removed test_auth_flow_failure_after_refresh and the other edge-case tests as suggested.
It looks much cleaner now. Please let me know if there's anything else needed.

@GreenHatHG
Copy link
Contributor Author

@skshetry
It seems the GitHub Actions workflow is waiting for approval to run. Could you please hit the "Approve and run" button when you have a moment? Thanks!
图片

@skshetry
Copy link
Collaborator

skshetry commented Dec 5, 2025

@GreenHatHG, looks like we don't have pytest-mock installed here. Please feel add them to tests dependencies in pyproject.toml.

@GreenHatHG
Copy link
Contributor Author

@GreenHatHG, looks like we don't have pytest-mock installed here. Please feel add them to tests dependencies in pyproject.toml.

Fixed in the latest commit.
All CI checks have passed. The remaining conversation threads are addressed in the code.
I think this is ready to be merged whenever you have a moment.

@skshetry skshetry merged commit a6786e2 into treeverse:main Dec 5, 2025
21 checks passed
@skshetry
Copy link
Collaborator

skshetry commented Dec 5, 2025

Thank you for contributing!

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