Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use $XDG_CONFIG_HOME in Gitpod for v1.23.2 release, for #6228 [skip ci] #6315

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

stasadev
Copy link
Member

@stasadev stasadev commented Jun 14, 2024

The Issue

How This PR Solves The Issue

Sets XDG_CONFIG_HOME=/workspace/.config inside the Gitpod container.
DDEV global configuration will be stored in a non-volatile location: ${XDG_CONFIG_HOME}/ddev
I added a symlink from ~/.ddev to ${XDG_CONFIG_HOME}/ddev, so it won't break a custom user script (e.g. in hooks) that uses the ~/.ddev location.

Manual Testing Instructions

Open in Gitpod

Click Open in Gitpod, change some global config setting, e.g.:

ddev config global --internet-detection-timeout-ms 4000

Stop the workspace in https://gitpod.io/workspaces, open it again, and confirm that setting is the same:

ddev config global | grep internet-detection-timeout-ms
internet-detection-timeout-ms=4000

Check that ~/.ddev points to ${XDG_CONFIG_HOME}/ddev

ls -la ~ | grep .ddev
lrwxrwxrwx 1 gitpod gitpod   23 Jun 14 11:00 .ddev -> /workspace/.config/ddev

Automated Testing Overview

Release/Deployment Notes

@stasadev stasadev requested a review from a team as a code owner June 14, 2024 10:47
@stasadev stasadev changed the title build: use $XDG_CONFIG_HOME in Gitpod for v1.23.2 release, for #6228 build: use $XDG_CONFIG_HOME in Gitpod for v1.23.2 release, for #6228 [skip ci] Jun 14, 2024
@stasadev stasadev requested a review from shaal June 14, 2024 12:02
@stasadev
Copy link
Member Author

@shaal, please take a look, this is something you will also need to do with DrupalPod.

@rfay
Copy link
Member

rfay commented Jun 14, 2024

Maybe this actually does it for Drupalpod?

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

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

Let's do it!

@stasadev
Copy link
Member Author

Maybe this actually does it for Drupalpod?

As far as I understand, it doesn't use ddev/ddev-gitpod-base:
https://git.drupalcode.org/project/drupalpod/-/blob/main/.gitpod/images/Dockerfile


Pulling it.

@stasadev stasadev merged commit b2a747d into ddev:master Jun 14, 2024
25 checks passed
@stasadev stasadev deleted the 20240614_stasadev_gitpod branch June 14, 2024 12:54
@rfay
Copy link
Member

rfay commented Jun 14, 2024

gitpod /workspace/ddev-gitpod-launcher (main) $ ddev version
 ITEM             VALUE                                    
 DDEV version     v1.23.2                                  
 architecture     amd64                                    
 cgo_enabled      0                                        
 db               ddev/ddev-dbserver-mariadb-10.11:v1.23.2 
 ddev-ssh-agent   ddev/ddev-ssh-agent:v1.23.2              
 docker           24.0.9                                   
 docker-api       1.43                                     
 docker-compose   v2.27.0                                  
 docker-platform  linux-docker                             
 global-ddev-dir  /workspace/.config/ddev                  
 mutagen          0.17.2                                   
 os               linux                                    
 router           ddev/ddev-traefik-router:v1.23.2         
 web              ddev/ddev-webserver:v1.23.2    
gitpod /workspace/ddev-gitpod-launcher (main) $ ls -la /workspace/.config/ddev/
total 56
drwxr-xr-x 6 gitpod gitpod  4096 Jun 14 07:36 .
drwxr-xr-x 3 gitpod gitpod    18 Jun 14 07:34 ..
-rw-r--r-- 1 gitpod gitpod  9499 Jun 14 07:37 .amplitude.cache
drwxr-xr-x 2 gitpod gitpod    28 Jun 14 07:34 bin
drwxr-xr-x 5 gitpod gitpod    61 Jun 14 07:34 commands
-rwxr-xr-x 1 gitpod gitpod   270 Jun 14 07:34 .gitignore
-rw-r--r-- 1 gitpod gitpod  6668 Jun 14 07:36 global_config.yaml
drwxr-xr-x 2 gitpod gitpod    52 Jun 14 07:34 homeadditions
-rw-r--r-- 1 gitpod gitpod   112 Jun 14 07:37 project_list.yaml
-rw-r--r-- 1 gitpod gitpod 10100 Jun 14 07:36 .remote-config
-rw-r--r-- 1 gitpod gitpod   989 Jun 14 07:36 .ssh-auth-compose-full.yaml
-rw-r--r-- 1 gitpod gitpod   812 Jun 14 07:36 .ssh-auth-compose.yaml
drwxr-xr-x 2 gitpod gitpod    24 Jun 14 07:36 .sshimageBuild
-rw------- 1 gitpod gitpod   217 Jun 14 07:36 .state.yaml
-rw-r--r-- 1 gitpod gitpod     0 Jun 14 07:36 .update
gitpod /workspace/ddev-gitpod-launcher (main) $ 

Yay!

Oh, I didn't realize you were doing this?

$ ls -ltd ~/.ddev
lrwxrwxrwx 1 gitpod gitpod 23 Jun 14 05:00 /home/gitpod/.ddev -> /workspace/.config/ddev

@stasadev
Copy link
Member Author

Oh, I didn't realize you were doing this?

Yeah, I thought it would be nice to have a link there to avoid problems if users override something in the global config directory and use the ~/.ddev path.

DDEV itself still uses /workspace/.config/ddev.

@stasadev
Copy link
Member Author

If it's too confusing, we can remove the symlink.

@rfay
Copy link
Member

rfay commented Jun 14, 2024

If it's too confusing, we can remove the symlink.

I don't think anybody will ever know the difference.

@rfay
Copy link
Member

rfay commented Jun 14, 2024

Actually, it will probably help me, because I have ~/.ddev in my fingers. Probably we should have suggested that approach to @danepowell in the first place :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants