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

Skip dynamic component generation if the version is available statically #59

Merged
merged 3 commits into from
Nov 8, 2021
Merged

Conversation

Revolyssup
Copy link
Contributor

@Revolyssup Revolyssup commented Nov 6, 2021

Signed-off-by: ashish ashishjaitiwari15112000@gmail.com

Description

Currenly dynamic component generation takes place , no matter what. If we already have components for that version statically then we can skip that operation as it is costly(because it executes kubeopenapi-jsonschema binary)

Notes for Reviewers
Since we are making use of the versioning, the directory in which all definitions and schemas reside should be named properly. The name will be the version.

Signed commits

  • Yes, I signed my commits.

this

Signed-off-by: ashish <ashishjaitiwari15112000@gmail.com>
@Revolyssup
Copy link
Contributor Author

Revolyssup commented Nov 6, 2021

@Utkarsh-pro Before you point out that why are we loading in the init function of that package. That package is imported here only for component registration so we are sure that if this package gets imported, comp reg is gonna take place. So I see no harm. Your insights would be valuable.
If you see any problem in this approach, I will abort it. Otherwise, will make same change across all adapters.
// @leecalcote

Signed-off-by: ashish <ashishjaitiwari15112000@gmail.com>
Signed-off-by: ashish <ashishjaitiwari15112000@gmail.com>
Copy link
Contributor

@tangledbytes tangledbytes left a comment

Choose a reason for hiding this comment

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

LGTM

@tangledbytes
Copy link
Contributor

@Utkarsh-pro Before you point out that why are we loading in the init function of that package. That package is imported here only for component registration so we are sure that if this package gets imported, comp reg is gonna take place. So I see no harm. Your insights would be valuable. If you see any problem in this approach, I will abort it. Otherwise, will make same change across all adapters. // @leecalcote

@Revolyssup, this looks good. I think we have seen a similar pattern in kubectl auth plugins source code (I may be wrong here), right?

@tangledbytes tangledbytes merged commit a0b6b31 into meshery:master Nov 8, 2021
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