Closed ryjohnson09 closed 9 months ago
Wow 😮 not fun at all. I can reproduce this as well. See this pin that belongs to our coworker Julia Roberts:
The user and content caches are once again coming to make our lives miserable, as the local cache is not in sync with the situation on the Connect server. I think the problem is cropping up here:
When we go to rsc_content_find()
, we never look up content live because in the cache, we look up by full name OR just the short name (no username):
So then we can make our pin belonging to Julia Roberts by updating (rsc_content_update()
) at the pin GUID that we just deleted.
This is not a problem in Python pins because in Python a) we don't keep any content or user caches but look everything up every time and b) usernames are required with Connect pins so we don't have to try to keep track of pin short names vs. full names.
I am wondering if we should again consider ripping out those caches altogether as we discussed related to #667. As a reminder, these are not the caches of the pin contents, but the local cache that pins tries to keep for the mapping from user names to user IDs and content names to GUIDs.
Fixed in #793
Now when you try to do something like:
pin_write(board = board, x = cars_lm, name = "posit.fake/cars_lm")
it will error because of the username not existing on the server.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
I believe this is related to the issue we experienced during our Posit Conf workshop. I'm using an eval instance of Posit Team and logged in as user
posit
. When I pin a model to Connect, things work great, and I can run the following code as many times as I want without error:However, if I then delete the pin on Connect and then change the username prefix to something like
posit.fake
, I can run the below code once, and it pins the model to Connect, which is unexpected sinceposit.fake
is not a user on the Connect server:If I try to run the same code a second time, I get this error:
Somehow
pins
allows you to pin to Connect with a random username once, but not again. FWIW, I can't read the fake pin into an R session even if the access controls on Connect are open to anyone: