Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c63f06a
Initial implementation of sync
isc-dchui Jul 29, 2026
ee7986c
Remove debug code and add better output
isc-dchui Jul 15, 2026
ac87895
Fix some small issues
isc-dchui Jul 15, 2026
670890d
Reorder operations
isc-dchui Jul 15, 2026
baa8b4f
Add more tests
isc-dchui Jul 15, 2026
3c9fd2d
Cut test time by half through native copy of the test fixture
isc-dchui Jul 15, 2026
68ace5b
Fix regression
isc-dchui Jul 15, 2026
58978ca
Improve testing and fix small bug
isc-dchui Jul 15, 2026
05bf4f9
Correctly batch sync tests
isc-dchui Jul 16, 2026
ebb50d6
Refactor
isc-dchui Jul 16, 2026
9964133
Fix minor issues
isc-dchui Jul 16, 2026
8a4d3a1
First part of rework to use BFS
isc-dchui Jul 17, 2026
a14c809
Use BFS directory scanning
isc-dchui Jul 20, 2026
61f3039
Drop the unused mtime/size properties
isc-dchui Jul 20, 2026
8b0969a
Refactor
isc-dchui Jul 20, 2026
fd4eb65
Refactor to improve performance, reduce false positive warnings, and …
isc-dchui Jul 20, 2026
1807234
Handle sync IPM edge case with % classes
isc-dchui Jul 20, 2026
bef9165
Even more speedup
isc-dchui Jul 20, 2026
16fc56a
Fix casing bug and merge walk+hash in Python
isc-dchui Jul 20, 2026
c741873
Fix a few small issues and add some unit tests
isc-dchui Jul 21, 2026
6f43b4e
Only support canonical paths
isc-dchui Jul 22, 2026
6ab5ab7
Hash in parallel
isc-dchui Jul 22, 2026
ae6b5e1
Refactor sync to be an actual lifecycle phase
isc-dchui Jul 22, 2026
17d9636
Fix a few small issues and improve tests
isc-dchui Jul 22, 2026
71cd87c
Better UX for deletes
isc-dchui Jul 22, 2026
901e01f
Remove extra newline and improve module.xml in test
isc-dchui Jul 22, 2026
4455548
Try different container image
isc-dchui Jul 22, 2026
895bd77
Revert image change
isc-dchui Jul 23, 2026
239d819
Try different fix
isc-dchui Jul 23, 2026
6bbdfed
Use the new dockerfile in the main workflow too
isc-dchui Jul 23, 2026
53660a3
Use the old script location for 2025.3
isc-dchui Jul 23, 2026
609a749
Add test case for xml classes
isc-dchui Jul 24, 2026
0f7d14e
Add better dependency handling and test case
isc-dchui Jul 28, 2026
3510452
Add summary section to sync
isc-dchui Jul 28, 2026
8945e2a
Refactor sync into its own file and fix minor issues
isc-dchui Jul 29, 2026
4326b46
Fix bad rebase
isc-dchui Jul 29, 2026
7a97be2
Refactor and minor fix
isc-dchui Jul 29, 2026
072b056
Improve comments
isc-dchui Jul 29, 2026
5322866
Remove redundant code and reorganize
isc-dchui Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- #1178: Add `-password-env` and `-token-env` modifiers to the `repo` command to read the password/token from a named environment variable (secure alternatives to `-password` and `-token`).
- #1117: Add `sync` command for incremental loading of changed files in dev-mode modules. Detects modified files since last sync using SHA-1 hash and recompiles only what is stale. Supports `-delete` for processing removed files and `-test` for running changed test-phase unit tests.

### Changed
- #1186: Change %IPM.Main:ShellScript() to return a status.
Expand Down
2 changes: 1 addition & 1 deletion src/cls/IPM/DataType/PhaseName.cls
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Parameter MAXLEN As INTEGER = 50;
/// If a non-null value is present, then the attribute is restricted to values
/// in the list, and the validation code simply checks to see if the value is in the list.
/// Should be kept in sync with %IPM.Lifecycle.Base.Phases
Parameter VALUELIST = ",Clean,Initialize,Reload,*,Validate,ExportData,Compile,Activate,Document,MakeDeployed,Test,Package,Verify,Publish,Configure,Unconfigure,ApplyUpdateSteps";
Parameter VALUELIST = ",Clean,Initialize,Reload,*,Validate,ExportData,Compile,Activate,Document,MakeDeployed,Test,Package,Verify,Publish,Configure,Unconfigure,ApplyUpdateSteps,Sync";

}
79 changes: 79 additions & 0 deletions src/cls/IPM/General/Sync/Output.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/// Sync output that always writes to the current device, regardless of whether a whole-namespace
/// sync (`sync` with no module named) is in progress. Contrast %IPM.General.Sync.Summary, whose
/// recorders are gated on such a run being active.
Class %IPM.General.Sync.Output [ Abstract ]
{

/// Write a module-scoped status line: "[moduleName] text". Single place for the bracketed
/// per-module prefix so the many status writes in the pipeline stay consistent.
ClassMethod Log(moduleName As %String, text As %String) [ Internal ]
{
write !, "[", moduleName, "] ", text
}

/// Count the top-level subscripts of an array. Used for the verbose "N file(s)"/"N path(s)"
/// status lines, which report only top-level keys and ignore any child nodes.
ClassMethod CountNodes(ByRef array) As %Integer [ Internal ]
{
set count = 0
set key = ""
for {
set key = $order(array(key))
quit:key=""
set count = count + 1
}
quit count
}

/// Shared closing output for both pipeline exit paths (nothing-to-sync and full sync): the
/// module.xml reload warning, the unsupported-resource note, and the total-elapsed line. Kept in
/// one place so the two branches can't drift apart.
ClassMethod PrintTail(
moduleName As %String,
verbose As %Boolean,
moduleXmlChanged As %Boolean,
syncStart As %Numeric,
ByRef unsupportedResources) [ Internal ]
{
if moduleXmlChanged {
do ..PrintModuleXmlWarning(moduleName)
}
if $data(unsupportedResources) {
do ..PrintUnsupportedNote(moduleName, verbose, .unsupportedResources)
}
do ..Log(moduleName, "Sync done in "_$fnumber($zhorolog - syncStart, "", 2)_"s")
}

ClassMethod PrintModuleXmlWarning(moduleName As %String) [ Internal ]
{
write !
write !, "Warning: module.xml changed and was reloaded."
write !, " Resources may have been added/removed. Run `reload ", moduleName, "` to fully apply"
write !, " manifest-level changes (mappings, dependencies, defaults)."
do ##class(%IPM.General.Sync.Summary).AddWarning(moduleName, "module.xml changed and was reloaded; run `reload " _ moduleName _ "` to fully apply.")
}

ClassMethod PrintUnsupportedNote(moduleName As %String, verbose As %Boolean, ByRef unsupportedResources) [ Internal ]
{
set count = 0
set names = ""
set resName = ""
for {
set resName = $order(unsupportedResources(resName))
quit:resName=""
set count = count + 1
if count <= 3 {
set names = names _ $select(names="":"", 1:", ") _ resName
}
}
if count > 3 {
set names = names _ ", ... (" _ (count - 3) _ " more)"
}
if verbose {
do ..Log(moduleName, count_" resource(s) skipped (no sync support): "_names)
write !, " Use `reload ", moduleName, "` to apply changes to those resources."
}
do ##class(%IPM.General.Sync.Summary).AddWarning(moduleName, count _ " resource(s) skipped (no sync support): " _ names _ ".")
}

}
Loading
Loading