Skip to content
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

feat: Prevent unallowed internal/beta module installation #2111

Merged

Conversation

c-pius
Copy link
Contributor

@c-pius c-pius commented Dec 11, 2024

Description

Changes proposed in this pull request:

  • Prevents the installation of beta or internal module for non-beta or non-internal Kymas
    • previously, installation was possible even though the metadata was not synced to the SKR
    • for old module templates we had this covered, but for new module templates this didn't work
  • covered by unit tests
  • covered by integration tests
  • covered by e2e tests

Related issue(s)

@c-pius c-pius requested a review from a team as a code owner December 11, 2024 14:56
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Dec 11, 2024
pkg/templatelookup/regular.go Outdated Show resolved Hide resolved
@c-pius c-pius force-pushed the feat/prevent-unallowed-module-installation branch 4 times, most recently from fa7bdea to f5d68c3 Compare December 12, 2024 15:18
@c-pius c-pius force-pushed the feat/prevent-unallowed-module-installation branch from 7c49ced to d5ea04d Compare December 13, 2024 07:56
@kyma-bot kyma-bot added the lgtm Looks good to me! label Dec 13, 2024
@c-pius c-pius enabled auto-merge (squash) December 13, 2024 08:13
@c-pius c-pius merged commit b5567e4 into kyma-project:main Dec 13, 2024
65 of 66 checks passed
@c-pius c-pius deleted the feat/prevent-unallowed-module-installation branch December 13, 2024 08:27
medmes added a commit to medmes/lifecycle-manager that referenced this pull request Dec 13, 2024
…ct#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go
medmes added a commit to medmes/lifecycle-manager that referenced this pull request Dec 13, 2024
…ct#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go
medmes added a commit to medmes/lifecycle-manager that referenced this pull request Dec 13, 2024
…ct#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go
medmes added a commit to medmes/lifecycle-manager that referenced this pull request Dec 13, 2024
…ct#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go
c-pius pushed a commit to medmes/lifecycle-manager that referenced this pull request Dec 17, 2024
…ct#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go
c-pius pushed a commit to medmes/lifecycle-manager that referenced this pull request Dec 17, 2024
…ct#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go
ruanxin pushed a commit that referenced this pull request Dec 19, 2024
* refactor available module

# Conflicts:
#	pkg/templatelookup/regular.go

* feat: Prevent unallowed internal/beta module installation (#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go

* feat: Prevent unallowed internal/beta module installation (#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go

* add empty spec and status unit test

* rename old function into FetchModuleStatusInfo

* remove import line

* remove aut new line - gci complain

* remove import line

* revert go.mod

* revert go.mod

* rename all into "ModuleInfo" instead

* added method comment

* refactor available module

# Conflicts:
#	pkg/templatelookup/regular.go

* feat: Prevent unallowed internal/beta module installation (#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go

* feat: Prevent unallowed internal/beta module installation (#2111)

* feat: Prevent unallowed internal/beta module installation

* fix linting

* tests to allow ireturn

* refactor mrm fetching

* fix tests

* revert receiver to normal func

* remove unnecessary context

* add missing testcases
# Conflicts:
#	pkg/templatelookup/regular.go

* add empty spec and status unit test

* rename old function into FetchModuleStatusInfo

* remove import line

* remove aut new line - gci complain

* remove import line

* revert go.mod

* revert go.mod

* rename all into "ModuleInfo" instead

* added method comment

* Refactor code and algorithm optimization to O(n+m)

* revert back to Enabled and Managed

* Revert "Refactor code and algorithm optimization to O(n+m)"

This reverts commit 70c1d6b

* delete unused code

* revert to old state

* revert ide new line added

* revert ide new line added

* delete unused code

* Update moduleinfo_test.go

* Revert "Update moduleinfo_test.go"

This reverts commit 621e59b.

* revert ide new line added

* Apply suggestions from code review

Co-authored-by: Christoph Schwägerl <acc.pius@mailbox.org>

* add comment to fetchModuleInfo function

---------

Co-authored-by: Christoph Schwägerl <acc.pius@mailbox.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Module Catalog] Support internal and beta flags for updated module metadata
3 participants