Skip to content

Commit 48356d9

Browse files
committed
cleanup logs and todo
Signed-off-by: Adysen Rothman <[email protected]>
1 parent 18e5a1a commit 48356d9

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

catalog/internal/catalog/rhec_catalog.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package catalog
22

33
import (
44
"context"
5-
"encoding/json"
65
"fmt"
76
"math"
87
"net/http"
@@ -94,30 +93,6 @@ func (r *rhecCatalogImpl) GetArtifacts(ctx context.Context, name string) (*opena
9493
return &list, nil
9594
}
9695

97-
// todo: remove mapping
98-
// CreateTimeSinceEpoch: repo.creation_date
99-
// LastUpdateTimeSinceEpoch: repo.last_update_date
100-
// Description: repo.RepositoryDisplayData.short_description
101-
// Readme: repo.RepositoryDisplayData.long_description
102-
// Maturity: repo.release_categories (returns list, take first?)
103-
// Language: ????????
104-
// Tasks: image.parseddata.labels[].name
105-
// Provider: repo.vendor_label
106-
// Logo: ???????
107-
// License: ???????
108-
// LicenseLink: ???????
109-
// LibraryName: ???????
110-
// CustomProperties: ???????
111-
// SourceId: rhec
112-
// Name: repository (this is the full rhelai1/model-name-blah) + tag
113-
114-
// type CatalogModelArtifact struct {
115-
// CreateTimeSinceEpoch: image.creation_date
116-
// LastUpdateTimeSinceEpoch: image.last_update_date
117-
// Uri: "registry.redhat.io" + "/" + repository (rhelai/model-name-blah) + ":" + image.tags[each].name
118-
// oci://registry.redhat.io/rhelai1/modelcar-granite-7b-redhat-lab:1.4.0
119-
// }
120-
12196
func fetchRepository(ctx context.Context, client graphql.Client, repository string) (*genqlient.GetRepositoryResponse, error) {
12297
resp, err := genqlient.GetRepository(ctx, client, "registry.access.redhat.com", repository)
12398
if err != nil {
@@ -229,20 +204,11 @@ func (r *rhecCatalogImpl) load(modelsList []any) error {
229204
fullModelName := repo + ":" + tagName
230205
model := newRhecModel(repoData, image, tagName, repo)
231206
models[fullModelName] = model
232-
glog.Infof("loaded rhec model: %s", model.Name)
233207
}
234208
}
235209
}
236210
}
237211

238-
modelsJSON, err := json.MarshalIndent(models, "", " ")
239-
if err != nil {
240-
glog.Warningf("could not marshal models to json for logging: %v", err)
241-
glog.Infof("models: %+v", models) // Fallback
242-
} else {
243-
glog.Infof("models: \n%s", string(modelsJSON))
244-
}
245-
246212
r.modelsLock.Lock()
247213
defer r.modelsLock.Unlock()
248214
r.models = models

0 commit comments

Comments
 (0)