-
Notifications
You must be signed in to change notification settings - Fork 28
Database Packaging #1121
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
base: main
Are you sure you want to change the base?
Database Packaging #1121
Changes from all commits
2b9a128
4ea4593
a8ee336
19d9bd2
dc9e7e6
f428f77
04a04ae
6505e8a
019d82d
4a9462c
ac9ff24
0dfd807
2ee14f6
bc71741
18ff483
bcb541a
7d83e90
32e680e
792ae11
b231290
07f8a93
d0d2cce
07617be
23662d7
cdb392d
0862f57
853eb75
a8733ae
d609c07
2ee73a6
27f185a
6a07664
e654cba
1044121
c13492b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1404,9 +1404,11 @@ Method ExportPythonDependencies( | |
| $$$ThrowOnError(..InstallOrDownloadPythonRequirements(root, .pParams, 1)) | ||
| set wheelsDir = ##class(%File).NormalizeDirectory("wheels", module.Root) | ||
| if '##class(%File).DirectoryExists(wheelsDir) { | ||
| // ExportPythonDependencies called on base module + dependencies so don't want to error if one of | ||
| // the modules doesn't have a wheels directory since that might actually be the case for the module | ||
| write !, "WARNING: No wheels directory for this module: "_wheelsDir_" not found" | ||
| // A module without Python requirements legitimately has no wheels directory, so this is only worth warning about | ||
| // when requirements.txt exists but the download produced nothing. | ||
| if ##class(%File).Exists(##class(%File).NormalizeFilename("requirements.txt", root)) { | ||
| write !, "WARNING: No wheels directory for this module: "_wheelsDir_" not found" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in the case that
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There might be other reasons why wheelsDir doesn't exist so I figured I'd leave that warn instead of throw pattern alone |
||
| } | ||
| quit | ||
| } | ||
| set stmt = ##class(%SQL.Statement).%New() | ||
|
|
@@ -1620,7 +1622,13 @@ Method %Publish(ByRef pParams) As %Status | |
| quit | ||
| } | ||
| set tModule.VersionString = ..Module.VersionString | ||
| if (..Module.Deployed) { | ||
| // Publish type comes from the running lifecycle, not the module's Packaging property. | ||
| // ..Module.Packaging records how the module was loaded (may be stale); the PACKAGING | ||
| // parameter is fixed per lifecycle class and reflects how it's being published now. | ||
| if ($parameter($this, "PACKAGING") = "database") { | ||
| set tModule.IPMPackaging = "database" | ||
| set tModule.PlatformVersion = $system.Version.GetMajor() _ "." _ $system.Version.GetMinor() | ||
| } elseif (..Module.Deployed) { | ||
| set tModule.Deployed = 1 | ||
| if $isobject(..Module.SystemRequirements) { | ||
| set tModule.PlatformVersion = ..Module.SystemRequirements.VersionString | ||
|
|
@@ -2127,6 +2135,9 @@ Method ExportSingleModule( | |
| } | ||
| } | ||
|
|
||
| /// Returns the lifecycle class whose Final PACKAGING parameter equals pPackaging. | ||
| /// pBaseClass is "" when no class claims that value. This is a valid outcome, since packaging values are | ||
| /// not constrained to those with a dedicated lifecycle class. Callers decide the fallback. | ||
| ClassMethod GetBaseClassForPackaging( | ||
| pPackaging As %String, | ||
| Output pBaseClass As %Dictionary.Classname) As %Status [ Final ] | ||
|
|
@@ -2145,8 +2156,6 @@ ClassMethod GetBaseClassForPackaging( | |
| set pBaseClass = tRes.%Get("BaseClass") | ||
| } | ||
| $$$ThrowOnError(tSC) | ||
|
|
||
| // TODO: Error if no results? | ||
| } catch e { | ||
| set pBaseClass = "" | ||
| set tSC = e.AsStatus() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.