[AH-329]: Updated manifest issue and unnecessary logging (#2648)

* [AH-329]: Updated manifest issue and unnecessary logging

(cherry picked from commit ee1bfc443ed5a6625994115ef2014b7bb568c2ec)
CODE-2402
Arvind Choudhary 2024-09-03 21:21:24 +00:00 committed by Harness
parent 7ff4fd0186
commit acef055ea2
4 changed files with 4 additions and 4 deletions

View File

@ -195,7 +195,7 @@ func backfillURLs(config *types.Config) error {
config.URL.UI = baseURL.String()
}
if config.URL.Registry == "" {
config.URL.Registry = baseURL.String()
config.URL.Registry = combineToRawURL(scheme, "host.docker.internal", port, "")
}
return nil

View File

@ -18,6 +18,7 @@ import (
"context"
"encoding/json"
"fmt"
"strings"
"github.com/harness/gitness/app/paths"
api "github.com/harness/gitness/registry/app/api/openapi/contracts/artifact"
@ -184,7 +185,7 @@ func getManifestConfig(
driver storagedriver.StorageDriver,
) (*manifestConfig, error) {
var config manifestConfig
path, err := storage.PathFn(rootRef, digest)
path, err := storage.PathFn(strings.ToLower(rootRef), digest)
if err != nil {
return nil, fmt.Errorf("failed to get path: %w", err)
}

View File

@ -34,7 +34,6 @@ func init() {
log.Error().Stack().Err(err).Msgf("Register adapter factory for %s", adapterType)
return
}
log.Info().Msgf("Factory for adapter %s registered", adapterType)
}
func newAdapter(

View File

@ -91,7 +91,7 @@ type Config struct {
Container string `envconfig:"GITNESS_URL_CONTAINER"`
// Registry is used as a base to generate external facing URLs.
// Value is derived from Base unless explicitly specified (e.g. http://localhost:3000).
// Value is derived from HTTP.Server unless explicitly specified (e.g. http://host.docker.internal:3000).
Registry string `envconfig:"GITNESS_REGISTRY_URL"`
}