Skip to content

[Server] Upgrade to v1beta1 schema. #484

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

Merged
merged 33 commits into from
May 5, 2024

Conversation

MUzairS15
Copy link

Description

This PR fixes #

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

@MUzairS15 MUzairS15 force-pushed the MUzairS15/feat/v1beta1 branch from e4e4670 to 210d03b Compare March 29, 2024 10:19
@leecalcote
Copy link
Member

A month old at this point…. Merge conflicts.

MUzairS15 added 26 commits April 30, 2024 18:10
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
Signed-off-by: MUzairS15 <[email protected]>
@MUzairS15 MUzairS15 force-pushed the MUzairS15/feat/v1beta1 branch from 2f61d4b to 8c73a0d Compare April 30, 2024 12:44
@MUzairS15 MUzairS15 marked this pull request as ready for review April 30, 2024 12:45
@MUzairS15
Copy link
Author

// @leecalcote @Yashsharma1911

@@ -26,7 +28,10 @@ func NewRegoInstance(policyDir string, regManager *registry.RegistryManager) (*R
var store storage.Store

ctx := context.Background()
registeredRelationships, _, _ := regManager.GetEntities(&v1alpha1.RelationshipFilter{})
registeredRelationships, _, _, err := regManager.GetEntities(&v1alpha2.RelationshipFilter{})
Copy link
Member

Choose a reason for hiding this comment

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

This is a concern separate from v1beta1 for Components.

Relationships v1alpha2 was to have been completely previously, right? Should this go forward independently?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, v1alpha2 was completed, but the update was done inplace, i.e. v1alpha1 struct were simply updated in place.

Copy link
Member

Choose a reason for hiding this comment

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

If that work was done well and was completed, would we expect that the only change necessary here be that of a swap from “1 “to “2”?

@@ -51,7 +56,10 @@ func (r *Rego) RegoPolicyHandler(regoQueryString string, designFile []byte) (int
}
regoEngine, err := rego.New(
rego.Query(regoQueryString),
rego.Load([]string{r.policyDir}, nil),
rego.Load([]string{r.policyDir}, func(abspath string, info fs.FileInfo, depth int) bool {
Copy link
Member

Choose a reason for hiding this comment

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

Please add comments here and update Meshery Docs.

Is this loading Rego policy from each individual model?


const SchemaVersion = "core.meshery.io/v1alpha2"

type RelationshipDefinition struct {
Copy link
Member

Choose a reason for hiding this comment

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

Was this generated from schema?


// Component is the structure for the core OAM Application Component
// Component is the structure for the core Application Component
Copy link
Member

Choose a reason for hiding this comment

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

What’s an Application Component?

type Component struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ComponentSpec `json:"spec,omitempty"`
}

// ComponentSpec is the structure for the core OAM Application Component Spec
// ComponentSpec is the structure for the core Application Component Spec
Copy link
Member

Choose a reason for hiding this comment

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

Clean this up, please.

Copy link
Member

Choose a reason for hiding this comment

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

File needs renamed?

What is metav1? Is there a schema for this?

Copy link
Author

Choose a reason for hiding this comment

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

No, the namings have been inspired from k8s packages, v1 in metav1 eflects the schema version.

These are OAM constructs that is most appropriate to address with v1beta1 version of design schema

@@ -46,7 +46,7 @@ func GetKindFromComponent(comp Component) string {
return kind
}

func GetAnnotationsForWorkload(w v1alpha1.ComponentDefinition) map[string]string {
func GetAnnotationsForWorkload(w ComponentDefinition) map[string]string {
Copy link
Member

Choose a reason for hiding this comment

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

What’s a Workload?

@leecalcote
Copy link
Member

leecalcote commented Apr 30, 2024

What considerations need to be made for Meshery server upgrades and for Meshery design compatibility?

Is there a corresponding PR for Meshery extensions (e.g. MeshMap)? @aabidsofi19

@MUzairS15
Copy link
Author

What considerations need to be made for Meshery server upgrades and for Meshery design compatibility?

Is there a corresponding PR for Meshery extensions (e.g. MeshMap)? @aabidsofi19

Yes, there's a PR in meshery-extensions.

@leecalcote leecalcote added kind/enhancement Improvement in current feature area/models labels Apr 30, 2024
@leecalcote leecalcote added this to the v0.8.0 milestone Apr 30, 2024
@MUzairS15 MUzairS15 force-pushed the MUzairS15/feat/v1beta1 branch from 9de637b to 2b55870 Compare May 5, 2024 09:17
@leecalcote leecalcote merged commit 3da3150 into meshery:master May 5, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/models kind/enhancement Improvement in current feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants