Conversation
189d679 to
779149a
Compare
a8850ce to
472a084
Compare
472a084 to
12900f3
Compare
| @@ -1391,7 +1402,9 @@ ClassMethod ConstructInvertedDependencyGraph( | |||
| quit | |||
| } | |||
| // Invert dependency graph, subscripts (<module>, <depends on>) | |||
There was a problem hiding this comment.
Nit: Should this comment be deleted as well with the line below/changed to match that there are 4 subscripts that are now being used
isc-eneil
left a comment
There was a problem hiding this comment.
@isc-dchui Looks good! Left a couple of small comments.
| set tSearchCriteria.VersionExpression = tVersion | ||
| set tSearchCriteria.Keywords = tKeywords | ||
| $$$ThrowOnError(##class(%IPM.Repo.Utils).SearchRepositoriesForModule(tSearchCriteria,.tResults)) | ||
| $$$ThrowOnError(##class(%IPM.Repo.Utils).SearchRepositoriesForModule(tSearchCriteria,.tResults,,.tPlatformFiltered)) |
There was a problem hiding this comment.
Nit: call this tPlatformIncompatibleModules or something like that for clarity-- it's not clear from the naming whether this contains modules that are or are not platform compatible
| $$$ThrowOnError(##class(%IPM.Utils.Module).LoadQualifiedReference(tResult, .tParams, , log)) | ||
| } | ||
| } else { | ||
| // The module may have matched but been excluded for being deployed for other platforms |
There was a problem hiding this comment.
The first part of this comment is a bit confusing to me-- can you reword slightly? I suggest "The module may have been found in the configured repository but no platform-compatible version exists."
|
|
||
| /// Load a module fixture from _data, package it, and return the path to the .tgz without | ||
| /// the extension. | ||
| Method LoadAndPackage(moduleFolder As %String = "") As %String |
There was a problem hiding this comment.
Consider moving this into Base.cls, seems broadly applicable (to publishing tests especially)
|
|
||
| /// Returns true if any configured repository offers the named module. Queries the resolution | ||
| /// API directly rather than parsing the terminal output of repo -list-modules. | ||
| ClassMethod ModuleVisibleInList(moduleName As %String) As %Boolean |
There was a problem hiding this comment.
Also could be moved to Base.cls
Description
Platform filtering
Deployed code is built separately per IRIS version, so the registry tag carries a platform suffix (
__2026.1onmodule:1.0.0__2026.1).searchandinstallnow compare that suffix against the current platform version,$system.Version.GetMajor()_"."_GetMinor(), centralized as$$$CurrentPlatformVersioninCommon.inc, and treat a mismatch as unavailable rather than something IPM would try and fail to pull.installfilters at search time in%IPM.Repo.Manager:SearchRepositoriesForModule, which now returns a second list of the deployed results that matched by name/version but not platform. If a module resolves to nothing but that list is non-empty,installreports which platforms the (newest) filtered version actually supports, instead of a bare "not found":searchgained aPlatformscolumn. Without-versionsit drops incompatible versions entirely (ModuleInfo:IsCompatibleWithPlatform); non-deployed modules always pass, since they aren't platform-specific.-versionsis where it gets a bit unusual: ORAS reports oneAllVersionsentry per version regardless of how many platforms that version was built for, so there's no single "platform" to attach to that row.PreferCompatibleVersionsreorders the list so platform-matching versions sort first (newest first within each group) without hiding anything, and per-version platform tagging is skipped for this mode since a single row can't stand in for more than one platform.The dependency install fix (#987)
#987 is "installing dependencies with ORAS fails to get the manifest". Root cause: platform version wasn't threaded through dependency resolution at all.
Module.cls's dependency graph tuples, and the inverted graph built from them, only carried(depth, server, version), so deployed and platform version fell off during flattening and a dependency that needed a platform-tagged pull had nothing to build the tag from. Both graphs now carryDeployedandPlatformVersionthrough to theQualifiedModuleInfohanded toGetModule.Only ORAS hit this as it's the only service that builds its artifact identifier, the OCI tag, from
pModuleReference.PlatformVersionclient-side. Remote resolves platform server-side per request, and Filesystem doesn't model platform at all. Tag construction moved into one place,PackageService:TagForReference, used by bothGetModuleand the previously-separateGetModuleManifest, which built its tag from just the semver with no platform suffix, asking the registry for a tag that was never published.TagForReferencenow throws explicitly if a deployed reference has no resolved platform version, rather than silently building a wrong one.Riding along, since it surfaced while fixing the above:
GetModuleManifestwas returning a raw%Stringwhere%IPM.Repo.IPackageServicepromises a stream; callers calling stream methods on it would fail. Wrapped in%Stream.GlobalCharacter.BuildAllDependencyGraphsused toquitout of the entire multi-repository scan on the first manifest it couldn't fetch. It now records the failure per-module and keeps going, so one bad manifest doesn't blank out dependency resolution for every other repo.Smaller things bundled in
PublishServicenow refuses to publish a deployed module with no platform version, instead of silently tagging it without the platform suffix.Base.cls:%Compile's cycle detection previously carved out an exception forHasDeployedResources, since a deployed module'sDeploy=truechildren are excluded from the compile-flag map and legitimately never finish, but that exception disabled cycle detection for the whole module along with them. It now removes a resource from the "still needs compiling" set as soon as none of its pending work is compilable, so the exception isn't needed. A module with deployed code may now surface a genuine cycle among its non-deployed resources that was previously silent.Document.clsmarksModule.Deployedand saves it as soon as a Studio-project deploy source is detected, because%Compilereopens the module from the database afterward and needs that flag to skip source compilation for it.Testing
New integration tests in
Test.PM.Integration.OrasDeployedPlatformFilteragainst a real ORAS (zot) registry: visible/installable on a matching platform, hidden fromsearchandinstallon a mismatched one, the install error message, and a dependency pinned to a version that only exists for an incompatible platform. Unit tests inTest.PM.Unit.DeployedModuleFiltercoverIsCompatibleWithPlatform/FormatPlatformVersionsdirectly.Checklist
mainbranch rebased or merged.zpm test -only) and integration tests (zpm verify -only) pass.