diff --git a/.gitignore b/.gitignore index e15b2a27..0d856277 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ # testing /tmp/empty +registry-automation/extracted_tgz diff --git a/registry-automation/.vscode/settings.json b/registry-automation/.vscode/settings.json new file mode 100644 index 00000000..2c52e891 --- /dev/null +++ b/registry-automation/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "github.copilot.advanced": {} +} \ No newline at end of file diff --git a/registry-automation/cmd/ci.go b/registry-automation/cmd/ci.go index 97be9af3..163bdaa3 100644 --- a/registry-automation/cmd/ci.go +++ b/registry-automation/cmd/ci.go @@ -13,13 +13,14 @@ import ( "net/http" "os" "os/exec" - "path" "path/filepath" "regexp" - "time" + "cloud.google.com/go/storage" "github.com/machinebox/graphql" "github.com/spf13/cobra" + "google.golang.org/api/option" + "gopkg.in/yaml.v2" ) // ciCmd represents the ci command @@ -30,161 +31,300 @@ var ciCmd = &cobra.Command{ } type ChangedFiles struct { - Added []string `json:"added_files"` + Added []string `json:"added_files"` Modified []string `json:"modified_files"` - Deleted []string `json:"deleted_files"` + Deleted []string `json:"deleted_files"` } -type ReleasePackageChecksum struct { - Type string `json:"type"` - Value string `json:"value"` +// ConnectorVersion represents a version of a connector, this type is +// used to insert a new version of a connector in the registry. +type ConnectorVersion struct { + // Namespace of the connector, e.g. "hasura" + Namespace string `graphql:"namespace"` + // Name of the connector + Name string `graphql:"name"` + // Semantic version of the connector + Version string `graphql:"version"` + // Docker image of the connector version + Image string `graphql:"image"` + // URL to the connector's metadata + PackageDefinitionURL string `graphql:"package_definition_url"` + // Is the connector version multitenant? + IsMultitenant bool `graphql:"is_multitenant"` + // Type of the connector packaing `PreBuiltDockerImage`/`ManagedDockerBuild` + Type string `graphql:"type"` } -type ReleasePackage struct { - Version string `json: "version"` - Uri string `json: "uri"` - Checksum ReleasePackageChecksum `json:"checksum"` +type ConnectionVersionMetadata struct { + Type string `yaml:"type"` + Image string `yaml: "image", omitempty` } +const ( + ManagedDockerBuild = "ManagedDockerBuild" + PrebuiltDockerImage = "PrebuiltDockerImage" +) + func init() { rootCmd.AddCommand(ciCmd) // Path for the changed files in the PR - var changedFilesPathEnv = os.Getenv(`CHANGED_FILES_PATH`) + var changedFilesPathEnv = os.Getenv("CHANGED_FILES_PATH") ciCmd.PersistentFlags().String("changed-files-path", changedFilesPathEnv, "path to a line-separated list of changed files in the PR") if changedFilesPathEnv == "" { ciCmd.MarkPersistentFlagRequired("changed-files-path") } - // Location of the registry files - // var rfpE = os.Getenv(`CONNECTOR_HUB_DIRECTORY`) - // ciCmd.PersistentFlags().String("connector-hub-directory", rfpE, "path to the connector hub checkout directory") - // if rfpE == "" { - // ciCmd.MarkPersistentFlagRequired("connector-hub-directory") - // } - - // TODO: Check - rand.Seed(time.Now().UnixNano()) + // Publication environment + var publicationEnv = os.Getenv("PUBLICATION_ENV") + ciCmd.PersistentFlags().String("publication-env", publicationEnv, "publication environment (staging/prod). Default: staging") + // default publicationEnv to "staging" + if publicationEnv == "" { + ciCmd.PersistentFlags().Set("publication-env", "staging") + } } -func runCI(cmd *cobra.Command, args []string) { - - // For each connector where a change is detected... - - // var changed_files = map[string]bool{} - // var changed_files_path = cmd.PersistentFlags().Lookup("changed-files-path").Value.String() - // file, err := os.Open(changed_files_path) - // if err != nil { - // log.Fatal(err) - // } - // defer file.Close() - - // scanner := bufio.NewScanner(file) - // for scanner.Scan() { - // changed_files[filepath.Dir(scanner.Text())] = true // Just assume we'll treat each connector as if everything has changed. - // } +// processAddedOrModifiedConnectorVersions processes the files in the PR and extracts the connector name and version +func processAddedOrModifiedConnectorVersions(files []string, addedOrModifiedConnectorVersions map[string]map[string]string, re *regexp.Regexp) { + for _, file := range files { + matches := re.FindStringSubmatch(file) + if len(matches) == 3 { + connectorName := matches[1] + connectorVersion := matches[2] - // if err := scanner.Err(); err != nil { - // panic(err) - // } + if _, exists := addedOrModifiedConnectorVersions[connectorName]; !exists { + addedOrModifiedConnectorVersions[connectorName] = make(map[string]string) + } - // var hub_directory = cmd.PersistentFlags().Lookup("connector-hub-directory").Value.String() + addedOrModifiedConnectorVersions[connectorName][connectorVersion] = file + } + } - // for k := range changed_files { - // respondToChangedConnector(path.Join(hub_directory, k)) - // } +} +// runCI is the main function that runs the CI workflow +func runCI(cmd *cobra.Command, args []string) { var changed_files_path = cmd.PersistentFlags().Lookup("changed-files-path").Value.String() changedFilesContent, err := os.Open(changed_files_path) - if err!= nil { + if err != nil { log.Fatalf("Failed to open the file: %v, err: %v", changed_files_path, err) } defer changedFilesContent.Close() - // Read the file's contents + // Read the changed file's contents. This file contains all the changed files in the PR changedFilesByteValue, err := io.ReadAll(changedFilesContent) if err != nil { - log.Fatalf("Failed to read JSON file: %v", err) + log.Fatalf("Failed to read the changed files JSON file: %v", err) } var changedFiles ChangedFiles err = json.Unmarshal(changedFilesByteValue, &changedFiles) if err != nil { - log.Fatalf("Failed to unmarshal JSON: %v", err) + log.Fatalf("Failed to unmarshal the changed files content: %v", err) + } + log.Printf("Changed files: %+v", changedFiles) + + // Collect the added or modified connectors + addedOrModifiedConnectorVersions := collectAddedOrModifiedConnectors(changedFiles) + + for connectorName, versions := range addedOrModifiedConnectorVersions { + for version, connectorVersionPath := range versions { + err := respondToAddedOrModifiedConnectorVersion(connectorName, version, connectorVersionPath) + if err != nil { + log.Fatalf("Error while processing version and connector: %s - %s, Error: %v", version, connectorName, err) + } + } + } + + fmt.Printf("new connector versions: \n%+v\n", addedOrModifiedConnectorVersions) + +} + +func collectAddedOrModifiedConnectors(changedFiles ChangedFiles) map[string]map[string]string { const connectorVersionPackageRegex = `^registry/([^/]+)/releases/([^/]+)/connector-packaging\.json$` + re := regexp.MustCompile(connectorVersionPackageRegex) // - re := regexp.MustCompile(connectorVersionPackageRegex); + addedOrModifiedConnectorVersions := make(map[string]map[string]string) - for _, addedFile := range changedFiles.Added { + processAddedOrModifiedConnectorVersions(changedFiles.Added, addedOrModifiedConnectorVersions, re) + processAddedOrModifiedConnectorVersions(changedFiles.Modified, addedOrModifiedConnectorVersions, re) - matches := re.FindStringSubmatch(addedFile); + return addedOrModifiedConnectorVersions +} - if len(matches) == 3 { - fmt.Printf("regex matches are %+v", matches) - } +func respondToAddedOrModifiedConnectorVersion(connectorName string, connectorVersion string, changedConnectorVersionPath string) error { + // // Detect status - added/modified/removed files + // // for each added connector, create a stub in the registry db + // // for each modified connector: + // // * Download tgz + // // * Re-upload tgz + // // * Extract + // // * Build payload for API + // // * PUT to API (gql) + + // Read the connector packaging file + ctx := context.Background() + + // connector's `metadata.json`, `registry/mongodb/metadata.json` + connectorMetadata, err := readJSONFile[map[string]interface{}](fmt.Sprintf("registry/%s/metadata.json", connectorName)) + if err != nil { + return fmt.Errorf("failed to read the connector metadata file: %v", err) + } + + // connector version's metadata, `registry/mongodb/releases/v1.0.0/connector-packaging.json` + connectorVersionPackagingInfo, err := readJSONFile[map[string]interface{}](changedConnectorVersionPath) // Read metadata file + if err != nil { + return fmt.Errorf("failed to read the connector packaging file: %v", err) } - fmt.Printf("Parsed JSON: \n%+v\n", changedFiles) + // Fetch, parse, and reupload the TGZ + tgzUrl, ok := connectorVersionPackagingInfo["uri"].(string) + // Check if the TGZ URL is valid + if !ok || tgzUrl == "" { + return fmt.Errorf("invalid or undefined TGZ URL: %v", tgzUrl) + } + connectorVersionMetadata, connectorMetadataTgzPath, err := getConnectorVersionMetadata(err, tgzUrl, connectorName, connectorVersion) + if err != nil { + return fmt.Errorf("failed to get connector version metadata: %v", err) + } + + uploadedTgzUrl, err := uploadConnectorVersionDefinition(ctx, connectorName, connectorVersion, connectorMetadataTgzPath) + if err != nil { + return fmt.Errorf("failed to upload the connector version definition - connector: %v version:%v - err: %v", connectorName, connectorVersion, err) + } + connectorMetadataType, ok := connectorVersionMetadata["type"].(string) + if !ok && (connectorMetadataType == ManagedDockerBuild || connectorMetadataType == PrebuiltDockerImage) { + return fmt.Errorf("invalid or undefined connector type: %v", connectorMetadataType) + } + + // // Build payload for registry upsert + // var logo_new_url = reuploadLogo(logo_path) // Is the logo hosted somewhere? + registryPayload, err := buildRegistryPayload(connectorName, connectorVersion, connectorMetadataType, connectorMetadata, uploadedTgzUrl) + + if err != nil { + return fmt.Errorf("failed to build registry payload : %v", err) + } + + fmt.Printf("\n\n ************************ Registry payload: %+v", registryPayload) + + // // Upsert + // updateRegistryGQL(registry_payload) + return nil } -func respondToChangedConnector(changed_connector_path string) { - // Detect status - added/modified/removed files - // for each added connector, create a stub in the registry db - // for each modified connector: - // * Download tgz - // * Re-upload tgz - // * Extract - // * Build payload for API - // * PUT to API (gql) +func uploadConnectorVersionDefinition(ctx context.Context, connectorName string, connectorVersion string, connectorMetadataTgzPath string) (string, error) { + client, err := storage.NewClient(ctx, option.WithCredentialsFile("gcp-service-account-detail.json")) + if err != nil { - const logo_file = "logo.png" - const metadata_file = "metadata.json" - const readme_file = "README.md" + return "", fmt.Errorf("failed to create client: %v", err) + } + defer client.Close() - var logo_path = path.Join(changed_connector_path, logo_file) - var metadata_path = path.Join(changed_connector_path, metadata_file) - var readme_path = path.Join(changed_connector_path, readme_file) + bucketName := "dev-connector-platform-registry" - fmt.Println(changed_connector_path) - fmt.Println(logo_path) - fmt.Println(metadata_path) - fmt.Println(readme_path) + var uploadedTgzUrl string - // Read the metadata - var metadata_info = readJSONFile(metadata_path) // Read metadata file + objectName := fmt.Sprintf("packages/%s/%s/package.tgz", connectorName, connectorVersion) + uploadedTgzUrl, err = uploadFile(ctx, client, bucketName, objectName, connectorMetadataTgzPath) - // Fetch, parse, and reupload the TGZ - tgz_url := getStringFromPath([]string{"foo", "bar", "baz"}, metadata_info) // TODO // Get the url for the TGZ - tgz_path := getTempFilePath("/tmp") - downloadFile(tgz_url, tgz_path, map[string]string{}) // TODO: Auth headers - extracted_tgz_path := "path/to/extract/directory" // TODO - err := extractTarGz(tgz_path, extracted_tgz_path) if err != nil { - fmt.Println("Error:", err) - return + log.Fatalf("Failed to upload file: %v", err) + } else { + fmt.Println("Uploaded file to GCS:", uploadedTgzUrl) + } + return uploadedTgzUrl, nil +} - var tgz_info = readJSONFile(path.Join(extracted_tgz_path, "metadata.json")) // TODO: Check - var tgz_new_url = "https://todo.com" - uploadFile(tgz_path, tgz_new_url, map[string]string{}) +// Downloads the TGZ File from the URL specified by `tgzUrl`, extracts the TGZ file and returns the content of the +// connector-definition.yaml present in the .hasura-connector folder. +func getConnectorVersionMetadata(err error, tgzUrl string, connectorName string, connectorVersion string) (map[string]interface{}, string, error) { + var connectorVersionMetadata map[string]interface{} + tgzPath := getTempFilePath("extracted_tgz", ".tgz") - // Build payload for registry upsert - // var logo_new_url = reuploadLogo(logo_path) // Is the logo hosted somewhere? - var registry_payload = buildRegistryPayload(metadata_info, tgz_info, tgz_new_url) + err = downloadFile(tgzUrl, tgzPath, map[string]string{}) + if err != nil { + return connectorVersionMetadata, "", fmt.Errorf("failed to download the connector version metadata file from the URL: %v - err: %v", tgzUrl, err) + } + + extractedTgzFolderPath := "extracted_tgz" + + if _, err := os.Stat(extractedTgzFolderPath); os.IsNotExist(err) { + err := os.Mkdir(extractedTgzFolderPath, 0755) + if err != nil { + return connectorVersionMetadata, "", fmt.Errorf("failed to read the connector version metadata file: %v", err) + } + } + + connectorVersionMetadataYamlFilePath, err := extractTarGz(tgzPath, extractedTgzFolderPath+"/"+connectorName+"/"+connectorVersion) + if err != nil { + return connectorVersionMetadata, "", fmt.Errorf("failed to read the connector version metadata file: %v", err) + } else { + fmt.Println("Extracted metadata file at :", connectorVersionMetadataYamlFilePath) + } - // Upsert - updateRegistryGQL(registry_payload) + connectorVersionMetadata, err = readYAMLFile(connectorVersionMetadataYamlFilePath) + if err != nil { + return connectorVersionMetadata, "", fmt.Errorf("failed to read the connector version metadata file: %v", err) + } + return connectorVersionMetadata, tgzPath, nil } -func buildRegistryPayload(metadata_info map[string]interface{}, tgz_info map[string]interface{}, tgz_url string) map[string]interface{} { - return map[string]interface{}{} // TODO +// Write a function that accepts a file path to a YAML file and returns +// the contents of the file as a map[string]interface{}. +// readYAMLFile accepts a file path to a YAML file and returns the contents of the file as a map[string]interface{}. +func readYAMLFile(filePath string) (map[string]interface{}, error) { + // Open the file + file, err := os.Open(filePath) + if err != nil { + return nil, fmt.Errorf("failed to open file: %w", err) + } + defer file.Close() + + // Read the file contents + data, err := io.ReadAll(file) + if err != nil { + return nil, fmt.Errorf("failed to read file: %w", err) + } + + // Unmarshal the YAML contents into a map + var result map[string]interface{} + err = yaml.Unmarshal(data, &result) + if err != nil { + return nil, fmt.Errorf("failed to unmarshal YAML: %w", err) + } + + return result, nil +} + +func buildRegistryPayload( + connectorName string, + version string, + packagingType string, + connectorMetadata map[string]interface{}, + uploadedConnectorDefinitionTgzUrl string, +) (ConnectorVersion, error) { + var connectorVersion ConnectorVersion + connectorOverview, ok := connectorMetadata["overview"].(map[string]interface{}) + if !ok { + return connectorVersion, fmt.Errorf("Could not find connector overview in the connector's metadata") + } + connectorNamespace, ok := connectorOverview["namespace"].(string) + if !ok { + return connectorVersion, fmt.Errorf("Could not find the 'namespace' of the connector in the connector's overview in the connector's metadata.json") + } + connectorVersion.Namespace = connectorNamespace + connectorVersion.Name = connectorName + connectorVersion.Version = version + + return connectorVersion, nil } func updateRegistryGQL(payload map[string]interface{}) { @@ -205,6 +345,8 @@ func updateRegistryGQL(payload map[string]interface{}) { req.Var("key", "value") + // add a new key value to req + var respData map[string]interface{} if err := client.Run(ctx, req, &respData); err != nil { @@ -213,8 +355,6 @@ func updateRegistryGQL(payload map[string]interface{}) { } -// Helper functions - func downloadFile(sourceURL, destination string, headers map[string]string) error { // Create a new HTTP client client := &http.Client{} @@ -253,21 +393,32 @@ func downloadFile(sourceURL, destination string, headers map[string]string) erro return nil } +// parseJSON accepts a JSON byte slice and returns the parsed value as the specified type. +func parseJSON[T any](data []byte) (T, error) { + var result T + err := json.Unmarshal(data, &result) + if err != nil { + return result, fmt.Errorf("failed to unmarshal JSON: %w", err) + } + return result, nil +} -func readJSONFile(location string) map[string]interface{} { +// Reads a JSON file and attempts to parse the content of the file +// into the type T. +// Note: The location is relative to the root of the repository +func readJSONFile[T any](location string) (T, error) { // Read the file - fileBytes, err := os.ReadFile(location) + var result T + fileBytes, err := os.ReadFile("../" + location) if err != nil { - panic(fmt.Errorf("error reading file: %v", err)) + return result, fmt.Errorf("error reading file at location: %s %v", location, err) } - // Parse JSON - var data map[string]interface{} - if err := json.Unmarshal(fileBytes, &data); err != nil { - panic(fmt.Errorf("error parsing JSON: %v", err)) + if err := json.Unmarshal(fileBytes, &result); err != nil { + return result, fmt.Errorf("error parsing JSON: %v", err) } - return data + return result, nil } func getStringFromPath(path []string, m map[string]interface{}) string { @@ -299,16 +450,16 @@ func getStringFromPath(path []string, m map[string]interface{}) string { const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // generateRandomFileName generates a random file name based on the current time. -func generateRandomFileName() string { +func generateRandomFileName(fileExtension string) string { b := make([]byte, 10) for i := range b { b[i] = letterBytes[rand.Intn(len(letterBytes))] } - return string(b) + return string(b) + fileExtension } // getTempFilePath generates a random file name in the specified directory. -func getTempFilePath(directory string) string { +func getTempFilePath(directory string, fileExtension string) string { // Ensure the directory exists err := os.MkdirAll(directory, os.ModePerm) if err != nil { @@ -316,7 +467,7 @@ func getTempFilePath(directory string) string { } // Generate a random file name - fileName := generateRandomFileName() + fileName := generateRandomFileName(fileExtension) // Create the file path filePath := filepath.Join(directory, fileName) @@ -325,56 +476,59 @@ func getTempFilePath(directory string) string { _, err = os.Stat(filePath) if !os.IsNotExist(err) { // File exists, generate a new name - fileName = generateRandomFileName() + fileName = generateRandomFileName(fileExtension) filePath = filepath.Join(directory, fileName) } return filePath + } -func uploadFile(sourceFilePath, destinationURL string, headers map[string]string) { - // Open the file - file, err := os.Open(sourceFilePath) +// uploadFile uploads a file to Google Cloud Storage +// document this function with comments +func uploadFile(ctx context.Context, client *storage.Client, bucketName, objectName, filePath string) (string, error) { + bucket := client.Bucket(bucketName) + object := bucket.Object(objectName) + wc := object.NewWriter(ctx) + + file, err := os.Open(filePath) if err != nil { - panic(fmt.Errorf("error opening file: %v", err)) + return "", fmt.Errorf("failed to open file: %v", err) } defer file.Close() - // Create a new HTTP request with a POST method - req, err := http.NewRequest("POST", destinationURL, file) - if err != nil { - panic(fmt.Errorf("error creating request: %v", err)) + if _, err := io.Copy(wc, file); err != nil { + return "", fmt.Errorf("failed to upload file: %w", err) } - - // Add headers to the request - for key, value := range headers { - req.Header.Set(key, value) + if err := wc.Close(); err != nil { + return "", fmt.Errorf("failed to close writer: %w", err) } - // Create an HTTP client - client := &http.Client{} + // Return the public URL of the uploaded object. + publicURL := fmt.Sprintf("https://storage.googleapis.com/%s/%s", bucketName, objectName) - // Send the request - resp, err := client.Do(req) - if err != nil { - panic(fmt.Errorf("error sending request: %v", err)) - } - defer resp.Body.Close() - - // Check the response status code - if resp.StatusCode != http.StatusOK { - panic(fmt.Errorf("upload failed with status code: %d", resp.StatusCode)) - } + fmt.Printf("File %s uploaded to bucket %s as %s and is available at %s.\n", filePath, bucketName, objectName, publicURL) + return publicURL, nil } -func extractTarGz(src, dest string) error { - // Run the tar command with the -xzf options - cmd := exec.Command("tar", "-xzf", src, "-C", dest) +func extractTarGz(src, dest string) (string, error) { + // Create the destination directory + // Get the present working directory + pwd := os.Getenv("PWD") + filepath := pwd + "/" + dest + + if err := os.MkdirAll(filepath, 0755); err != nil { + return "", fmt.Errorf("error creating destination directory: %v", err) + } + // Run the tar command with the -xvzf options + cmd := exec.Command("tar", "-xvzf", src, "-C", dest) // Execute the command if err := cmd.Run(); err != nil { - return fmt.Errorf("error extracting tar.gz file: %v", err) + return "", fmt.Errorf("error extracting tar.gz file: %v", err) } - return nil + log.Println("***** File path: ", filepath) + + return fmt.Sprintf("%s/.hasura-connector/connector-metadata.yaml", filepath), nil } diff --git a/registry-automation/cmd/ci_test.go b/registry-automation/cmd/ci_test.go new file mode 100644 index 00000000..b1ccc4a6 --- /dev/null +++ b/registry-automation/cmd/ci_test.go @@ -0,0 +1,101 @@ +package cmd + +import ( + "regexp" + "testing" +) + +func TestProcessAddedOrModifiedConnectorVersions(t *testing.T) { + // Define test cases + testCases := []struct { + name string + files []string + expectedAddedOrModifiedConnectors map[string]map[string]string + }{ + { + name: "Test case 1", + files: []string{ + "registry/hasura/releases/v1.0.0/connector-packaging.json", + "registry/hasura/releases/v2.0.0/connector-packaging.json", + "registry/other/releases/v1.0.0/connector-packaging.json", + }, + expectedAddedOrModifiedConnectors: map[string]map[string]string{ + "hasura": { + "v1.0.0": "registry/hasura/releases/v1.0.0/connector-packaging.json", + "v2.0.0": "registry/hasura/releases/v2.0.0/connector-packaging.json", + }, + "other": { + "v1.0.0": "registry/other/releases/v1.0.0/connector-packaging.json", + }, + }, + }, + { + name: "Test case 2", + files: []string{ + "registry/hasura/releases/v1.0.0/connector-packaging.json", + "registry/hasura/releases/v1.0.0/other-file.json", + }, + expectedAddedOrModifiedConnectors: map[string]map[string]string{ + "hasura": { + "v1.0.0": "registry/hasura/releases/v1.0.0/connector-packaging.json", + }, + }, + }, + { + name: "Test case 3", + files: []string{ + "registry/hasura/releases/v1.0.0/other-file.json", + "registry/other/releases/v1.0.0/connector-packaging.json", + }, + expectedAddedOrModifiedConnectors: map[string]map[string]string{ + "other": { + "v1.0.0": "registry/other/releases/v1.0.0/connector-packaging.json", + }, + }, + }, + } + + // Define the regular expression pattern + connectorVersionPackageRegex := `^registry/([^/]+)/releases/([^/]+)/connector-packaging\.json$` + re := regexp.MustCompile(connectorVersionPackageRegex) + + // Run the test cases + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + // Initialize the map to store the added or modified connectors + addedOrModifiedConnectorVersions := make(map[string]map[string]string) + + // Call the function under test + processAddedOrModifiedConnectorVersions(tc.files, addedOrModifiedConnectorVersions, re) + + // Compare the actual result with the expected result + if len(addedOrModifiedConnectorVersions) != len(tc.expectedAddedOrModifiedConnectors) { + t.Errorf("Unexpected number of connectors. Expected: %d, Got: %d", len(tc.expectedAddedOrModifiedConnectors), len(addedOrModifiedConnectorVersions)) + } + + for connectorName, versions := range addedOrModifiedConnectorVersions { + expectedVersions, ok := tc.expectedAddedOrModifiedConnectors[connectorName] + if !ok { + t.Errorf("Unexpected connector name: %s", connectorName) + continue + } + + if len(versions) != len(expectedVersions) { + t.Errorf("Unexpected number of versions for connector %s. Expected: %d, Got: %d", connectorName, len(expectedVersions), len(versions)) + } + + for version, connectorVersionPath := range versions { + expectedPath, ok := expectedVersions[version] + if !ok { + t.Errorf("Unexpected version for connector %s: %s", connectorName, version) + continue + } + + if connectorVersionPath != expectedPath { + t.Errorf("Unexpected connector version path for connector %s, version %s. Expected: %s, Got: %s", connectorName, version, expectedPath, connectorVersionPath) + } + } + } + }) + } +} diff --git a/registry-automation/cmd/utils.go b/registry-automation/cmd/utils.go new file mode 100644 index 00000000..b167d71c --- /dev/null +++ b/registry-automation/cmd/utils.go @@ -0,0 +1,5 @@ +package cmd + +func getFilePathRelativeToRepository(filePath string) string { + return "../../" + filePath +} diff --git a/registry-automation/go.mod b/registry-automation/go.mod index b471be51..59b7ef16 100644 --- a/registry-automation/go.mod +++ b/registry-automation/go.mod @@ -5,8 +5,23 @@ go 1.21.4 require github.com/spf13/cobra v1.8.0 require ( + cloud.google.com/go v0.115.0 // indirect + cloud.google.com/go/auth v0.7.1 // indirect + cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.5.0 // indirect + cloud.google.com/go/iam v1.1.11 // indirect + cloud.google.com/go/storage v1.43.0 // indirect github.com/andybalholm/brotli v1.0.1 // indirect - github.com/golang/snappy v0.0.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/s2a-go v0.1.7 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect + github.com/googleapis/gax-go/v2 v2.12.5 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/machinebox/graphql v0.2.2 // indirect @@ -15,4 +30,24 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.9 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect + go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + golang.org/x/crypto v0.25.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/api v0.188.0 // indirect + google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v2 v2.4.0 ) diff --git a/registry-automation/go.sum b/registry-automation/go.sum index eb4b546b..5d0aac40 100644 --- a/registry-automation/go.sum +++ b/registry-automation/go.sum @@ -1,12 +1,75 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14= +cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU= +cloud.google.com/go/auth v0.7.1 h1:Iv1bbpzJ2OIg16m94XI9/tlzZZl3cdeR3nGVGj78N7s= +cloud.google.com/go/auth v0.7.1/go.mod h1:VEc4p5NNxycWQTMQEDQF0bd6aTMb6VgYDXEwiJJQAbs= +cloud.google.com/go/auth/oauth2adapt v0.2.3 h1:MlxF+Pd3OmSudg/b1yZ5lJwoXCEaeedAguodky1PcKI= +cloud.google.com/go/auth/oauth2adapt v0.2.3/go.mod h1:tMQXOfZzFuNuUxOypHlQEXgdfX5cuhwU+ffUuXRJE8I= +cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY= +cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY= +cloud.google.com/go/iam v1.1.11 h1:0mQ8UKSfdHLut6pH9FM3bI55KWR46ketn0PuXleDyxw= +cloud.google.com/go/iam v1.1.11/go.mod h1:biXoiLWYIKntto2joP+62sd9uW5EpkZmKIvfNcTWlnQ= +cloud.google.com/go/storage v1.43.0 h1:CcxnSohZwizt4LCzQHWvBf1/kvtHUn7gk9QERXPyXFs= +cloud.google.com/go/storage v1.43.0/go.mod h1:ajvxEa7WmZS1PxvKRq4bq0tFT3vMd502JwstCcYv0Q0= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 h1:iFaUwBSo5Svw6L7HYpRu/0lE3e0BaElwnNO1qkNQxBY= github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj60/X5sZFNxpG4HBPDHVqxNm4DfnCKgrbZOT+s= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= +github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= +github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.12.5 h1:8gw9KZK8TiVKB6q3zHY3SBzLnrGp6HQjyfYBYGmXdxA= +github.com/googleapis/gax-go/v2 v2.12.5/go.mod h1:BUDKcWo+RaKq5SC9vVYL0wLADa3VcfswbOMMRmB9H3E= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -29,16 +92,113 @@ github.com/pierrec/lz4/v4 v4.1.2 h1:qvY3YFXRQE/XB8MlLzJH7mSzBs74eA2gg52YTk6jUPM= github.com/pierrec/lz4/v4 v4.1.2/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.9 h1:RsKRIA2MO8x56wkkcd3LbtcE/uMszhb6DpRf+3uwa3I= github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.188.0 h1:51y8fJ/b1AaaBRJr4yWm96fPcuxSo0JcegXE3DaHQHw= +google.golang.org/api v0.188.0/go.mod h1:VR0d+2SIiWOYG3r/jdm7adPW9hI2aRv9ETOSCQ9Beag= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d h1:/hmn0Ku5kWij/kjGsrcJeC1T/MrJi2iNWwgAqrihFwc= +google.golang.org/genproto v0.0.0-20240711142825-46eb208f015d/go.mod h1:FfBgJBJg9GcpPvKIuHSZ/aE1g2ecGL74upMzGZjiGEY= +google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d h1:kHjw/5UfflP/L5EbledDrcG4C2597RtymmGRZvHiCuY= +google.golang.org/genproto/googleapis/api v0.0.0-20240711142825-46eb208f015d/go.mod h1:mw8MG/Qz5wfgYr6VqVCiZcHe/GJEfI+oGGDCohaVgB0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/registry/mongodb/metadata.json b/registry/mongodb/metadata.json index f0219847..b3cebab8 100644 --- a/registry/mongodb/metadata.json +++ b/registry/mongodb/metadata.json @@ -20,4 +20,4 @@ "is_open_source": true, "repository": "https://github.com/hasura/ndc-mongodb/" } -} \ No newline at end of file +}