Skip to content

Commit 8aff3fc

Browse files
Merge branch 'main' into feat/list-installed-sorting
2 parents 3168294 + 3774bcc commit 8aff3fc

6 files changed

Lines changed: 150 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
labels: 'bug'
5+
6+
---
7+
8+
## Describe the bug
9+
A clear and concise description of what the bug is.
10+
11+
## To Reproduce
12+
Steps to reproduce the behavior:
13+
1. Run IPM command '...'
14+
2. Run another IPM command '...'
15+
3. See error
16+
17+
## Expected behavior
18+
A clear and concise description of what you expected to happen.
19+
20+
## Screenshots
21+
If applicable, add screenshots to help explain your problem.
22+
23+
## System information (please complete the following information):
24+
- IPM version: [e.g. 0.10.6]
25+
- IRIS version: [e.g. output of $zversion]
26+
- OS: [e.g. Unix, Windows]
27+
- Docker or local:
28+
29+
## Additional context
30+
Add any other context about the problem here.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
labels: 'enhancement'
5+
6+
---
7+
8+
## Link to the discussion thread
9+
Have you started a discussion thread about this feature request? If not, do that first.
10+
<!-- If you do not yet have approval from IPM's maintainers, add the "Needs Spec" label to this issue. -->
11+
12+
## Describe the problem
13+
A clear and concise description of what the problem is.
14+
15+
## Describe the solution
16+
A clear and concise description of what you want to happen.
17+
18+
## Describe alternatives
19+
A clear and concise description of any alternative solutions or features you've considered.
20+
21+
## Additional context
22+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Description
2+
- Link the issue using the [magic closing words](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
3+
- Provide a summary of the change and how it addresses the issue (e.g. if it is a bug, explain the root cause of the bug and how this change fixes it).
4+
- Include any other necessary context, especially if any section warrants special reviewer attention.
5+
6+
## Testing
7+
How has this change been tested? Have you added unit or integration tests as appropriate?
8+
9+
## Checklist
10+
<!-- You can select a checkbox by changing "[ ]" to "[x]" -->
11+
- [ ] This branch has the latest changes from the `main` branch rebased or merged.
12+
- [ ] Changelog entry added.
13+
- [ ] Unit (`zpm test -only`) and integration tests (`zpm verify -only`) pass.
14+
- [ ] Style matches the style guide in the [contributing guide](https://github.com/intersystems/ipm/blob/main/CONTRIBUTING.md#style-guide).
15+
- [ ] Documentation has been/will be updated
16+
- Source controlled docs, e.g. README.md, should be included in this PR and Wiki changes should be made after this PR is merged (add an extra issue for this if needed)
17+
- [ ] Pull request correctly renders in the "Preview" tab.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
### Fixed
1717
- #1001: The `unmap` and `enable` commands will now only activate CPF merge once after all namespaces have been configured instead after every namespace
1818
- #1052: In a namespace with mapped IPM, the `info` command works again and the intro message displays the IPM version and where its mapped from
19+
- #1102: %IPM.Storage.QualifiedModuleInfo:%New() will now copy over version properties when passed in a resolvedReference
1920

2021
## [0.10.6] - 2026-02-24
2122

src/cls/IPM/Storage/QualifiedModuleInfo.cls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Method %OnNew(
2020
set ..Version = pResolvedReference.Version
2121
set ..Deployed = pResolvedReference.Deployed
2222
set ..PlatformVersions = pResolvedReference.PlatformVersions
23+
set ..VersionString = pResolvedReference.VersionString
24+
set ..AllVersions = pResolvedReference.AllVersions
2325
}
2426
quit $$$OK
2527
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Class Test.PM.Integration.QualifiedModInfo Extends Test.PM.Integration.Base
2+
{
3+
4+
Parameter REPONAME = "simplest-module";
5+
6+
Property RepoPath As %String;
7+
8+
Method OnBeforeAllTests() As %Status
9+
{
10+
// Set up the repo path - use GetModuleDir utility
11+
set ..RepoPath = ..GetModuleDir(..#REPONAME)
12+
13+
// Create filesystem repo pointing to test data
14+
set sc = ##class(%IPM.Main).Shell("repo -n "_..#REPONAME_" -fs -path "_..RepoPath)
15+
do $$$AssertStatusOK(sc,"Created"_..#REPONAME_"repo successfully.")
16+
quit sc
17+
}
18+
19+
Method OnAfterAllTests() As %Status
20+
{
21+
// Remove test repository
22+
set sc = ##class(%IPM.Main).Shell("repo -delete -name "_..#REPONAME)
23+
do $$$AssertStatusOK(sc,"Deleted "_..#REPONAME_"repo successfully.")
24+
quit sc
25+
}
26+
27+
/// SearchRepositoriesForModule should return a module reference
28+
/// will AllVersions set to all three versions of the module when no version specified in search criteria
29+
Method TestSearchModuleNoVersionSpecified()
30+
{
31+
// Set searchCriteria
32+
set searchCriteria = ##class(%IPM.Repo.SearchCriteria).%New()
33+
set searchCriteria.Name = ..#REPONAME
34+
set searchCriteria.AllVersions = 1
35+
36+
// Search repos
37+
set sc = ##class(%IPM.Repo.Utils).SearchRepositoriesForModule(searchCriteria, .resultList)
38+
do $$$AssertStatusOK(sc, "SearchRepositoriesForModule call was successful.")
39+
do $$$AssertTrue((resultList.Count() = 1), "Found module.")
40+
41+
// Get the first module reference
42+
set moduleReference = resultList.GetAt(1)
43+
44+
// Make sure AllVersions is set and contains all three versions of the module
45+
set versionsString = moduleReference.AllVersions
46+
do $$$AssertTrue((versionsString = "3.0.0, 2.0.0, 1.0.0"), "AllVersions contains all versions of the module.")
47+
48+
// Make sure VersionString is set to the latest version of the module
49+
do $$$AssertTrue((moduleReference.VersionString = "3.0.0"), "VersionString is set to the latest version of the module.")
50+
}
51+
52+
/// SearchRepositoriesForModule should return a module reference
53+
/// will AllVersions set to all versions of the module that match the version expression in search criteria
54+
Method TestSearchModuleVersionSpecified()
55+
{
56+
// Set searchCriteria
57+
set searchCriteria = ##class(%IPM.Repo.SearchCriteria).%New()
58+
set searchCriteria.Name = ..#REPONAME
59+
set searchCriteria.AllVersions = 1
60+
set searchCriteria.VersionExpression = "<3.0.0"
61+
62+
// Search repos
63+
set sc = ##class(%IPM.Repo.Utils).SearchRepositoriesForModule(searchCriteria, .resultList)
64+
do $$$AssertStatusOK(sc, "SearchRepositoriesForModule call was successful.")
65+
do $$$AssertTrue((resultList.Count() = 1), "Found module.")
66+
67+
// Get the first module reference
68+
set moduleReference = resultList.GetAt(1)
69+
70+
// Make sure AllVersions is set and contains all three versions of the module
71+
set versionsString = moduleReference.AllVersions
72+
do $$$AssertTrue((versionsString = "2.0.0, 1.0.0"), "AllVersions contains all matching versions of the module.")
73+
74+
// Make sure VersionString is set to specified version of the module
75+
do $$$AssertTrue((moduleReference.VersionString = "2.0.0"), "VersionString is set to the specified version of the module.")
76+
}
77+
78+
}

0 commit comments

Comments
 (0)