Skip to content

Upload only changed settings files#1464

Open
sgibler-droid wants to merge 1 commit into
shanalikhan:masterfrom
sgibler-droid:fix-upload-changed-settings
Open

Upload only changed settings files#1464
sgibler-droid wants to merge 1 commit into
shanalikhan:masterfrom
sgibler-droid:fix-upload-changed-settings

Conversation

@sgibler-droid

@sgibler-droid sgibler-droid commented May 22, 2026

Copy link
Copy Markdown

Addresses #508.

Summary

This changes the upload flow so normal uploads send only files that are new or changed, plus the cloudSettings metadata file. Forced uploads keep the previous all-files behavior.

The important safety detail is in UpdateGIST: it now separates the files being added/updated from the complete local file set used for deletion decisions. Without that separation, passing only changed files could accidentally mark unchanged remote gist files for deletion.

Changes

  • Added GistChangeService to detect changed/new setting files and derive the upload payload.
  • Updated upload flow to send the partial payload during normal uploads.
  • Preserved full upload behavior when sync.forceUpload is enabled.
  • Updated summary output to list the actual files uploaded in the run.
  • Added regression tests for changed-file detection, normal partial upload, and forced full upload.

Verification

Ran locally:

npm run compile
npm run tslint-check
npx tsc -p ./
./node_modules/.bin/mocha --recursive "./out/test/service/gistChange/**/*.js"

Results:

compile: pass
lint: pass
typecheck: pass
targeted tests: 3 passing

I also verified the existing full test suite locally with a VS Code runtime shim, since this older test harness imports vscode under Mocha.

@sgibler-droid sgibler-droid force-pushed the fix-upload-changed-settings branch from 2031e8d to e35ef12 Compare May 22, 2026 06:48
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

Successfully merging this pull request may close these issues.

1 participant