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

Extension does not sync anything. #77

Open
bitfl0wer opened this issue Jan 26, 2025 · 11 comments
Open

Extension does not sync anything. #77

bitfl0wer opened this issue Jan 26, 2025 · 11 comments

Comments

@bitfl0wer
Copy link

bitfl0wer commented Jan 26, 2025

Platform: Linux x86-64, Fedora Workstation 41
Editor: VSCodium 1.96.4
Extension Version: 0.16.0

The extension does not sync anything.

/home/$user/.config/VSCodium/User/settings.json:

{
	"window.titleBarStyle": "custom",
	"window.customTitleBarVisibility": "auto",
	"window.newWindowProfile": "flori",
	"syncSettings.resources": ["settings", "extensions", "keybindings"],
	"syncSettings.gitInitMessage": "profile({{profile}}@{{hostname}}): init -- {{now|date:iso}}",
	"syncSettings.gitUpdateMessage": "profile({{profile}}@{{hostname}}): update -- {{now|date:iso}}",
	"syncSettings.keybindingsPerPlatform": false
}

Sync Settings settings.yml:

hostname: "starforge"
profile: flori
repository:
  type: git
  url: https://github.com/bitfl0wer/vscodium-config.git

Description: When specifying "syncSettings.resources", the extension does not sync anything. When this setting is not present, the extension does sync some things; however, it does not sync all the things I'd like it to. It seems like setting the syncSettings.resources parameters breaks syncing. Below are log outputs of trying to sync (upload) without this parameter present, then trying to sync (upload) after setting the parameter:

[info] serialize to: /home/star/.config/VSCodium/User/globalStorage/zokugun.sync-settings/repository
[info] serialize extensions
[info] serialize snippets
[info] serialize UI state
[info] serialize keybindings
[info] serialize settings
[info] serialize done
[info] commit: profile(flori@starforge): update -- 2025-01-26T11:39:43.346Z
[info] push to remote
[info] push done
---vvv-parameter present---
[info] serialize to: /home/star/.config/VSCodium/User/globalStorage/zokugun.sync-settings/repository
[info] serialize done | < nothing was serialized?
[info] commit: profile(flori@starforge): update -- 2025-01-26T11:44:04.025Z
[info] push to remote
[info] push done

After syncing with the parameter present, this is what the repository looks like:

GitHub repository in folder profiles/flori showing files .gitkeep (0 bytes) and .sync.yml, but no actual synced files

@daiyam
Copy link
Member

daiyam commented Jan 26, 2025

I've just retested. it's working on my machine.

  • After an upload, can you try the command > Sync Settings: Reveal the profile in the file explorer.
    You should see a data directory
  • git push would need to work with https://github.com/bitfl0wer/vscodium-config.git.
    I would recommend to use the ssh url [email protected]:bitfl0wer/vscodium-settings.git

@bitfl0wer
Copy link
Author

bitfl0wer commented Jan 26, 2025

Thank you for your quick reply!

After an upload, can you try the command > Sync Settings: Reveal the profile in the file explorer.
You should see a data directory

A recursive tree of that path shows:

tree -aR
.
├── data
├── .gitkeep
└── .sync.yml

2 directories, 2 files

git push would need to work with https://github.com/bitfl0wer/vscodium-config.git.

It does work, even using HTTPS instead of SSH. As mentioned, syncing of some resources works, if the parameter is not present. The extension can push to the GitHub repository just fine.

@daiyam
Copy link
Member

daiyam commented Jan 26, 2025

I did test with "syncSettings.resources": ["settings", "extensions", "keybindings"],

I don't understand why you have the issue. I copy pasted your settings...
I will add a log for the read syncSettings.resources to verify its value is correctly read.

@gaotako
Copy link

gaotako commented Feb 12, 2025

I have a similar issue of incomplete syncing when using VSCode server on an AWS SageMaker instance (For VS Code on local machine, it is fine), here is the editor version info:

code-server: v4.16.1
Code: 1.80.2
Commit: 2ccd690cbff1569e4a83d7c43d45101f817401dc
Date: 2023-07-31T17:15:21.760Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

The issue is that for either git remote (SSH) or git local sync, only extensions are synced, for settings and other staff, they are not synced regardless of syncSettings.resources, here is a local sync test config:

hostname: ""
profile: main
#:||repository:
#:||    type: git
#:||    # if on developement instance, use SSH (the first) instead of HTTPS (the second, default)
#:||    url: [email protected]:gaotako/CodeServerSyncSettings.git
#:||    # url: https://github.com/gaotako/CodeServerSyncSettings.git
#:||    branch: main
repository:
    type: git
    path: ~/SageMaker/RuntimeCommand/src/CodeServerSyncSettings
    branch: main

And here is the directory tree after upload:

$ ls -R ~/SageMaker/RuntimeCommand/src/CodeServerSyncSettings
/home/ec2-user/SageMaker/RuntimeCommand/src/CodeServerSyncSettings:
profiles

/home/ec2-user/SageMaker/RuntimeCommand/src/CodeServerSyncSettings/profiles:
main

/home/ec2-user/SageMaker/RuntimeCommand/src/CodeServerSyncSettings/profiles/main:
data

/home/ec2-user/SageMaker/RuntimeCommand/src/CodeServerSyncSettings/profiles/main/data:
extensions.yml

P.S. On remote instance, I use my customized XDG_HOME settings, thus some files are not in their default location, not sure if this will have any influence.

@daiyam
Copy link
Member

daiyam commented Feb 12, 2025

@gaotako As you have described, for remote/server, only the extensions are synced. This is the expected behavior since keybindings, settings, snippets,uiState are only relevant for the client app.
The Web Remote isn't yet supported.

@bitfl0wer
Copy link
Author

As I am now getting notified of this again;
Is there anything you'd like me to do? Do you require more information or anything? Happy to provide it, if so :)

@daiyam
Copy link
Member

daiyam commented Feb 12, 2025

@bitfl0wer I've added a log, so you should be able to see the list of resources to be serialized:

---vvv-parameter present---
[info] serialize to: /home/star/.config/VSCodium/User/globalStorage/zokugun.sync-settings/repository
[info] resources: | < list of resources to serialize

Thx

@bitfl0wer
Copy link
Author

Output:

[info] repository: {"type":"git","url":"https://github.com/bitfl0wer/vscodium-config.git"}
[info] profile: flori
[info] hostname: starforge
[info] serialize to: /home/star/.config/VSCodium/User/globalStorage/zokugun.sync-settings/repository
[info] resources: settings, extensions, keybindings
[info] serialize extensions
[info] serialize keybindings
[info] serialize settings
[info] serialize done
[info] commit: profile(flori@starforge): update -- 2025-02-13T13:15:10.426Z
[info] push to remote
[info] push done

data dir:

tree -aR
.
├── data
│   ├── extensions.yml
│   └── settings.json
├── .gitkeep
├── profile.yml
└── .sync.yml

2 directories, 5 files

This looks better than before. However: My user settings and keybindings are still missing somehow...

@daiyam
Copy link
Member

daiyam commented Feb 13, 2025

@bitfl0wer The user settings are there: settings.json
Do you have any custom keybindings?

@daiyam
Copy link
Member

daiyam commented Feb 13, 2025

@gaotako If you want to further discuss your problem, can you open a new issue (since it's different from this one). Thx

@bitfl0wer
Copy link
Author

I think it's better now. Thank you!

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

No branches or pull requests

3 participants