Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions registry/model.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package registry

import (
"bytes"
"context"
Expand Down Expand Up @@ -32,7 +31,7 @@ import (
"golang.org/x/sync/semaphore"
"google.golang.org/api/sheets/v4"
)

const mesheryIntegrationTemplateModel = "meshery-integration-template"
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 not needed and goes against the objective of being "anti-brittle".

var modelToCompGenerateTracker = store.NewGenericThreadSafeStore[compGenerateTracker]()

type compGenerateTracker struct {
Expand Down Expand Up @@ -837,11 +836,19 @@ func InvokeGenerationFromSheet(wg *sync.WaitGroup, path string, modelsheetID, co
}
}()
// Iterate models from the spreadsheet
for _, model := range modelCSVHelper.Models {

if modelName != "" && modelName != model.Model {
continue
}
for _, model := range modelCSVHelper.Models
{
if modelName != "" && modelName != model.Model
{
continue
}

if modelName == "" && strings.ToLower(strings.TrimSpace(model.PublishToRegistry)) != "true"
{
log.Infof("Skipping model: %s (PublishToRegistry != true)", model.Model)
continue
}
}
totalAvailableModels++
ctx := context.Background()

Expand Down