Skip to content

Commit

Permalink
Manually set `PreBuiltDockerImage as package version type
Browse files Browse the repository at this point in the history
  • Loading branch information
codingkarthik committed Aug 12, 2024
1 parent c8cc3ee commit a0ba7fc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions registry-automation/cmd/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ func processNewlyAddedConnectorVersions(client *storage.Client, newlyAddedConnec
connectorVersion, uploadConnectorVersionErr = uploadConnectorVersionPackage(client, connectorName, version, connectorVersionPath)

if uploadConnectorVersionErr != nil {
fmt.Printf("Error while processing version and connector: %s - %s, Error: %v", version, connectorName, uploadConnectorVersionErr)
encounteredError = true

break
} else {
connectorVersions = append(connectorVersions, connectorVersion)
Expand Down Expand Up @@ -475,14 +473,23 @@ func buildRegistryPayload(
return connectorVersion, fmt.Errorf("Inserting a new connector is not supported yet")
}

var connectorVersionType string

if connectorVersionPackagingType == PrebuiltDockerImage {
// Note: The connector version type is set to `PreBuiltDockerImage` if the connector version is of type `PrebuiltDockerImage`, this is a HACK because this value might be removed in the future and we might not even need to insert new connector versions in the `hub_registry_connector_version` table.
connectorVersionType = "PreBuiltDockerImage"
} else {
connectorVersionType = ManagedDockerBuild
}

connectorVersion = ConnectorVersion{
Namespace: connectorNamespace,
Name: connectorName,
Version: version,
Image: &connectorVersionDockerImage,
PackageDefinitionURL: uploadedConnectorDefinitionTgzUrl,
IsMultitenant: connectorInfo.HubRegistryConnector[0].MultitenantConnector != nil,
Type: connectorVersionPackagingType,
Type: connectorVersionType,
}

return connectorVersion, nil
Expand Down

0 comments on commit a0ba7fc

Please sign in to comment.