iterative / studio-support

❓ DVC Studio Issues, Question, and Discussions
https://studio.iterative.ai
16 stars 1 forks source link

No permission to fetch remote data #78

Closed haimat closed 1 year ago

haimat commented 1 year ago

We have a Github+DVC project with our own SSH server as DVC remote. To authenticate with SSH we use key files. After adding that project to Studio I set the credentials to accessing our remote, i.e. copy+pasted the public RSA key for SSH access into the "Cloud credentials" section of my Studio profile:

image

When I open the project in Studio, it seems everything is in place, I can see all the commits on Github and related DVC data:

image

However, Studio still tells me that it has no permission to fetch remote data:

image

Now I am wondering why Studio cannot access my project, even though I have provided the public key file for SSH access. I also tried to "force import", but that didn't help. What does even more surprise me is that apparently Studio has accessed the evaluation/results.json file, as you can see in the last image above, and that file is tracked by DVC on our SSH remote. So if Studio can read that file, why does it complain about having no permission to fetch remote data?

shcheklein commented 1 year ago

@haimat could you please check if there are hidden commits? E.g. in my case:

Screenshot 2023-03-08 at 3 13 25 PM Screenshot 2023-03-08 at 3 13 46 PM Screenshot 2023-03-08 at 3 13 11 PM

Can you see any warnings on some hidden commits? Also, could you check this:

Screenshot 2023-03-08 at 3 15 28 PM
haimat commented 1 year ago

@shcheklein Sure, in terms of warnings I see only the one we already know:

image

But there is one other error message from one of the first commits to this project on Github:

image

DVC was not fully set-up at that point, so this error is not really an issue. Is this the reason for the warning about missing permissions for the Studio project? How can I get rid of it?

daavoo commented 1 year ago

How can I get rid of it?

@haimat Can you try clicking on Set credentials and following the instructions there? Have you done this before?

haimat commented 1 year ago

@daavoo As I described above, I already set the credentials to the DVC remote, otherwise Studio would not have been able to fetch the file evaluation/results.json. The cloud credentials are already set, please see the original posting of this issue above.

daavoo commented 1 year ago

@haimat apologies if I am missing something.

@daavoo As I described above, I already set the credentials to the DVC remote, otherwise Studio settings would not have been able to fetch the file evaluation/results.json.

Is evaluation/results.json tracked by DVC or does it have cache: false in the dvc.yaml?

The cloud credentials are already set, please see the original posting of this issue above.

I have seen the screenshot of the credentials in the Cloud Credentials section of Studio settings but what I was asking is if you have also Set the Credentials in the Project settings, which is a different page:

https://user-images.githubusercontent.com/12677733/224039784-ae6d2b50-8432-408b-9b8e-1586a94eca7a.mov

haimat commented 1 year ago

@daavoo Here are the answers to your questions:

Is evaluation/results.json tracked by DVC or does it have cache: false in the dvc.yaml?

Yes that file is tracked by DVC, here is the respective line from my dvc.yaml file:

    metrics:
      - evaluation/results.json

I have seen the screenshot of the credentials in the Cloud Credentials section of Studio settings but what I was asking is if you have also Set the Credentials in the Project settings, which is a different page:

Yes, I have set the credentials for this project, as you can see here:

image

What I don't understand: If I would not have set these cloud credentials correctly in the Studio project, how would it have been able to fetch the evaluation/results.json file in the first place?

shcheklein commented 1 year ago

Okay, I think it boils down to Studio errors/warning being too noisy. There should be a X button in the project view, it dismisses the banner and the message on the dashboard page. There is no way to hide it completely at the moment as I am aware. @tapadipti could you please confirm? I know that we have an issue for this internally, can we bump it up a bit if that makes sense.

tapadipti commented 1 year ago

I tried by not providing credentials as well as by providing incorrect credentials. The errors I get are different (No credentials were provided... or Failed to fetch remote data...). But I am able to dismiss the error message in both the cases. Once I dismiss the error from the project table, it only appears when I click on Show warnings (which is expected).

@amritghimire The internal issue to make errors dismissible is done, right?

@haimat When you open the project table, does the error message not have X for dismissing it? Asking this coz I couldn't find a screenshot of the error in the project table in the above conversation.

haimat commented 1 year ago

@tapadipti Yes, I can dismiss my error message in the project table, then it disappears, also from the project overview page:

image

But the "1 issue" message still remains. Now I am wondering - is there still an issue with missing permissions or not - or why does Studio still complain?

amritghimire commented 1 year ago

@amritghimire The internal issue to make errors dismissible is done, right?

Yes it is done IMO. As for this issue @haimat I have realized the root cause of the error here is when we have two remotes, Studio tried to apply credentials for both remotes and the error was collected. If you are able to get the files and everything is working, you can safely ignore the error for now. I will release the fix for this ASAP. Sorry for the inconvenience.

haimat commented 1 year ago

@amritghimire I can confirm that after removing the 2nd remote definition from the DVC config in this repo and forcing a re-parsing of the project in Studio, the error about missing permissions is gone. So yes, it really seems the error message was just because of that 2nd remote, even though Studio was able to fetch the data from the first remote definition already👍

amritghimire commented 1 year ago

Closing this since it is resolved. Thanks @haimat for reporting this.