Skip to content

Alpha module list#2884

Open
anoipm wants to merge 44 commits into
kyma-project:mainfrom
anoipm:alpha-module-list
Open

Alpha module list#2884
anoipm wants to merge 44 commits into
kyma-project:mainfrom
anoipm:alpha-module-list

Conversation

@anoipm
Copy link
Copy Markdown
Contributor

@anoipm anoipm commented Apr 15, 2026

Description

Changes proposed in this pull request:

  • add (alpha/v2) module list command (without community modules - will be added in a follow-up PR),
  • improve json/yaml output:
    • separate version and channel into distinct fields instead of concatenating them,
    • correct managed type - managed is a boolean instead of a string.

Related issue(s)
See also:

@anoipm anoipm added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 15, 2026
@anoipm anoipm requested a review from a team as a code owner April 15, 2026 18:49
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 15, 2026

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify / standards (pull_request_target) action.

@anoipm anoipm requested a review from a team as a code owner April 15, 2026 19:07
Comment thread internal/modulesv2/repository/installedmodules.go Outdated
Comment thread internal/modulesv2/repository/moduleinstallationstate.go Outdated
Comment thread internal/modulesv2/list.go Outdated
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@anoipm anoipm force-pushed the alpha-module-list branch from 7e24e9e to f8c347b Compare May 14, 2026 20:57
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

Comment thread internal/modulesv2/repository/installedmodules.go Outdated
@anoipm anoipm removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 18, 2026
@musztardem musztardem self-assigned this May 18, 2026
Comment thread internal/modulesv2/list.go Outdated
return &moduleInstallationStateRepository{kubeClient: kubeClient}
}

func (r *moduleInstallationStateRepository) GetInstallationState(ctx context.Context, module entities.ModuleInstallation) (string, error) {
Copy link
Copy Markdown
Contributor

@musztardem musztardem May 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is implementation of a separate repository for a single string value that I believe should live in the ModuleInstallation as the installation state belongs to the moduleInstallation. I see however that there's lot of extraction logic that might bloat the original repository.

I think we could introduce some kind of extractors or converters package that could live in the repository package that could have specialized classes responsible for such data transformations

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored. Extracted extractStateFromObject as a function responsible for state interpretation.

@musztardem
Copy link
Copy Markdown
Contributor

musztardem commented May 18, 2026

There's some discrepancy in how module list and alpha module list work for managed modules, there's output from my console:

$ ./bin/kyma alpha module list
MODULE                  VERSION               CR POLICY         MANAGED   MODULE STATUS   INSTALLATION STATUS
api-gateway             3.6.2(regular)        CreateAndDelete   true      Ready           Ready
application-connector   1.3.1(fast)           CreateAndDelete   true      Ready           Ready
btp-operator            1.3.2(regular)        CreateAndDelete   true      Ready           Ready
cap-operator            0.28.0(fast)          CreateAndDelete   true      Ready           Ready
cfapi                   0.4.0(experimental)   CreateAndDelete   true      Ready           Ready
cloud-manager           1.7.1(fast)           CreateAndDelete   true      Ready           Ready
connectivity-proxy      1.2.2(fast)           CreateAndDelete   true      Ready           Ready
eventing                1.5.3(fast)           CreateAndDelete   true      Deleting        Deleting
istio                   1.26.7(regular)       CreateAndDelete   true      Ready           Ready
keda                    1.10.1(fast)          CreateAndDelete   true      Ready           Ready
nats                    1.5.2(fast)           CreateAndDelete   true      Deleting        Deleting
serverless              1.12.0(fast)          CreateAndDelete   true      Ready           Ready
telemetry               1.63.3(fast)          CreateAndDelete   true      Ready           Ready
transparent-proxy       1.9.5(fast)           CreateAndDelete   true      Ready           Ready
ztis-agent              0.28.0(fast)          CreateAndDelete   true      Ready           Ready
[12:03:07] [cost 0.409s] ./bin/kyma alpha module list

$ ./bin/kyma module list
2026-05-18T10:05:11.442219Z	info	klog	Waited before sending request	delay=1.1237515s reason=client-side throttling, not priority and fairness verb=GET URL=https://api.ee0bdf1.stage.kyma.ondemand.com/apis/operator.kyma-project.io/v1beta2/namespaces/kyma-system/moduletemplates/istio-1.26.7
NAME                    VERSION               CR POLICY         MANAGED   MODULE STATUS   INSTALLATION STATUS
api-gateway             3.6.2(regular)        CreateAndDelete   true      Ready           Ready
application-connector   1.3.1(fast)           CreateAndDelete   true      Ready           Ready
btp-operator            1.3.2(regular)        CreateAndDelete   true      Ready           Ready
cap-operator            0.28.0(fast)          CreateAndDelete   true      Ready           Ready
cfapi                   0.4.0(experimental)   CreateAndDelete   true      Ready           Ready
cloud-manager           1.7.1(fast)           CreateAndDelete   true      Ready           Ready
connectivity-proxy      1.2.2(fast)           CreateAndDelete   true      Ready           Ready
eventing                1.5.3(fast)           CreateAndDelete   true                      Deleting
istio                   1.26.7(regular)       CreateAndDelete   true      Warning         Ready
keda                    1.10.1(fast)          CreateAndDelete   true      Warning         Ready
nats                    1.5.2(fast)           CreateAndDelete   true      Warning         Deleting
serverless              1.12.0(fast)          CreateAndDelete   true      Ready           Ready
telemetry               1.63.3(fast)          CreateAndDelete   true      Ready           Ready
transparent-proxy       1.9.5(fast)           CreateAndDelete   true      Ready           Ready
ztis-agent              0.28.0(fast)          CreateAndDelete   true      Error           Ready
docker-registry         0.13.0                N/A               false     Ready           Ready
registry-proxy          0.14.0                N/A               false     Ready           Ready
[12:05:16] [cost 7.593s] ./bin/kyma module list

@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@anoipm anoipm assigned anoipm and unassigned musztardem May 20, 2026
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

2 similar comments
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@anoipm anoipm force-pushed the alpha-module-list branch from 161df3f to 3569a13 Compare May 28, 2026 18:28
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

1 similar comment
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@anoipm anoipm assigned musztardem and unassigned anoipm May 28, 2026
@github-actions
Copy link
Copy Markdown

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)

type ModuleCRStateRepository interface {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this class and moduleInstallationState repositories should be a part of ModuleInstallationRepository because they're technically not repositories - repositories are tightly related to some entity and manage their lifecycles:

  • ModuleInstallationEntity is managed by ModuleInstallationRepository - get/list/create/update/delete

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. ModuleCRStateRepository and ModuleInstallationStateRepository are now internal implementation details of ModuleInstallationsRepository

"github.com/kyma-project/cli.v3/internal/modulesv2/entities"
)

type InstalledModulesRepository interface {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the repository naming should reflect an association with the entity it's related to, so I would see it as ModuleInstallationsRepository

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — renamed to ModuleInstallationsRepository.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

✅ Proposed changes verification passed

This pull request comes with up-to-date documentation and no illegal standard output usages.

Find more detailed information in the verify-pr-code / standards action.

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.

2 participants