Cross-contamination between project sandboxes. How do I fix this?

125 views
Skip to first unread message

brenton strine

unread,
Aug 7, 2020, 3:03:03 PM8/7/20
to Google App Engine
I have several projects, let's call them projects A, B and C. 

I cloned a git repo into project A, created several files, and set up a node server. Then I decided I wanted to start over so I deleted project A and waited for it to be completely deleted. 

Now, when I connect to the console with projects B or project C, I can see the files that were created in project A. 

Files that I create in projects B and C are visible in each other as well. 

In project B:
>touch file-b.txt
>ls
file
-b.txt


Then in project C:
>ls
file
-b.txt
>touch file-c.txt
>ls
file
-b.txt  file-c.txt


Then in project B again:
>ls
file
-b.txt  file-c.txt


I thought that each project was sandboxed and totally separate. With that understanding, while I was in project A, I was doing a lot of testing and experimenting and wrecked things, feeling safe that I could just delete the project and start a new one. But now I'm seeing that the changes are following me to the other projects. 



Mary (Google Cloud Support)

unread,
Aug 7, 2020, 8:31:51 PM8/7/20
to Google App Engine
Hi Brenton, 

To provide you with an accurate response about your issue, we need some further information. When the files for project A,B,C are you in Cloud Shell within the Console UI? How are you switching between projects via CLI or through different web browser tabs each logged into their own project?

brenton strine

unread,
Aug 10, 2020, 8:52:44 AM8/10/20
to Google App Engine
Ok, I am trying to answer your questions more specifically. My previous answer was off the top of my head because I was on my phone. Now I've logged in and tried to understand exactly what you're asking.


>When the files for project A,B,C are you in Cloud Shell within the Console UI?

I am not sure what is meant by "Console UI". This is through the website at https://console.cloud.google.com/ , is that what is meant by "Console UI?"  At any rate, I'm seeing the files in the cloud shell terminal. They also appear in the Cloud Shell Editor. 


> How are you switching between projects via CLI or through different web browser tabs each logged into their own project?

There is a dropdown on the top header which opens a modal titled "Select a project". So switching projects this way and then clicking the "Activate Cloud Shell" is the primary way I am switching between projects. I have found I can also switch from within the cloud share terminal by clicking the dropdown arrow near the new tab icon (the big plus). I also have tested this switching through the command gcloud config set project B 

The result is the same for all. 

brenton strine

unread,
Aug 10, 2020, 8:52:44 AM8/10/20
to Google App Engine
I have switched using various methods. The command prompt shows the project name so I can verify that I am in the project I think I am.

I'm not sure what you mean by cloud shell vs console UI. The files are always there in all views no matter what I do or how I look at them. They're never not there. I'm willing to try to find some edge case view where they aren't there but I think the major problem is the files cross contaminating at all.

brenton strine

unread,
Aug 10, 2020, 8:52:50 AM8/10/20
to Google App Engine
Screen Shot 2020-08-07 at 10.30.33 PM.png

On Friday, August 7, 2020 at 8:31:51 PM UTC-4 Mary (Google Cloud Support) wrote:

brenton strine

unread,
Aug 14, 2020, 10:28:08 AM8/14/20
to Google App Engine
Hello. I am new here so i'm not sure what the pace is for responses. I just wanted to check in and see if anyone has read this and if you have any ideas. Cheers.

Kevin Hirsh

unread,
Aug 15, 2020, 8:42:52 PM8/15/20
to Google App Engine
We understand that you have found that the Cloud Shell storage persists across projects. This behavior is indeed intended, as the Cloud Shell persistent disk storage is not provisioned on a per-project basis, it is rather provisioned on a per user basis. You will notice that you are able to list the files on the home directory without the need to set the project-id, as setting the project-id identifies the particular project the gcloud SDK will operate on whereas "ls" is a linux command which interacts with the linux based GCE instance provisioned for the Cloud Shell command line. 

If you would like to delete the cloned github repository in this case from your Cloud Shell home directory, we would suggest deleting the repository using the rm -r command[3].

We would also recommend using Stack Overflow for technical questions as the question answer format used for this support platform is indeed more suitable and would allow for a likely more efficient means of support in this case.

Reply all
Reply to author
Forward
0 new messages