diff --git a/WORKSPACE b/WORKSPACE index 2cc6429..fba14e9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -3,19 +3,19 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # Start of Go + Gazelle + gRPC http_archive( name = "io_bazel_rules_go", - sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", + sha256 = "de7974538c31f76658e0d333086c69efdf6679dbc6a466ac29e65434bf47076d", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", + "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.45.0/rules_go-v0.45.0.zip", + "https://github.com/bazelbuild/rules_go/releases/download/v0.45.0/rules_go-v0.45.0.zip", ], ) http_archive( name = "bazel_gazelle", - sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809", + integrity = "sha256-MpOL2hbmcABjA1R5Bj2dJMYO2o15/Uc5Vj9Q0zHLMgk=", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz", ], ) @@ -39,7 +39,7 @@ oapi_dependencies() go_rules_dependencies() go_register_toolchains( nogo = "@//:nogo", - version = "1.20.6" + version = "1.21.6" ) gazelle_dependencies() diff --git a/cmd/tools/migratesqldb/cmd/BUILD.bazel b/cmd/tools/migratesqldb/cmd/BUILD.bazel index 9e9d0fb..22205b7 100644 --- a/cmd/tools/migratesqldb/cmd/BUILD.bazel +++ b/cmd/tools/migratesqldb/cmd/BUILD.bazel @@ -9,9 +9,11 @@ go_library( importpath = "github.com/RMI/pacta/cmd/tools/migratesqldb/cmd", visibility = ["//visibility:public"], deps = [ + "@com_github_golang_migrate_migrate_v4//:migrate", + "@com_github_golang_migrate_migrate_v4//database/pgx/v5:pgx", + "@com_github_golang_migrate_migrate_v4//source/file", "@com_github_jackc_pgx_v5//pgxpool", - "@com_github_silicon_ally_testpgx//migrate", "@com_github_spf13_cobra//:cobra", - "@io_bazel_rules_go//go/tools/bazel:go_default_library", + "@io_bazel_rules_go//go/runfiles:go_default_library", ], ) diff --git a/cmd/tools/migratesqldb/cmd/cmd.go b/cmd/tools/migratesqldb/cmd/cmd.go index c13280d..7cba761 100644 --- a/cmd/tools/migratesqldb/cmd/cmd.go +++ b/cmd/tools/migratesqldb/cmd/cmd.go @@ -5,11 +5,15 @@ import ( "errors" "fmt" "os" + "path/filepath" - "github.com/Silicon-Ally/testpgx/migrate" - "github.com/bazelbuild/rules_go/go/tools/bazel" + "github.com/bazelbuild/rules_go/go/runfiles" + "github.com/golang-migrate/migrate/v4" + "github.com/golang-migrate/migrate/v4/database/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" "github.com/spf13/cobra" + + _ "github.com/golang-migrate/migrate/v4/source/file" ) func Execute() { @@ -63,16 +67,28 @@ var ( Use: "apply", Short: "Apply migrations", RunE: func(cmd *cobra.Command, args []string) error { - migrationsPath, err := bazel.Runfile("db/sqldb/migrations") + migrator, err := newMigrator(sqlDB) if err != nil { - return fmt.Errorf("failed to get a path to migrations: %w", err) + return fmt.Errorf("when creating the migrator: %w", err) + } + if err := migrator.Up(); err != nil { + return fmt.Errorf("while applying the migration(s): %w", err) } - migrator, err := migrate.New(migrationsPath) + return nil + }, + } + + rollbackCmd = &cobra.Command{ + Use: "rollback", + Short: "Rollback migrations", + RunE: func(cmd *cobra.Command, args []string) error { + migrator, err := newMigrator(sqlDB) if err != nil { return fmt.Errorf("when creating the migrator: %w", err) } - if err := migrator.Migrate(sqlDB); err != nil { - return fmt.Errorf("while applying the migration(s): %w", err) + if err := migrator.Steps(-1); err != nil { + return fmt.Errorf("while rolling back the migration(s): %w", err) + } return nil }, @@ -81,5 +97,36 @@ var ( func init() { rootCmd.PersistentFlags().StringVar(&dsn, "dsn", "", "A Postgres DSN, parsable by pgx.ParseConfig") - rootCmd.AddCommand(applyCmd) + rootCmd.AddCommand(applyCmd, rollbackCmd) +} + +func newMigrator(db *sql.DB) (*migrate.Migrate, error) { + // For a description of why this is needed, see: + // https://github.com/bazelbuild/rules_go/issues/3830 + migrationsPath, err := runfiles.Rlocation("__main__/db/sqldb/migrations/0001_create_schema_migrations_history.down.sql") + if err != nil { + return nil, fmt.Errorf("failed to get a path to migrations: %w", err) + } + migrationsPath = filepath.Dir(migrationsPath) + + // Pings the database to distinguish between migration and connection errors + if err := db.Ping(); err != nil { + return nil, fmt.Errorf("failed to ping database: %w", err) + } + + driver, err := pgx.WithInstance(db, &pgx.Config{}) + if err != nil { + return nil, fmt.Errorf("failed to init driver instance: %w", err) + } + + mgr, err := migrate.NewWithDatabaseInstance( + "file://"+migrationsPath, + "pgx", + driver, + ) + if err != nil { + return nil, fmt.Errorf("failed to init migrate instance: %w", err) + } + + return mgr, nil } diff --git a/deps.bzl b/deps.bzl index affeb0d..e754967 100644 --- a/deps.bzl +++ b/deps.bzl @@ -19,7 +19,6 @@ def go_dependencies(): sum = "h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o=", version = "v1.2.1", ) - go_repository( name = "com_github_alecthomas_template", importpath = "github.com/alecthomas/template", @@ -38,7 +37,6 @@ def go_dependencies(): sum = "h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=", version = "v1.0.4", ) - go_repository( name = "com_github_apache_arrow_go_v10", importpath = "github.com/apache/arrow/go/v10", @@ -51,7 +49,6 @@ def go_dependencies(): sum = "h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY=", version = "v0.16.0", ) - go_repository( name = "com_github_apapsch_go_jsonmerge_v2", importpath = "github.com/apapsch/go-jsonmerge/v2", @@ -64,7 +61,6 @@ def go_dependencies(): sum = "h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=", version = "v0.0.0-20150827004946-bbbad097214e", ) - go_repository( name = "com_github_armon_go_metrics", importpath = "github.com/armon/go-metrics", @@ -77,7 +73,6 @@ def go_dependencies(): sum = "h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=", version = "v0.0.0-20180808171621-7fddfc383310", ) - go_repository( name = "com_github_aws_aws_sdk_go", importpath = "github.com/aws/aws-sdk-go", @@ -96,14 +91,12 @@ def go_dependencies(): sum = "h1:tcFliCWne+zOuUfKNRn8JdFBuWPDuISDH08wD2ULkhk=", version = "v1.4.8", ) - go_repository( name = "com_github_aws_aws_sdk_go_v2_credentials", importpath = "github.com/aws/aws-sdk-go-v2/credentials", sum = "h1:9+ZhlDY7N9dPnUmf7CDfW9In4sW5Ff3bh7oy4DzS1IE=", version = "v1.12.20", ) - go_repository( name = "com_github_aws_aws_sdk_go_v2_feature_s3_manager", importpath = "github.com/aws/aws-sdk-go-v2/feature/s3/manager", @@ -122,14 +115,12 @@ def go_dependencies(): sum = "h1:/K482T5A3623WJgWT8w1yRAFK4RzGzEl7y39yhtn9eA=", version = "v2.4.17", ) - go_repository( name = "com_github_aws_aws_sdk_go_v2_internal_v4a", importpath = "github.com/aws/aws-sdk-go-v2/internal/v4a", sum = "h1:ZSIPAkAsCCjYrhqfw2+lNzWDzxzHXEckFkTePL5RSWQ=", version = "v1.0.14", ) - go_repository( name = "com_github_aws_aws_sdk_go_v2_service_internal_accept_encoding", importpath = "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding", @@ -142,7 +133,6 @@ def go_dependencies(): sum = "h1:BBYoNQt2kUZUUK4bIPsKrCcjVPUMNsgQpNAwhznK/zo=", version = "v1.1.18", ) - go_repository( name = "com_github_aws_aws_sdk_go_v2_service_internal_presigned_url", importpath = "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url", @@ -155,21 +145,18 @@ def go_dependencies(): sum = "h1:HfVVR1vItaG6le+Bpw6P4midjBDMKnjMyZnw9MXYUcE=", version = "v1.13.17", ) - go_repository( name = "com_github_aws_aws_sdk_go_v2_service_s3", importpath = "github.com/aws/aws-sdk-go-v2/service/s3", sum = "h1:3/gm/JTX9bX8CpzTgIlrtYpB3EVBDxyg/GY/QdcIEZw=", version = "v1.27.11", ) - go_repository( name = "com_github_aws_smithy_go", importpath = "github.com/aws/smithy-go", sum = "h1:l7LYxGuzK6/K+NzJ2mC+VvLUbae0sL3bXU//04MkmnA=", version = "v1.13.3", ) - go_repository( name = "com_github_azure_azure_sdk_for_go_sdk_azcore", importpath = "github.com/Azure/azure-sdk-for-go/sdk/azcore", @@ -182,7 +169,6 @@ def go_dependencies(): sum = "h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc=", version = "v1.3.1", ) - go_repository( name = "com_github_azure_azure_sdk_for_go_sdk_internal", importpath = "github.com/Azure/azure-sdk-for-go/sdk/internal", @@ -195,21 +181,18 @@ def go_dependencies(): sum = "h1:YW9/wu7Y1t9IPJLhOtAEIw/A0P9Stv4XjDqgzXsnJyo=", version = "v0.3.0", ) - go_repository( name = "com_github_azure_azure_sdk_for_go_sdk_resourcemanager_appcontainers_armappcontainers_v2", importpath = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/appcontainers/armappcontainers/v2", sum = "h1:1PD0CnFSl1m1TCwudP3cIiyTABCWVzHXtYc6Vi5J0JY=", version = "v2.0.0", ) - go_repository( name = "com_github_azure_azure_sdk_for_go_sdk_storage_azblob", importpath = "github.com/Azure/azure-sdk-for-go/sdk/storage/azblob", sum = "h1:u/LLAOFgsMv7HmNL4Qufg58y+qElGOt5qv0z1mURkRY=", version = "v1.0.0", ) - go_repository( name = "com_github_azure_go_ansiterm", importpath = "github.com/Azure/go-ansiterm", @@ -222,21 +205,18 @@ def go_dependencies(): sum = "h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs=", version = "v14.2.0+incompatible", ) - go_repository( name = "com_github_azure_go_autorest_autorest_adal", importpath = "github.com/Azure/go-autorest/autorest/adal", sum = "h1:P8An8Z9rH1ldbOLdFpxYorgOt2sywL9V24dAwWHPuGc=", version = "v0.9.16", ) - go_repository( name = "com_github_azure_go_autorest_autorest_date", importpath = "github.com/Azure/go-autorest/autorest/date", sum = "h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw=", version = "v0.3.0", ) - go_repository( name = "com_github_azure_go_autorest_logger", importpath = "github.com/Azure/go-autorest/logger", @@ -255,14 +235,12 @@ def go_dependencies(): sum = "h1:WpB/QDNLpMw72xHJc34BNNykqSOeEJDAWkhf0u12/Jk=", version = "v1.1.1", ) - go_repository( name = "com_github_bazelbuild_rules_go", importpath = "github.com/bazelbuild/rules_go", - sum = "h1:JzlRxsFNhlX+g4drDRPhIaU5H5LnI978wdMJ0vK4I+k=", - version = "v0.41.0", + sum = "h1:ZPsHcsau3SXFQJOpqD+Ey9/RU6qjiUhdTAZI+Q8e2gY=", + version = "v0.45.0", ) - go_repository( name = "com_github_benbjohnson_clock", importpath = "github.com/benbjohnson/clock", @@ -281,14 +259,12 @@ def go_dependencies(): sum = "h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=", version = "v0.1.0", ) - go_repository( name = "com_github_bketelsen_crypt", importpath = "github.com/bketelsen/crypt", sum = "h1:+0HFd5KSZ/mm3JmhmrDukiId5iR6w4+BdFtfSy4yWIc=", version = "v0.0.3-0.20200106085610-5cbc8cc4026c", ) - go_repository( name = "com_github_burntsushi_toml", importpath = "github.com/BurntSushi/toml", @@ -301,7 +277,6 @@ def go_dependencies(): sum = "h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=", version = "v0.0.0-20160522181843-27f122750802", ) - go_repository( name = "com_github_cenkalti_backoff_v4", importpath = "github.com/cenkalti/backoff/v4", @@ -314,21 +289,18 @@ def go_dependencies(): sum = "h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=", version = "v0.4.1", ) - go_repository( name = "com_github_cespare_xxhash", importpath = "github.com/cespare/xxhash", sum = "h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=", version = "v1.1.0", ) - go_repository( name = "com_github_cespare_xxhash_v2", importpath = "github.com/cespare/xxhash/v2", sum = "h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=", version = "v2.2.0", ) - go_repository( name = "com_github_clickhouse_clickhouse_go", importpath = "github.com/ClickHouse/clickhouse-go", @@ -341,7 +313,6 @@ def go_dependencies(): sum = "h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI=", version = "v0.3.4", ) - go_repository( name = "com_github_cloudflare_golz4", importpath = "github.com/cloudflare/golz4", @@ -360,14 +331,12 @@ def go_dependencies(): sum = "h1:B/lvg4tQ5hfFZd4V2hcSfFVfUvAK6GSFKxIIzwnkv8g=", version = "v0.0.0-20220520190051-1e77728a1eaa", ) - go_repository( name = "com_github_cockroachdb_cockroach_go_v2", importpath = "github.com/cockroachdb/cockroach-go/v2", sum = "h1:3XzfSMuUT0wBe1a3o5C0eOTcArhmmFAg2Jzh/7hhKqo=", version = "v2.1.1", ) - go_repository( name = "com_github_coreos_bbolt", importpath = "github.com/coreos/bbolt", @@ -380,7 +349,6 @@ def go_dependencies(): sum = "h1:8F3hqu9fGYLBifCmRCJsicFqDx/D68Rt3q1JMazcgBQ=", version = "v3.3.13+incompatible", ) - go_repository( name = "com_github_coreos_go_semver", importpath = "github.com/coreos/go-semver", @@ -393,7 +361,6 @@ def go_dependencies(): sum = "h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=", version = "v0.0.0-20190321100706-95778dfbb74e", ) - go_repository( name = "com_github_coreos_pkg", importpath = "github.com/coreos/pkg", @@ -406,14 +373,12 @@ def go_dependencies(): sum = "h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=", version = "v2.0.0", ) - go_repository( name = "com_github_creack_pty", importpath = "github.com/creack/pty", sum = "h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=", version = "v1.1.9", ) - go_repository( name = "com_github_cznic_mathutil", importpath = "github.com/cznic/mathutil", @@ -426,7 +391,6 @@ def go_dependencies(): sum = "h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=", version = "v1.1.2", ) - go_repository( name = "com_github_davecgh_go_spew", importpath = "github.com/davecgh/go-spew", @@ -439,7 +403,6 @@ def go_dependencies(): sum = "h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y=", version = "v1.0.1", ) - go_repository( name = "com_github_decred_dcrd_dcrec_secp256k1_v4", importpath = "github.com/decred/dcrd/dcrec/secp256k1/v4", @@ -452,7 +415,6 @@ def go_dependencies(): sum = "h1:pPmn6qI9MuOtCz82WY2Xaw46EQjgvxednXXrP7g5Q2s=", version = "v1.12.4", ) - go_repository( name = "com_github_dgrijalva_jwt_go", importpath = "github.com/dgrijalva/jwt-go", @@ -485,7 +447,6 @@ def go_dependencies(): sum = "h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI=", version = "v1.2.0", ) - go_repository( name = "com_github_docker_distribution", importpath = "github.com/docker/distribution", @@ -498,14 +459,12 @@ def go_dependencies(): sum = "h1:Ugvxm7a8+Gz6vqQYQQ2W7GYq5EUPaAiuPgIfVyI3dYE=", version = "v20.10.24+incompatible", ) - go_repository( name = "com_github_docker_go_connections", importpath = "github.com/docker/go-connections", sum = "h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=", version = "v0.4.0", ) - go_repository( name = "com_github_docker_go_units", importpath = "github.com/docker/go-units", @@ -518,14 +477,12 @@ def go_dependencies(): sum = "h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQxaLAeM=", version = "v1.5.0", ) - go_repository( name = "com_github_edsrzf_mmap_go", importpath = "github.com/edsrzf/mmap-go", sum = "h1:aaQcKT9WumO6JEJcRyTqFVq4XUZiUcKR2/GI31TOcz8=", version = "v0.0.0-20170320065105-0bce6a688712", ) - go_repository( name = "com_github_envoyproxy_go_control_plane", importpath = "github.com/envoyproxy/go-control-plane", @@ -538,21 +495,18 @@ def go_dependencies(): sum = "h1:TvDcILLkjuZV3ER58VkBmncKsLUBqBDxra/XctCzuMM=", version = "v0.6.13", ) - go_repository( name = "com_github_fatih_color", importpath = "github.com/fatih/color", sum = "h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=", version = "v1.7.0", ) - go_repository( name = "com_github_form3tech_oss_jwt_go", importpath = "github.com/form3tech-oss/jwt-go", sum = "h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8=", version = "v3.2.5+incompatible", ) - go_repository( name = "com_github_fsnotify_fsnotify", importpath = "github.com/fsnotify/fsnotify", @@ -565,28 +519,24 @@ def go_dependencies(): sum = "h1:OeH75kBZcZa3ZE+zz/mFdJ2btt9FgqfjI7gIh9+5fvk=", version = "v1.17.0", ) - go_repository( name = "com_github_gabriel_vasile_mimetype", importpath = "github.com/gabriel-vasile/mimetype", sum = "h1:TRWk7se+TOjCYgRth7+1/OYLNiRNIotknkFtf/dnN7Q=", version = "v1.4.1", ) - go_repository( name = "com_github_getkin_kin_openapi", importpath = "github.com/getkin/kin-openapi", sum = "h1:lnLXx3bAG53EJVI4E/w0N8i1Y/vUZUEsnrXkgnfn7/Y=", version = "v0.112.0", ) - go_repository( name = "com_github_ghodss_yaml", importpath = "github.com/ghodss/yaml", sum = "h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=", version = "v1.0.0", ) - go_repository( name = "com_github_gin_contrib_sse", importpath = "github.com/gin-contrib/sse", @@ -599,7 +549,6 @@ def go_dependencies(): sum = "h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8=", version = "v1.8.1", ) - go_repository( name = "com_github_go_chi_chi_v5", importpath = "github.com/go-chi/chi/v5", @@ -618,35 +567,30 @@ def go_dependencies(): sum = "h1:wJyf2YZ/ohPvNJBwPOzZaQbyzwgMZZceE1m8FOzXLeA=", version = "v5.1.0", ) - go_repository( name = "com_github_go_gl_glfw", importpath = "github.com/go-gl/glfw", sum = "h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=", version = "v0.0.0-20190409004039-e6da0acd62b1", ) - go_repository( name = "com_github_go_kit_kit", importpath = "github.com/go-kit/kit", sum = "h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0=", version = "v0.8.0", ) - go_repository( name = "com_github_go_logfmt_logfmt", importpath = "github.com/go-logfmt/logfmt", sum = "h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA=", version = "v0.4.0", ) - go_repository( name = "com_github_go_openapi_jsonpointer", importpath = "github.com/go-openapi/jsonpointer", sum = "h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=", version = "v0.19.5", ) - go_repository( name = "com_github_go_openapi_swag", importpath = "github.com/go-openapi/swag", @@ -683,14 +627,12 @@ def go_dependencies(): sum = "h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=", version = "v1.8.0", ) - go_repository( name = "com_github_gobuffalo_here", importpath = "github.com/gobuffalo/here", sum = "h1:hYrd0a6gDmWxBM4TnrGw8mQg24iSVoIkHEk7FodQcBI=", version = "v0.6.0", ) - go_repository( name = "com_github_goccy_go_json", importpath = "github.com/goccy/go-json", @@ -709,14 +651,12 @@ def go_dependencies(): sum = "h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0=", version = "v0.0.0-20190726142602-4481cbc300e2", ) - go_repository( name = "com_github_gogo_protobuf", importpath = "github.com/gogo/protobuf", sum = "h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=", version = "v1.3.2", ) - go_repository( name = "com_github_golang_glog", importpath = "github.com/golang/glog", @@ -729,7 +669,6 @@ def go_dependencies(): sum = "h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=", version = "v0.0.0-20210331224755-41bb18bfe9da", ) - go_repository( name = "com_github_golang_jwt_jwt", importpath = "github.com/golang-jwt/jwt", @@ -748,7 +687,6 @@ def go_dependencies(): sum = "h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE=", version = "v5.0.0", ) - go_repository( name = "com_github_golang_migrate_migrate_v4", importpath = "github.com/golang-migrate/migrate/v4", @@ -758,14 +696,14 @@ def go_dependencies(): go_repository( name = "com_github_golang_mock", importpath = "github.com/golang/mock", - sum = "h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=", - version = "v1.6.0", + sum = "h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U=", + version = "v1.7.0-rc.1", ) go_repository( name = "com_github_golang_protobuf", importpath = "github.com/golang/protobuf", - sum = "h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=", - version = "v1.5.2", + sum = "h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=", + version = "v1.5.3", ) go_repository( name = "com_github_golang_snappy", @@ -785,7 +723,6 @@ def go_dependencies(): sum = "h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A=", version = "v0.1.0", ) - go_repository( name = "com_github_golangci_lint_1", importpath = "github.com/golangci/lint-1", @@ -804,35 +741,30 @@ def go_dependencies(): sum = "h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM=", version = "v2.0.8+incompatible", ) - go_repository( name = "com_github_google_go_cmp", importpath = "github.com/google/go-cmp", sum = "h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=", version = "v0.5.9", ) - go_repository( name = "com_github_google_go_github_v39", importpath = "github.com/google/go-github/v39", sum = "h1:rNNM311XtPOz5rDdsJXAp2o8F67X9FnROXTvto3aSnQ=", version = "v39.2.0", ) - go_repository( name = "com_github_google_go_querystring", importpath = "github.com/google/go-querystring", sum = "h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=", version = "v1.1.0", ) - go_repository( name = "com_github_google_martian", importpath = "github.com/google/martian", sum = "h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=", version = "v2.1.0+incompatible", ) - go_repository( name = "com_github_google_pprof", importpath = "github.com/google/pprof", @@ -845,7 +777,6 @@ def go_dependencies(): sum = "h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=", version = "v0.1.0", ) - go_repository( name = "com_github_google_uuid", importpath = "github.com/google/uuid", @@ -858,7 +789,6 @@ def go_dependencies(): sum = "h1:RY7tHKZcRlk788d5WSo/e83gOyyy742E8GSs771ySpg=", version = "v0.2.1", ) - go_repository( name = "com_github_googleapis_gax_go_v2", build_file_proto_mode = "disable_global", @@ -866,7 +796,6 @@ def go_dependencies(): sum = "h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ=", version = "v2.7.0", ) - go_repository( name = "com_github_gopherjs_gopherjs", importpath = "github.com/gopherjs/gopherjs", @@ -879,7 +808,6 @@ def go_dependencies(): sum = "h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg=", version = "v1.4.2", ) - go_repository( name = "com_github_gorilla_mux", importpath = "github.com/gorilla/mux", @@ -892,7 +820,6 @@ def go_dependencies(): sum = "h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=", version = "v1.4.2", ) - go_repository( name = "com_github_grpc_ecosystem_go_grpc_middleware", importpath = "github.com/grpc-ecosystem/go-grpc-middleware", @@ -917,7 +844,6 @@ def go_dependencies(): sum = "h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=", version = "v0.0.0-20161001094733-a6f4afe4910c", ) - go_repository( name = "com_github_hailocab_go_hostpool", importpath = "github.com/hailocab/go-hostpool", @@ -948,14 +874,12 @@ def go_dependencies(): sum = "h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=", version = "v0.5.1", ) - go_repository( name = "com_github_hashicorp_go_immutable_radix", importpath = "github.com/hashicorp/go-immutable-radix", sum = "h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0=", version = "v1.0.0", ) - go_repository( name = "com_github_hashicorp_go_msgpack", importpath = "github.com/hashicorp/go-msgpack", @@ -974,14 +898,12 @@ def go_dependencies(): sum = "h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw=", version = "v0.0.1", ) - go_repository( name = "com_github_hashicorp_go_rootcerts", importpath = "github.com/hashicorp/go-rootcerts", sum = "h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI=", version = "v1.0.0", ) - go_repository( name = "com_github_hashicorp_go_sockaddr", importpath = "github.com/hashicorp/go-sockaddr", @@ -1000,7 +922,6 @@ def go_dependencies(): sum = "h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE=", version = "v1.0.1", ) - go_repository( name = "com_github_hashicorp_golang_lru", importpath = "github.com/hashicorp/golang-lru", @@ -1037,21 +958,18 @@ def go_dependencies(): sum = "h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0=", version = "v0.8.2", ) - go_repository( name = "com_github_inconshreveable_mousetrap", importpath = "github.com/inconshreveable/mousetrap", sum = "h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=", version = "v1.0.0", ) - go_repository( name = "com_github_invopop_yaml", importpath = "github.com/invopop/yaml", sum = "h1:YW3WGUoJEXYfzWBjn00zIlrw7brGVD0fUKRYDPAPhrc=", version = "v0.1.0", ) - go_repository( name = "com_github_jackc_chunkreader_v2", importpath = "github.com/jackc/chunkreader/v2", @@ -1076,14 +994,12 @@ def go_dependencies(): sum = "h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=", version = "v1.0.0", ) - go_repository( name = "com_github_jackc_pgpassfile", importpath = "github.com/jackc/pgpassfile", sum = "h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=", version = "v1.0.0", ) - go_repository( name = "com_github_jackc_pgproto3_v2", importpath = "github.com/jackc/pgproto3/v2", @@ -1114,14 +1030,12 @@ def go_dependencies(): sum = "h1:5I9etrGkLrN+2XPCsi6XLlV5DITbSL/xBZdmAxFcXPI=", version = "v5.5.1", ) - go_repository( name = "com_github_jackc_puddle_v2", importpath = "github.com/jackc/puddle/v2", sum = "h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk=", version = "v2.2.1", ) - go_repository( name = "com_github_jmespath_go_jmespath", importpath = "github.com/jmespath/go-jmespath", @@ -1134,21 +1048,18 @@ def go_dependencies(): sum = "h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=", version = "v1.5.1", ) - go_repository( name = "com_github_jonboulle_clockwork", importpath = "github.com/jonboulle/clockwork", sum = "h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo=", version = "v0.1.0", ) - go_repository( name = "com_github_josharian_intern", importpath = "github.com/josharian/intern", sum = "h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=", version = "v1.0.0", ) - go_repository( name = "com_github_json_iterator_go", importpath = "github.com/json-iterator/go", @@ -1173,7 +1084,6 @@ def go_dependencies(): sum = "h1:TDTW5Yz1mjftljbcKqRcrYhd4XeOoI98t+9HbQbYf7g=", version = "v1.2.0", ) - go_repository( name = "com_github_k0kubun_pp", importpath = "github.com/k0kubun/pp", @@ -1186,7 +1096,6 @@ def go_dependencies(): sum = "h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=", version = "v0.0.0-20190222173326-2bc1f35cddc0", ) - go_repository( name = "com_github_kballard_go_shellquote", importpath = "github.com/kballard/go-shellquote", @@ -1211,7 +1120,6 @@ def go_dependencies(): sum = "h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4=", version = "v1.3.2", ) - go_repository( name = "com_github_klauspost_compress", importpath = "github.com/klauspost/compress", @@ -1224,21 +1132,18 @@ def go_dependencies(): sum = "h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=", version = "v2.0.9", ) - go_repository( name = "com_github_konsorten_go_windows_terminal_sequences", importpath = "github.com/konsorten/go-windows-terminal-sequences", sum = "h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=", version = "v1.0.1", ) - go_repository( name = "com_github_kr_logfmt", importpath = "github.com/kr/logfmt", sum = "h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=", version = "v0.0.0-20140226030751-b84e30acd515", ) - go_repository( name = "com_github_kr_pretty", importpath = "github.com/kr/pretty", @@ -1269,14 +1174,12 @@ def go_dependencies(): sum = "h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=", version = "v1.1.0", ) - go_repository( name = "com_github_labstack_echo_v4", importpath = "github.com/labstack/echo/v4", sum = "h1:GliPYSpzGKlyOhqIbG8nmHBo3i1saKWFOgh41AN3b+Y=", version = "v4.9.1", ) - go_repository( name = "com_github_labstack_gommon", importpath = "github.com/labstack/gommon", @@ -1313,7 +1216,6 @@ def go_dependencies(): sum = "h1:bAZymwoZQb+Oq8MEbyipag7iSq6YIga8Wj6GOiJGdI8=", version = "v1.0.4", ) - go_repository( name = "com_github_lestrrat_go_iter", importpath = "github.com/lestrrat-go/iter", @@ -1332,7 +1234,6 @@ def go_dependencies(): sum = "h1:qm02Xd/pIWSv70vVEutr3Zt7QULnnNRpM4N5+8hQBFs=", version = "v2.0.14", ) - go_repository( name = "com_github_lestrrat_go_option", importpath = "github.com/lestrrat-go/option", @@ -1345,28 +1246,24 @@ def go_dependencies(): sum = "h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=", version = "v1.10.9", ) - go_repository( name = "com_github_magiconair_properties", importpath = "github.com/magiconair/properties", sum = "h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=", version = "v1.8.1", ) - go_repository( name = "com_github_mailru_easyjson", importpath = "github.com/mailru/easyjson", sum = "h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=", version = "v0.7.7", ) - go_repository( name = "com_github_markbates_pkger", importpath = "github.com/markbates/pkger", sum = "h1:3MPelV53RnGSW07izx5xGxl4e/sdRD6zqseIk0rMASY=", version = "v0.15.1", ) - go_repository( name = "com_github_matryer_moq", importpath = "github.com/matryer/moq", @@ -1379,14 +1276,12 @@ def go_dependencies(): sum = "h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=", version = "v0.1.13", ) - go_repository( name = "com_github_mattn_go_isatty", importpath = "github.com/mattn/go-isatty", sum = "h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=", version = "v0.0.17", ) - go_repository( name = "com_github_mattn_go_sqlite3", importpath = "github.com/mattn/go-sqlite3", @@ -1405,14 +1300,12 @@ def go_dependencies(): sum = "h1:k2p2uuG8T5T/7Hp7/e3vMGTnnR0sU4h8d1CcC71iLHU=", version = "v1.0.0", ) - go_repository( name = "com_github_microsoft_go_winio", importpath = "github.com/Microsoft/go-winio", sum = "h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=", version = "v0.6.1", ) - go_repository( name = "com_github_miekg_dns", importpath = "github.com/miekg/dns", @@ -1431,14 +1324,12 @@ def go_dependencies(): sum = "h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=", version = "v0.0.0-20190812172519-36a3d3bbc4f3", ) - go_repository( name = "com_github_mitchellh_cli", importpath = "github.com/mitchellh/cli", sum = "h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=", version = "v1.0.0", ) - go_repository( name = "com_github_mitchellh_go_homedir", importpath = "github.com/mitchellh/go-homedir", @@ -1451,7 +1342,6 @@ def go_dependencies(): sum = "h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0=", version = "v1.0.0", ) - go_repository( name = "com_github_mitchellh_gox", importpath = "github.com/mitchellh/gox", @@ -1470,14 +1360,12 @@ def go_dependencies(): sum = "h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=", version = "v1.1.2", ) - go_repository( name = "com_github_moby_term", importpath = "github.com/moby/term", sum = "h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=", version = "v0.5.0", ) - go_repository( name = "com_github_modern_go_concurrent", importpath = "github.com/modern-go/concurrent", @@ -1502,7 +1390,6 @@ def go_dependencies(): sum = "h1:r3y12KyNxj/Sb/iOE46ws+3mS1+MZca1wlHQFPsY/JU=", version = "v0.7.0", ) - go_repository( name = "com_github_morikuni_aec", importpath = "github.com/morikuni/aec", @@ -1515,7 +1402,6 @@ def go_dependencies(): sum = "h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs=", version = "v0.2.1", ) - go_repository( name = "com_github_mutecomm_go_sqlcipher_v4", importpath = "github.com/mutecomm/go-sqlcipher/v4", @@ -1528,42 +1414,36 @@ def go_dependencies(): sum = "h1:F9x/1yl3T2AeKLr2AMdilSD8+f9bvMnNN8VS5iDtovc=", version = "v0.0.0-20161129095857-cc309e4a2223", ) - go_repository( name = "com_github_nakagami_firebirdsql", importpath = "github.com/nakagami/firebirdsql", sum = "h1:P48LjvUQpTReR3TQRbxSeSBsMXzfK0uol7eRcr7VBYQ=", version = "v0.0.0-20190310045651-3c02a58cfed8", ) - go_repository( name = "com_github_namsral_flag", importpath = "github.com/namsral/flag", sum = "h1:b2ScHhoCUkbsq0d2C15Mv+VU8bl8hAXV8arnWiOHNZs=", version = "v1.7.4-pre", ) - go_repository( name = "com_github_neo4j_neo4j_go_driver", importpath = "github.com/neo4j/neo4j-go-driver", sum = "h1:fhFP5RliM2HW/8XdcO5QngSfFli9GcRIpMXvypTQt6E=", version = "v1.8.1-0.20200803113522-b626aa943eba", ) - go_repository( name = "com_github_niemeyer_pretty", importpath = "github.com/niemeyer/pretty", sum = "h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=", version = "v0.0.0-20200227124842-a10e7caefd8e", ) - go_repository( name = "com_github_oklog_ulid", importpath = "github.com/oklog/ulid", sum = "h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=", version = "v1.3.1", ) - go_repository( name = "com_github_oneofone_xxhash", importpath = "github.com/OneOfOne/xxhash", @@ -1594,7 +1474,6 @@ def go_dependencies(): sum = "h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM=", version = "v1.0.2", ) - go_repository( name = "com_github_pascaldekloe_goe", importpath = "github.com/pascaldekloe/goe", @@ -1607,14 +1486,12 @@ def go_dependencies(): sum = "h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=", version = "v1.2.0", ) - go_repository( name = "com_github_pelletier_go_toml_v2", importpath = "github.com/pelletier/go-toml/v2", sum = "h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg=", version = "v2.0.5", ) - go_repository( name = "com_github_pierrec_lz4_v4", importpath = "github.com/pierrec/lz4/v4", @@ -1627,14 +1504,12 @@ def go_dependencies(): sum = "h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=", version = "v0.0.0-20210911075715-681adbf594b8", ) - go_repository( name = "com_github_pkg_errors", importpath = "github.com/pkg/errors", sum = "h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=", version = "v0.9.1", ) - go_repository( name = "com_github_pmezard_go_difflib", importpath = "github.com/pmezard/go-difflib", @@ -1647,7 +1522,6 @@ def go_dependencies(): sum = "h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=", version = "v1.1.1", ) - go_repository( name = "com_github_prometheus_client_golang", importpath = "github.com/prometheus/client_golang", @@ -1678,7 +1552,6 @@ def go_dependencies(): sum = "h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=", version = "v0.7.1", ) - go_repository( name = "com_github_remyoudompheng_bigfft", importpath = "github.com/remyoudompheng/bigfft", @@ -1697,28 +1570,24 @@ def go_dependencies(): sum = "h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=", version = "v1.11.0", ) - go_repository( name = "com_github_rs_cors", importpath = "github.com/rs/cors", sum = "h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE=", version = "v1.9.0", ) - go_repository( name = "com_github_russross_blackfriday_v2", importpath = "github.com/russross/blackfriday/v2", sum = "h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=", version = "v2.0.1", ) - go_repository( name = "com_github_ryanuber_columnize", importpath = "github.com/ryanuber/columnize", sum = "h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M=", version = "v0.0.0-20160712163229-9b3edd62028f", ) - go_repository( name = "com_github_sean_seed", importpath = "github.com/sean-/seed", @@ -1731,7 +1600,6 @@ def go_dependencies(): sum = "h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=", version = "v1.2.0", ) - go_repository( name = "com_github_shopspring_decimal", importpath = "github.com/shopspring/decimal", @@ -1762,7 +1630,6 @@ def go_dependencies(): sum = "h1:wxI10yCtptIyx1XuwaJy9T34Y7sGSdU64tIoNCuGVO0=", version = "v0.0.5", ) - go_repository( name = "com_github_silicon_ally_zaphttplog", importpath = "github.com/Silicon-Ally/zaphttplog", @@ -1841,7 +1708,6 @@ def go_dependencies(): sum = "h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM=", version = "v1.7.0", ) - go_repository( name = "com_github_stretchr_objx", importpath = "github.com/stretchr/objx", @@ -1860,21 +1726,18 @@ def go_dependencies(): sum = "h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=", version = "v1.2.0", ) - go_repository( name = "com_github_tmc_grpc_websocket_proxy", importpath = "github.com/tmc/grpc-websocket-proxy", sum = "h1:LnC5Kc/wtumK+WB441p7ynQJzVuNRJiqddSIE3IlSEQ=", version = "v0.0.0-20190109142713-0ad062ec5ee5", ) - go_repository( name = "com_github_ugorji_go_codec", importpath = "github.com/ugorji/go/codec", sum = "h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=", version = "v1.2.7", ) - go_repository( name = "com_github_valyala_bytebufferpool", importpath = "github.com/valyala/bytebufferpool", @@ -1887,7 +1750,6 @@ def go_dependencies(): sum = "h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=", version = "v1.2.2", ) - go_repository( name = "com_github_xanzy_go_gitlab", importpath = "github.com/xanzy/go-gitlab", @@ -1912,14 +1774,12 @@ def go_dependencies(): sum = "h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs=", version = "v1.0.3", ) - go_repository( name = "com_github_xiang90_probing", importpath = "github.com/xiang90/probing", sum = "h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=", version = "v0.0.0-20190116061207-43a291ad63a2", ) - go_repository( name = "com_github_youmark_pkcs8", importpath = "github.com/youmark/pkcs8", @@ -1932,14 +1792,12 @@ def go_dependencies(): sum = "h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=", version = "v1.4.13", ) - go_repository( name = "com_github_zeebo_xxh3", importpath = "github.com/zeebo/xxh3", sum = "h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=", version = "v1.0.2", ) - go_repository( name = "com_gitlab_nyarla_go_crypt", importpath = "gitlab.com/nyarla/go-crypt", @@ -1952,14 +1810,12 @@ def go_dependencies(): sum = "h1:qkj22L7bgkl6vIeZDlOY2po43Mx/TIa2Wsa7VR+PEww=", version = "v0.107.0", ) - go_repository( name = "com_google_cloud_go_bigquery", importpath = "cloud.google.com/go/bigquery", sum = "h1:hL+ycaJpVE9M7nLoiXb/Pn10ENE2u+oddxbD8uu0ZVU=", version = "v1.0.1", ) - go_repository( name = "com_google_cloud_go_compute", importpath = "cloud.google.com/go/compute", @@ -1972,91 +1828,78 @@ def go_dependencies(): sum = "h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY=", version = "v0.2.3", ) - go_repository( name = "com_google_cloud_go_datastore", importpath = "cloud.google.com/go/datastore", sum = "h1:Kt+gOPPp2LEPWp8CSfxhsM8ik9CcyE/gYu+0r+RnZvM=", version = "v1.0.0", ) - go_repository( name = "com_google_cloud_go_firestore", importpath = "cloud.google.com/go/firestore", sum = "h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY=", version = "v1.1.0", ) - go_repository( name = "com_google_cloud_go_iam", importpath = "cloud.google.com/go/iam", sum = "h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk=", version = "v0.8.0", ) - go_repository( name = "com_google_cloud_go_longrunning", importpath = "cloud.google.com/go/longrunning", sum = "h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs=", version = "v0.3.0", ) - go_repository( name = "com_google_cloud_go_pubsub", importpath = "cloud.google.com/go/pubsub", sum = "h1:W9tAK3E57P75u0XLLR82LZyw8VpAnhmyTOxW9qzmyj8=", version = "v1.0.1", ) - go_repository( name = "com_google_cloud_go_spanner", importpath = "cloud.google.com/go/spanner", sum = "h1:fba7k2apz4aI0BE59/kbeaJ78dPOXSz2PSuBIfe7SBM=", version = "v1.44.0", ) - go_repository( name = "com_google_cloud_go_storage", importpath = "cloud.google.com/go/storage", sum = "h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ=", version = "v1.27.0", ) - go_repository( name = "com_lukechampine_uint128", importpath = "lukechampine.com/uint128", sum = "h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=", version = "v1.2.0", ) - go_repository( name = "com_shuralyov_dmitri_gpu_mtl", importpath = "dmitri.shuralyov.com/gpu/mtl", sum = "h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=", version = "v0.0.0-20190408044501-666a987793e9", ) - go_repository( name = "in_gopkg_alecthomas_kingpin_v2", importpath = "gopkg.in/alecthomas/kingpin.v2", sum = "h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=", version = "v2.2.6", ) - go_repository( name = "in_gopkg_check_v1", importpath = "gopkg.in/check.v1", sum = "h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=", version = "v1.0.0-20201130134442-10cb98267c6c", ) - go_repository( name = "in_gopkg_errgo_v2", importpath = "gopkg.in/errgo.v2", sum = "h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=", version = "v2.1.0", ) - go_repository( name = "in_gopkg_inf_v0", importpath = "gopkg.in/inf.v0", @@ -2069,14 +1912,12 @@ def go_dependencies(): sum = "h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=", version = "v1.51.0", ) - go_repository( name = "in_gopkg_resty_v1", importpath = "gopkg.in/resty.v1", sum = "h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=", version = "v1.12.0", ) - go_repository( name = "in_gopkg_yaml_v2", importpath = "gopkg.in/yaml.v2", @@ -2095,21 +1936,18 @@ def go_dependencies(): sum = "h1:Z/90sZLPOeCy2PwprqkFa25PdkusRzaj9P8zm/KNyvk=", version = "v1.3.2", ) - go_repository( name = "io_opencensus_go", importpath = "go.opencensus.io", sum = "h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=", version = "v0.24.0", ) - go_repository( name = "io_rsc_binaryregexp", importpath = "rsc.io/binaryregexp", sum = "h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=", version = "v0.2.0", ) - go_repository( name = "org_golang_google_api", importpath = "google.golang.org/api", @@ -2122,14 +1960,12 @@ def go_dependencies(): sum = "h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=", version = "v1.6.7", ) - go_repository( name = "org_golang_google_genproto", importpath = "google.golang.org/genproto", sum = "h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=", version = "v0.0.0-20230110181048-76db0878b65f", ) - go_repository( name = "org_golang_google_grpc", build_file_proto_mode = "disable_global", @@ -2137,12 +1973,17 @@ def go_dependencies(): sum = "h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=", version = "v1.51.0", ) - + go_repository( + name = "org_golang_google_grpc_cmd_protoc_gen_go_grpc", + importpath = "google.golang.org/grpc/cmd/protoc-gen-go-grpc", + sum = "h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA=", + version = "v1.3.0", + ) go_repository( name = "org_golang_google_protobuf", importpath = "google.golang.org/protobuf", - sum = "h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=", - version = "v1.28.1", + sum = "h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=", + version = "v1.31.0", ) go_repository( name = "org_golang_x_crypto", @@ -2174,18 +2015,17 @@ def go_dependencies(): sum = "h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=", version = "v0.0.0-20190719004257-d2bd2a29d028", ) - go_repository( name = "org_golang_x_mod", importpath = "golang.org/x/mod", - sum = "h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=", - version = "v0.10.0", + sum = "h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=", + version = "v0.14.0", ) go_repository( name = "org_golang_x_net", importpath = "golang.org/x/net", - sum = "h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=", - version = "v0.17.0", + sum = "h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg=", + version = "v0.18.0", ) go_repository( name = "org_golang_x_oauth2", @@ -2199,7 +2039,6 @@ def go_dependencies(): sum = "h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=", version = "v0.6.0", ) - go_repository( name = "org_golang_x_sys", importpath = "golang.org/x/sys", @@ -2227,8 +2066,8 @@ def go_dependencies(): go_repository( name = "org_golang_x_tools", importpath = "golang.org/x/tools", - sum = "h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=", - version = "v0.9.1", + sum = "h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8=", + version = "v0.15.0", ) go_repository( name = "org_golang_x_xerrors", @@ -2236,7 +2075,6 @@ def go_dependencies(): sum = "h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=", version = "v0.0.0-20220907171357-04be3eba64a2", ) - go_repository( name = "org_modernc_b", importpath = "modernc.org/b", @@ -2279,7 +2117,6 @@ def go_dependencies(): sum = "h1:wWpDlbK8ejRfSyi0frMyhilD3JBvtcx2AdGDnU+JtsE=", version = "v1.0.0", ) - go_repository( name = "org_modernc_internal", importpath = "modernc.org/internal", @@ -2340,14 +2177,12 @@ def go_dependencies(): sum = "h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=", version = "v1.1.3", ) - go_repository( name = "org_modernc_token", importpath = "modernc.org/token", sum = "h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk=", version = "v1.0.0", ) - go_repository( name = "org_modernc_zappy", importpath = "modernc.org/zappy", @@ -2360,7 +2195,6 @@ def go_dependencies(): sum = "h1:ny3p0reEpgsR2cfA5cjgwFZg3Cv/ofFh/8jbhGtz9VI=", version = "v1.7.5", ) - go_repository( name = "org_uber_go_atomic", importpath = "go.uber.org/atomic", @@ -2379,7 +2213,6 @@ def go_dependencies(): sum = "h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=", version = "v1.11.0", ) - go_repository( name = "org_uber_go_zap", importpath = "go.uber.org/zap", diff --git a/go.mod b/go.mod index 6ef2c43..87a3e60 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/RMI/pacta -go 1.20 +go 1.21 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 @@ -11,7 +11,7 @@ require ( github.com/Silicon-Ally/idgen v1.0.1 github.com/Silicon-Ally/testpgx v0.0.5 github.com/Silicon-Ally/zaphttplog v0.0.0-20230719190744-b544469cb197 - github.com/bazelbuild/rules_go v0.41.0 + github.com/bazelbuild/rules_go v0.45.0 github.com/deepmap/oapi-codegen v1.12.4 github.com/dimuska139/go-email-normalizer v1.2.1 github.com/docker/docker v20.10.24+incompatible @@ -77,12 +77,12 @@ require ( go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.18.0 // indirect - golang.org/x/mod v0.10.0 // indirect - golang.org/x/net v0.17.0 // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.18.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.9.1 // indirect + golang.org/x/tools v0.15.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index e3ad9db..71b9dae 100644 --- a/go.sum +++ b/go.sum @@ -50,6 +50,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/bazelbuild/rules_go v0.41.0 h1:JzlRxsFNhlX+g4drDRPhIaU5H5LnI978wdMJ0vK4I+k= github.com/bazelbuild/rules_go v0.41.0/go.mod h1:TMHmtfpvyfsxaqfL9WnahCsXMWDMICTw7XeK9yVb+YU= +github.com/bazelbuild/rules_go v0.45.0 h1:ZPsHcsau3SXFQJOpqD+Ey9/RU6qjiUhdTAZI+Q8e2gY= +github.com/bazelbuild/rules_go v0.45.0/go.mod h1:Dhcz716Kqg1RHNWos+N6MlXNkjNP2EwZQ0LukRKJfMs= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -394,6 +396,7 @@ golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 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-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -419,6 +422,8 @@ golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= +golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -510,6 +515,8 @@ golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= +golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/scripts/run_db.sh b/scripts/run_db.sh index ab32abc..7c91576 100755 --- a/scripts/run_db.sh +++ b/scripts/run_db.sh @@ -71,6 +71,7 @@ mkdir -p "$SOCKET_DIR/sub" # We turn off ports and listen solely on our Unix socket. docker run \ --name local-postgres \ + --userns keep-id \ --rm \ --interactive --tty \ --detach \ diff --git a/scripts/shared/migrate.sh b/scripts/shared/migrate.sh index 34c08ed..d4bc4f0 100644 --- a/scripts/shared/migrate.sh +++ b/scripts/shared/migrate.sh @@ -8,5 +8,5 @@ function migrate_db { DSN="$1" SUBCOMMAND="${2:-apply}" - bazel-bin/cmd/tools/migratesqldb/migratesqldb_/migratesqldb --dsn="$DSN" "$SUBCOMMAND" + bazel run //cmd/tools/migratesqldb -- --dsn="$DSN" "$SUBCOMMAND" }