Skip to content

Conversation

@Ontiomacer
Copy link

This PR fixes meshery/meshery #14702.

In the Meshery Integrations Spreadsheet, the row
meshery-integration-template is an example/template model used for
creating new model entries. It should not be processed during
mesheryctl registry generate.

This PR adds a simple conditional check inside registry/model.go to
skip this model gracefully, preventing the generator from attempting to
register a template model and avoiding unnecessary errors in the logs.

  • Added conditional to skip model == "meshery-integration-template"
  • Prevents generator from processing a template-only entry
  • Eliminates the "generator not implemented" error during registry generate

What I changed :

  • Added a conditional in registry/model.go to skip the model named meshery-integration-template.
  • Prevents the registry generator from processing the template/example row.
  • Removes the unnecessary “generator not implemented” errors during mesheryctl registry generate.
    Ran:
    mesheryctl registry generate --directory ./mesheryctl/templates/template-csvs

@welcome
Copy link

welcome bot commented Nov 26, 2025

Yay, your first pull request! 👍 A contributor will be by to give feedback soon. In the meantime, you can find updates in the #github-notifications channel in the community Slack.
Be sure to double-check that you have signed your commits. Here are instructions for making signing an implicit activity while performing a commit.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Ontiomacer, 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 an issue where the mesheryctl registry generate command was attempting to process a template model, meshery-integration-template, leading to errors. The change introduces a safeguard to gracefully skip this template model, ensuring that only legitimate integration models are processed and preventing unnecessary log errors during the generation process.

Highlights

  • Template Model Exclusion: Introduced a conditional check to explicitly skip the "meshery-integration-template" model during registry generation.
  • Error Prevention: Prevents the mesheryctl registry generate command from attempting to process a template-only entry, thereby eliminating "generator not implemented" errors.
  • Streamlined Generation: Ensures that the registry generator only processes valid integration models, improving the efficiency and accuracy of the generation process.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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 correctly prevents the meshery-integration-template model from being processed during registry generation by adding a skip condition. The change is straightforward and effective. My feedback focuses on improving maintainability by replacing a hardcoded string with a constant.

Comment on lines 840 to 843
if model.Model == "meshery-integration-template"{
log.Info("Skipping meshery-integration-template model")
continue
}
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 string "meshery-integration-template" is used as a magic string. To improve maintainability and avoid potential typos, it's better to define it as a constant at the package level. This also makes it easier to update if the template name changes in the future.

Please define a constant at the top of the file, for example:

const mesheryIntegrationTemplateModel = "meshery-integration-template"

And then use it here.

Suggested change
if model.Model == "meshery-integration-template"{
log.Info("Skipping meshery-integration-template model")
continue
}
if model.Model == mesheryIntegrationTemplateModel {
log.Infof("Skipping model: %s", mesheryIntegrationTemplateModel)
continue
}

@Ontiomacer
Copy link
Author

@leecalcote This PR resolves meshery/meshery#14702.

It adds a constant for meshery-integration-template and ensures this
template-only model is skipped during registry generation. Verified that
normal models continue to generate correctly.

@Ontiomacer
Copy link
Author

Any changes or issues with it @leecalcote

@lekaf974
Copy link
Contributor

attempt to fix meshery/meshery#14702

// Iterate models from the spreadsheet
for _, model := range modelCSVHelper.Models {

if model.Model == mesheryIntegrationTemplateModel{
Copy link
Contributor

Choose a reason for hiding this comment

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

👋 @Ontiomacer thanks,

Even if it does the job, the intention is not clear enough, I mean if I am not aware of the open issue I will have the question why do we skip this model, I'd suggest to use a slice with a name that describe the intention to make easier to understand the main purpose. Then, you can check if the model name is inside that slice. Does it make sense ?

Copy link
Member

Choose a reason for hiding this comment

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

There is a "PublishToRegistry" column that should be set to false for this row and just like any other row with a false value for this column, those columns should not be considered for generation.

This column is an ideal flag (built for this purpose).

Copy link
Author

Choose a reason for hiding this comment

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

Thanks @leecalcote and @lekaf974!
Acknowledged — the PublishToRegistry flag is indeed the intended control for excluding template rows.
Since the spreadsheet doesn’t mark this row yet, the skip here prevents generator errors until the flag is updated.

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.

3 participants