On master.
Exists check now simply says yes if request is successful. So If we get 403 Forbidden or 401 Auth Required these are ignored, which looks the same as absent files to dvc. The simplest fix would be using res.raise_for_status() in .exists() check unless we have success or 404.
BTW, we already do something like that in utils.http.iter_url(). Smth like:
def exists(self, path_info):
res = self.request("HEAD", path_info.url)
if res.status_code == 404:
return False
res.raise_for_status()
return True
Does this still need to be worked on? If so can I work on this? I'll need some guidance on where to start.
@damakuno Sure! The above comment is talking about https://github.com/iterative/dvc/blob/0669d8d885307edff8971c75ee569baf6f65450c/dvc/tree/http.py#L143 .
Noted, I should add functional tests to dvc/dvc/tests/funct/test_tree.py to verify that it's raising Error status codes as intended yeah? I'll try to get to know how to run the functionality first then add my changes in and create a PR.
@damakuno Simple unit test would be enough, no need for a functional one :slightly_smiling_face: It would be added to tests/unit/remote/test_http.py .