Skip to content

Conversation

HeerakKashyap
Copy link

@HeerakKashyap HeerakKashyap commented Jul 28, 2025

This PR adds support for ConnectionDefinition entities in the MeshKit registration system. Previously, when importing models that contained connection definitions, these entities were being silently ignored because the registration pipeline didn't know how to handle them.

What was broken

The main issue was in utils/utils.go - the FindEntityType function was missing a case for connections.meshery.io, so it couldn't identify connection definition files. This meant connection definitions were being skipped during model import.

What I fixed

  • Added the missing connections.meshery.io case to FindEntityType in utils/utils.go
  • Made getEntity public as GetEntity in models/registration/utils.go so it can be tested
  • Updated PackagingUnit in models/registration/register.go to include connections and handle their registration
  • Added connection file processing in models/registration/dir.go
  • Added connection support to the database schema in models/meshmodel/registry/registry.go
  • Created the ConnectionDefinition type in models/meshmodel/core/v1beta1/connection.go
  • Added ConnectionSchemaVersion constant in the corev1beta1 package

Based on reviewer feedback, I've made the following adjustments:

  • Reverted GetEntity back to unexported getEntity since it's not used outside the package
  • Moved ConnectionSchemaVersion constant to the corev1beta1 package
  • Removed unnecessary changes to OPA and OCI files that were unrelated to the ConnectionDefinition task
  • Kept only the essential changes needed for ConnectionDefinition support

Testing

I tested this with a sample ConnectionDefinition JSON file. The pipeline now works correctly:

  • FindEntityType properly identifies connection definition files
  • getEntity parses them into the right type
  • The registration process handles them end-to-end

Before this fix, connection definitions were just being ignored. Now the registry can properly handle all entity types: components, relationships, and connections.

fixes- #762


Notes for Reviewers

- Add connections.meshery.io schema version support in FindEntityType
- Make getEntity function public as GetEntity for testing
- Update PackagingUnit to include ConnectionDefinition slice
- Add ConnectionDefinition handling in processDir function
- Extend register function to process and register connections
- Add ConnectionDefinition to RegistryManager AutoMigrate
- Fix import aliases and type references in registry.go

This enables the model import pipeline to correctly process and register
ConnectionDefinition entities alongside components and relationships.

Signed-off-by: HeerakKashyap <[email protected]>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @HeerakKashyap, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical gap in the MeshModel registry by implementing comprehensive support for ConnectionDefinition entities. It integrates these new entities into the existing registration pipeline, from file processing and parsing to database persistence, ensuring that the registry can now fully manage all defined MeshModel entity types. Additionally, it introduces several utility functions to enhance the robustness of file and I/O operations across the codebase.

Highlights

  • Full Support for Connection Definitions: This pull request enables the Meshery MeshModel registry to correctly identify, parse, and register ConnectionDefinition entities, which were previously ignored during model import. This completes the support for all MeshModel entity types (components, relationships, and connections).
  • Enhanced Entity Parsing and Identification: The utility functions responsible for determining entity types and parsing YAML/JSON content have been updated to recognize ConnectionDefinition schemas, ensuring they are correctly processed within the system.
  • Improved File Handling Robustness: Several file and I/O operations across the codebase have been made more robust by introducing SafeClose and SafeRemoveAll helper functions, preventing potential resource leaks or unhandled errors and promoting safer resource management.
  • Database Schema Update: The underlying database schema has been updated to include ConnectionDefinition entities, allowing them to be persisted and managed within the MeshModel registry.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully adds support for ConnectionDefinition entities to the model registration process. The changes are logical and cover database migration, entity discovery, and registration logic.

I've identified a few areas for improvement:

  • A high-severity issue regarding the use of a loop variable's address, which is a dangerous pattern in Go.
  • Several medium-severity issues related to code clarity and maintainability, such as redundant code in an error path, use of hardcoded strings instead of constants, a redundant comment, and a potentially unintentional change that reduces the clarity of truncated error messages.

Applying these suggestions will improve the robustness and maintainability of the code.

Comment on lines 211 to 216
conn, err := utils.Cast[*corev1beta1.ConnectionDefinition](e)
if err != nil {
connectionName := ""
if conn != nil {
connectionName = conn.Kind
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The if conn != nil check is redundant. When utils.Cast returns an error, the conn variable will be its zero value, which is nil for a pointer type. Therefore, this condition will never be true and connectionName will always be an empty string inside this error handling block.

@vr-varad
Copy link
Member

vr-varad commented Aug 5, 2025

Thank you for your contribution!!
If this work is complete, this is a good item to add to the weekly Meshery Development meeting agenda. You can add this item in the doc, attend, and present it. Meeting details at https://meet.layer5.io/meshery.

@HeerakKashyap
Copy link
Author

Thank you for your contribution!! If this work is complete, this is a good item to add to the weekly Meshery Development meeting agenda. You can add this item in the doc, attend, and present it. Meeting details at https://meet.layer5.io/meshery.

Yeah sure, I guess there are some small errors which needs to be solved, if fixed timely - I'll try to present it in development meeting, thankss @vr-varad

@vr-varad
Copy link
Member

Thank you @HeerakKashyap for your contribution!!
If this work is complete, this is a good item to add to the weekly Meshery Development meeting agenda. You can add this item in the doc, attend, and present it. Meeting details at https://meet.layer5.io/meshery.

@HeerakKashyap
Copy link
Author

Thank you @HeerakKashyap for your contribution!! If this work is complete, this is a good item to add to the weekly Meshery Development meeting agenda. You can add this item in the doc, attend, and present it. Meeting details at https://meet.layer5.io/meshery.

Thank you @HeerakKashyap for your contribution!! If this work is complete, this is a good item to add to the weekly Meshery Development meeting agenda. You can add this item in the doc, attend, and present it. Meeting details at https://meet.layer5.io/meshery.

Yeah I'll let u know as soon as I am done with solving the bugs

@HeerakKashyap HeerakKashyap force-pushed the feat/connection-definition-final branch from 9fee88d to 3f08e48 Compare August 14, 2025 19:56
…x code review issues

- Add missing ConnectionDefinition entity type constant
- Create ConnectionDefinition type in core v1beta1 package
- Fix hardcoded string by adding ConnectionSchemaVersion constant
- Fix loop variable issue in connection registration
- Remove redundant nil check in connection file handling
- Ensure all code compiles successfully

Signed-off-by: HeerakKashyap <[email protected]>
@HeerakKashyap HeerakKashyap force-pushed the feat/connection-definition-final branch from 3f08e48 to 2b2461c Compare August 14, 2025 20:04
HeerakKashyap added 2 commits August 15, 2025 01:36
- Fix import order to follow Go conventions
- Improve error handling in GenerateID method
- Properly handle errors in Create method instead of ignoring them

Signed-off-by: HeerakKashyap <[email protected]>
- Replace deprecated oras.PackManifestVersion1_1_RC4 with oras.PackManifestVersion1_1
- Add nolint comments to suppress SA1019 warnings for deprecated OPA v0.x packages
- Migration to OPA v1 API requires extensive changes and should be done separately
- All code compiles successfully with these changes

Signed-off-by: HeerakKashyap <[email protected]>
@HeerakKashyap
Copy link
Author

Hey @n2h9 @leecalcote, I've updated the PR with all the fixes for the issues we were seeing. The description now explains what was broken and how I fixed it. Would appreciate a review when you have time!

@n2h9
Copy link
Contributor

n2h9 commented Aug 16, 2025

Hey hey, @HeerakKashyap hello 👋 😇

You need to take connection definition from the schema repo and not define it in meshkit.
Similar how f.e. in getEntity:
it is done for models, components and relationship.

"github.com/open-policy-agent/opa/storage"
"github.com/open-policy-agent/opa/storage/inmem"
"github.com/open-policy-agent/opa/topdown/print"
"github.com/open-policy-agent/opa/rego" //nolint:staticcheck // SA1019: deprecated package, migration to v1 API requires extensive changes
Copy link
Contributor

@n2h9 n2h9 Aug 16, 2025

Choose a reason for hiding this comment

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

Do you think that this pr: #789 fixes lint issues in opa package ?

I encourage you to go and leave your thoughts on the changes in this pr 🤗 .

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is unnecessary to touch this file, as you do not do anything here related to the task.

Copy link
Author

Choose a reason for hiding this comment

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

Do you think that this pr: #789 fixes lint issues in opa package ?

I encourage you to go and leave your thoughts on the changes in this pr 🤗 .

Thanks for pointing this out @n2h9! Looking at PR #789, this is exactly what we needed - it's doing a proper OPA migration from v1.0.1 to v1.7.1 with clean API refactoring instead of just slapping on nolint comments. The Rego code looks much cleaner now with the new API patterns, and they're updating all the other dependencies too. This is way better than what we were trying to do in our PR. Since this PR is specifically about dependency modernization, it makes total sense to let it handle all the OPA and ORAS stuff while we keep our ConnectionDefinition PR focused on just that functionality. Much cleaner approach - thanks for letting me know... 😄

return err
}
defer resp.Body.Close()
defer SafeClose(resp.Body)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in this file will be enough to just update switch case to handle case "connections.meshery.io" and updates to close are not related to the issue. If you think they improve the code quality, could you please create a new pr with it 😇 .

Copy link
Author

Choose a reason for hiding this comment

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

yeah sure...


// TODO: refactor this and use CUE
func getEntity(byt []byte) (et entity.Entity, _ error) {
func GetEntity(byt []byte) (et entity.Entity, _ error) {
Copy link
Contributor

@n2h9 n2h9 Aug 16, 2025

Choose a reason for hiding this comment

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

I do not see any place where you use it ourtside of the package 🤷‍♀️ if so, let's probably update it back to be unexported?

Copy link
Author

Choose a reason for hiding this comment

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

done!

)

// ConnectionSchemaVersion is the schema version for connection definitions
const ConnectionSchemaVersion = "connections.meshery.io/v1beta1"
Copy link
Contributor

Choose a reason for hiding this comment

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

please also define this in the schema package 😇

Copy link
Author

Choose a reason for hiding this comment

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

done!

- Revert GetEntity back to unexported getEntity
- Move ConnectionSchemaVersion to corev1beta1 package
- Remove changes to OPA and OCI files (unrelated to task)
- Keep only ConnectionDefinition support changes

Signed-off-by: HeerakKashyap <[email protected]>
@HeerakKashyap HeerakKashyap force-pushed the feat/connection-definition-final branch from 545d290 to 0c6d15f Compare August 17, 2025 14:27
@HeerakKashyap
Copy link
Author

Hey hey, @HeerakKashyap hello 👋 😇

You need to take connection definition from the schema repo and not define it in meshkit. Similar how f.e. in getEntity: it is done for models, components and relationship.

Thanks for the feedback @n2h9! I looked into using the existing Connection struct from the schemas repo, but I found that it doesn't implement the entity.Entity interface that our registration system requires. The Connection struct's Create method signature is different from what our Entity interface expects.

For now, I've kept the ConnectionDefinition in MeshKit to get the registration functionality working. The proper long-term solution would be to create a ConnectionDefinition struct in the schemas repo that implements the Entity interface, similar to how ComponentDefinition and ModelDefinition work.

This way we can move forward with the registration system while maintaining the correct architectural pattern. Would you like me to create a separate PR to the schemas repo to add the proper ConnectionDefinition there?

@n2h9
Copy link
Contributor

n2h9 commented Aug 17, 2025

Hey hey, @HeerakKashyap hello 👋 😇
You need to take connection definition from the schema repo and not define it in meshkit. Similar how f.e. in getEntity: it is done for models, components and relationship.

Thanks for the feedback @n2h9! I looked into using the existing Connection struct from the schemas repo, but I found that it doesn't implement the entity.Entity interface that our registration system requires. The Connection struct's Create method signature is different from what our Entity interface expects.

For now, I've kept the ConnectionDefinition in MeshKit to get the registration functionality working. The proper long-term solution would be to create a ConnectionDefinition struct in the schemas repo that implements the Entity interface, similar to how ComponentDefinition and ModelDefinition work.

This way we can move forward with the registration system while maintaining the correct architectural pattern. Would you like me to create a separate PR to the schemas repo to add the proper ConnectionDefinition there?

I think we need to add missing functions to connection in connection_helper.go to make it implement required interface. Use Component and Model entities (they also have xxx_helper.go file in schema repo.
😇

thank you 🙇‍♀️

@HeerakKashyap
Copy link
Author

HeerakKashyap commented Aug 17, 2025

Hey hey, @HeerakKashyap hello 👋 😇
You need to take connection definition from the schema repo and not define it in meshkit. Similar how f.e. in getEntity: it is done for models, components and relationship.

Thanks for the feedback @n2h9! I looked into using the existing Connection struct from the schemas repo, but I found that it doesn't implement the entity.Entity interface that our registration system requires. The Connection struct's Create method signature is different from what our Entity interface expects.
For now, I've kept the ConnectionDefinition in MeshKit to get the registration functionality working. The proper long-term solution would be to create a ConnectionDefinition struct in the schemas repo that implements the Entity interface, similar to how ComponentDefinition and ModelDefinition work.
This way we can move forward with the registration system while maintaining the correct architectural pattern. Would you like me to create a separate PR to the schemas repo to add the proper ConnectionDefinition there?

I think we need to add missing functions to connection in connection_helper.go to make it implement required interface. Use Component and Model entities (they also have xxx_helper.go file in schema repo. 😇

thank you 🙇‍♀️

Hey @n2h9! Thanks for the feedback! 👋 😅

I get ur point - we should definitely use the schemas repo definitions when possible. But I ran into a bit of a problem when I tried to add those Entity methods to the existing Connection struct.

Here's what I found: the Connection struct from the schemas repo is actually playing a different role in our system. It's acting as a registrant (like a host/connection that registers other entities), not as an entity definition itself.

If you look at RegistryManager.RegisterEntity(), you'll see that Connection is the first parameter - it's the thing doing the registering, not the thing being registered. Adding Type(), GetID(), and GetEntityDetail() methods to it would kinda break that role and create some confusion about what it's supposed to do.

@HeerakKashyap
Copy link
Author

HeerakKashyap commented Aug 17, 2025

Hey hey, @HeerakKashyap hello 👋 😇
You need to take connection definition from the schema repo and not define it in meshkit. Similar how f.e. in getEntity: it is done for models, components and relationship.

Thanks for the feedback @n2h9! I looked into using the existing Connection struct from the schemas repo, but I found that it doesn't implement the entity.Entity interface that our registration system requires. The Connection struct's Create method signature is different from what our Entity interface expects.
For now, I've kept the ConnectionDefinition in MeshKit to get the registration functionality working. The proper long-term solution would be to create a ConnectionDefinition struct in the schemas repo that implements the Entity interface, similar to how ComponentDefinition and ModelDefinition work.
This way we can move forward with the registration system while maintaining the correct architectural pattern. Would you like me to create a separate PR to the schemas repo to add the proper ConnectionDefinition there?

I think we need to add missing functions to connection in connection_helper.go to make it implement required interface. Use Component and Model entities (they also have xxx_helper.go file in schema repo. 😇
thank you 🙇‍♀️

Hey @n2h9! Thanks for the feedback! 👋 😅

I totally get where you're coming from - we should definitely use the schemas repo definitions when possible. But I ran into a bit of a problem when I tried to add those Entity methods to the existing Connection struct.

Here's what I found: the Connection struct from the schemas repo is actually playing a different role in our system. It's acting as a registrant (like a host/connection that registers other entities), not as an entity definition itself.

If you look at RegistryManager.RegisterEntity(), you'll see that Connection is the first parameter - it's the thing doing the registering, not the thing being registered. Adding Type(), GetID(), and GetEntityDetail() methods to it would kinda break that role and create some confusion about what it's supposed to do.

or maybe @leecalcote could help us give their opinion regarding this... 😊🙇

  Signed-off-by: HeerakKashyap <[email protected]>"
git commit --amend --signoff --no-editq1 --pretty=format:"%B"feat: Add ConnectionDefinition support to registration utilities - Fix code review issues
git reset --soft HEAD~1
- Add missing ConnectionDefinition entity type constant
- Create ConnectionDefinition type in core v1beta1 package
- Fix hardcoded string by adding ConnectionSchemaVersion constant
- Fix loop variable issue in connection registration
- Remove redundant nil check in connection file handling
- Ensure all code compiles successfully

Signed-off-by: HeerakKashyap <[email protected]>
@HeerakKashyap HeerakKashyap force-pushed the feat/connection-definition-final branch from fb385d4 to bf8c9a6 Compare August 20, 2025 21:34
@HeerakKashyap
Copy link
Author

@n2h9 kindly let me know if the changes I did works for us 🙇

@leecalcote
Copy link
Member

@n2h9 kindly let me know if the changes I did works for us 🙇

@HeerakKashyap, test your changes and provide confirmation of those test results.

@HeerakKashyap
Copy link
Author

@leecalcote I have tested locally - it was working fine. I'll upload the test results shortly to confirm it 👍

@n2h9
Copy link
Contributor

n2h9 commented Aug 23, 2025

Could you please also remove no-lint around opa packages import, there is a separate pr which fixes the opa packages lint errors

@HeerakKashyap
Copy link
Author

Could you please also remove no-lint around opa packages import, there is a separate pr which fixes the opa packages lint errors

Sure...

@HeerakKashyap
Copy link
Author

Could you please also remove no-lint around opa packages import, there is a separate pr which fixes the opa packages lint errors

So should I leave it for now as it is...?

@HeerakKashyap
Copy link
Author

HeerakKashyap commented Aug 25, 2025

Hey hey @HeerakKashyap hello 👋 😇

  • you need to take Connection struct from schema, here.
  • you do not need to create ConnectionDefinition wrapper around it.
  • if you need to enhance Connection struct with functions, you can do it in connection_helper.go
  • You need to take this value const ConnectionSchemaVersion = "connections.meshery.io/v1beta1" from here;

Could you please check how it is right now done for model, component and relationship?

I understand we don't want a ConnectionDefinition wrapper, but I'm facing a technical constraint:
The Issue: The Connection struct from schemas has a Type field (in connection.go under meshkit/models/meshmodel/core/v1beta1), which conflicts with the Entity interface's required Type() method. This prevents the Connection struct from directly implementing the Entity interface.I Used Connection struct from schemas, Used ConnectionSchemaVersion from schemas, Couldn't add Entity methods to Connection due to field/method name conflict. How should I handle this? The registration system expects entities that implement the Entity interface, but the Connection struct can't implement it directly due to the Type field conflict.

@HeerakKashyap
Copy link
Author

Hey hey @HeerakKashyap hello 👋 😇

  • you need to take Connection struct from schema, here.
  • you do not need to create ConnectionDefinition wrapper around it.
  • if you need to enhance Connection struct with functions, you can do it in connection_helper.go
  • You need to take this value const ConnectionSchemaVersion = "connections.meshery.io/v1beta1" from here;

Could you please check how it is right now done for model, component and relationship?

I understand we don't want a ConnectionDefinition wrapper, but I'm facing a technical constraint: The Issue: The Connection struct from schemas has a Type field (in connection.go under meshkit/models/meshmodel/core/v1beta1), which conflicts with the Entity interface's required Type() method. This prevents the Connection struct from directly implementing the Entity interface.I Used Connection struct from schemas, Used ConnectionSchemaVersion from schemas, Couldn't add Entity methods to Connection due to field/method name conflict. How should I handle this? The registration system expects entities that implement the Entity interface, but the Connection struct can't implement it directly due to the Type field conflict.

@n2h9

@n2h9
Copy link
Contributor

n2h9 commented Aug 26, 2025

Hey hey @HeerakKashyap hello 👋 😇

  • you need to take Connection struct from schema, here.
  • you do not need to create ConnectionDefinition wrapper around it.
  • if you need to enhance Connection struct with functions, you can do it in connection_helper.go
  • You need to take this value const ConnectionSchemaVersion = "connections.meshery.io/v1beta1" from here;

Could you please check how it is right now done for model, component and relationship?

I understand we don't want a ConnectionDefinition wrapper, but I'm facing a technical constraint: The Issue: The Connection struct from schemas has a Type field (in connection.go under meshkit/models/meshmodel/core/v1beta1), which conflicts with the Entity interface's required Type() method. This prevents the Connection struct from directly implementing the Entity interface.I Used Connection struct from schemas, Used ConnectionSchemaVersion from schemas, Couldn't add Entity methods to Connection due to field/method name conflict. How should I handle this? The registration system expects entities that implement the Entity interface, but the Connection struct can't implement it directly due to the Type field conflict.

Hey hey @HeerakKashyap hello 👋 🤗 !

Indeed there is a conflict 😢 , could be a blocker.

We want to achieve is that the result PackagingUnit will contain the list of Connection entities from schema.
You may wish to think about how to re-arrange the code in meshkit to achieve this result in efficient way.
F.e. rename the method name of an interface or the name of a Connection property (probably interface method will be easier to rename). Probably there is some easier and smarter way to achieve this.

Thank you 🙇‍♀️

@HeerakKashyap
Copy link
Author

Hey hey @HeerakKashyap hello 👋 😇

  • you need to take Connection struct from schema, here.
  • you do not need to create ConnectionDefinition wrapper around it.
  • if you need to enhance Connection struct with functions, you can do it in connection_helper.go
  • You need to take this value const ConnectionSchemaVersion = "connections.meshery.io/v1beta1" from here;

Could you please check how it is right now done for model, component and relationship?

I understand we don't want a ConnectionDefinition wrapper, but I'm facing a technical constraint: The Issue: The Connection struct from schemas has a Type field (in connection.go under meshkit/models/meshmodel/core/v1beta1), which conflicts with the Entity interface's required Type() method. This prevents the Connection struct from directly implementing the Entity interface.I Used Connection struct from schemas, Used ConnectionSchemaVersion from schemas, Couldn't add Entity methods to Connection due to field/method name conflict. How should I handle this? The registration system expects entities that implement the Entity interface, but the Connection struct can't implement it directly due to the Type field conflict.

Hey hey @HeerakKashyap hello 👋 🤗 !

Indeed there is a conflict 😢 , could be a blocker.

We want to achieve is that the result PackagingUnit will contain the list of Connection entities from schema. You may wish to think about how to re-arrange the code in meshkit to achieve this result in efficient way. F.e. rename the method name of an interface or the name of a Connection property (probably interface method will be easier to rename). Probably there is some easier and smarter way to achieve this.

Thank you 🙇‍♀️

Okayy sure, I'll look into this ☺️

@HeerakKashyap HeerakKashyap force-pushed the feat/connection-definition-final branch from f27cf4c to c96d42e Compare August 27, 2025 19:27
@HeerakKashyap HeerakKashyap force-pushed the feat/connection-definition-final branch from cd9829a to 479144d Compare August 27, 2025 19:57
@HeerakKashyap HeerakKashyap force-pushed the feat/connection-definition-final branch from 0c78719 to 6e9e8ab Compare August 27, 2025 20:09
@n2h9
Copy link
Contributor

n2h9 commented Aug 29, 2025

Hey hey @HeerakKashyap hello 👋 🤗 !

You are validating data over the connectionDefinition, which is a wrapper over connection entity.
I think we should validate directly connection entity, because it is supposed to receive connection entity (not a wrapper) inside a model folder / archive when we call to model import f.e.

@HeerakKashyap
Copy link
Author

Hey hey @HeerakKashyap hello 👋 🤗 !

You are validating data over the connectionDefinition, which is a wrapper over connection entity. I think we should validate directly connection entity, because it is supposed to receive connection entity (not a wrapper) inside a model folder / archive when we call to model import f.e.

I am working on it, I'll let u know about the same asap @n2h9. Currently busy with college exams 🥲

HeerakKashyap and others added 3 commits September 3, 2025 14:32
…er - remove wrapper approach and validate connection entities directly from schemas repo

Signed-off-by: HeerakKashyap <[email protected]>
@HeerakKashyap
Copy link
Author

Hey @n2h9, Let me know if this works...

@n2h9
Copy link
Contributor

n2h9 commented Sep 4, 2025

Hey @n2h9, Let me know if this works...

hey hey Heerak, hello 👋 . Thank you, validation over the connection model looks good 🙂 !

Couple points:

  • we do not need to define connection json schema in meshkit schemas/connections/connectionDefinition.json ;
  • we need to add Connection to resulting PackagingUnit ;

Thank you 🤗

@HeerakKashyap
Copy link
Author

Hey @n2h9, Let me know if this works...

hey hey Heerak, hello 👋 . Thank you, validation over the connection model looks good 🙂 !

Couple points:

  • we do not need to define connection json schema in meshkit schemas/connections/connectionDefinition.json ;
  • we need to add Connection to resulting PackagingUnit ;

Thank you 🤗

okay, i'll fix these..

HeerakKashyap and others added 3 commits September 11, 2025 13:41
- Remove schemas/connections/connectionDefinition.json
- PackagingUnit already includes Connections field
- Addresses maintainer points about not needing connection schema in meshkit

Signed-off-by: HeerakKashyap <[email protected]>
…nnection-definition-final' of https://github.com/HeerakKashyap/meshkit into feat/connection-definition-final

git pull origin feat/connection-definition-final# Please enter a commit message to explain why this merge is necessary,
@HeerakKashyap
Copy link
Author

Hey @n2h9 , is it the issue being resolved corresponding to this pr ?

@n2h9
Copy link
Contributor

n2h9 commented Sep 26, 2025

Hey @n2h9 , is it the issue being resolved corresponding to this pr ?

Hey hey, @HeerakKashyap 👋 hello 😇

I think that this part is still pending:

  • we need to add Connection to resulting PackagingUnit ;

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.

4 participants