From 054d68865af5d95c86929501f80eaf03a629c6d4 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Tue, 3 Oct 2023 11:32:52 -0400 Subject: [PATCH 01/11] create log file creator --- .../log_file_creator/log_file_creator.go | 48 +++++++++++++++++++ .../log_file_creator/log_file_creator_test.go | 32 +++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go create mode 100644 engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go new file mode 100644 index 0000000000..9f7969d724 --- /dev/null +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -0,0 +1,48 @@ +package log_file_creator + +import ( + "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface" + "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/logs_clock" + "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem" +) + +// LogFileCreator is responsible for creating file paths for services across all enclaves. +type LogFileCreator struct { + time logs_clock.LogsClock + + kurtosisBackend backend_interface.KurtosisBackend + + filesystem volume_filesystem.VolumeFilesystem +} + +func NewLogFileCreator( + time logs_clock.LogsClock, + kurtosisBackend backend_interface.KurtosisBackend, + filesystem volume_filesystem.VolumeFilesystem) *LogFileCreator { + return &LogFileCreator{ + time: time, + kurtosisBackend: kurtosisBackend, + filesystem: filesystem, + } +} + +// CreateLogFilePathsIdempotently creates three log files for every service across all running enclaves. +// The first is a file with the name ending in the uuid of the service. +// The other two file paths are symlinks to the uuid file, but the file names end with the shortened uuid and service name. +// The file paths are created idempotently meaning if they already exist, new ones are not created. +// If files exist for the shortened uuid and service name files, and they are not symlinks, they are removed and symlink files +// are created. +func (creator *LogFileCreator) CreateLogFilePathsIdempotently() { + //- engine would query all the enclaves + //- engine would query all the services in that enclave + //- collect all the enclave uuids and service names/uuids/shortened uuids + // + //- determine the current year and time + // + //- engine would create a file for the uuid + //- idempotently + //- engine would create a symlink to symlink the shortened uuid to the uuid filepath + //- if an actual file already exists, remove it and create symlink + //- engine would create a symlink to symlink the name to the uuid filepath + //- if an actual file already exists, remove it and create symlink +} diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go new file mode 100644 index 0000000000..0221bdb8b3 --- /dev/null +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go @@ -0,0 +1,32 @@ +package log_file_creator + +import "testing" + +func TestLogFileCreatorCreatesNewFilePaths(t *testing.T) { + // mock the filesystem + + // mock the time + + // mock kurtosis backend GetUserServices call + + // execute create new file paths function + + // check they are added to the mocked filesystem +} + +func TestLogFileCreatorCreatesFilePathsIdempotently(t *testing.T) { + // mock the filesystem + // add file paths to the file system + + // mock the time + + // mock kurtosis backend GetUserServices call + + // execute create new file paths function + + // check that no new files are added +} + +func TestLogFileCreatorCreatesNewFilePathsForOnlyNonExistentFilePaths(t *testing.T) { + +} From 69a677a70d15e25f6ef6b8b7a6927dc82929dd94 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Wed, 4 Oct 2023 20:53:42 -0400 Subject: [PATCH 02/11] impl create log files --- .../log_file_creator/log_file_creator.go | 123 +++++++++++++++--- 1 file changed, 103 insertions(+), 20 deletions(-) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index 9f7969d724..684cf0a2a2 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -1,18 +1,32 @@ package log_file_creator import ( + "context" + "fmt" "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface" + "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface/objects/enclave" + "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface/objects/service" + "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/uuid_generator" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/logs_clock" + "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem" + "github.com/kurtosis-tech/stacktrace" + "strconv" ) -// LogFileCreator is responsible for creating file paths for services across all enclaves. +// LogFileCreator is responsible for creating the necessary file paths for service logs across all enclaves. +// Context: +// The LogsAggregator is configured to write logs to three different log file paths, one for uuid, service name, and shortened uuid. +// This is so that the logs are retrievable by each identifier even when enclaves are stopped. +// (More context on this here: https://github.com/kurtosis-tech/kurtosis/pull/1213) +// To prevent storing duplicate logs, the LogFileCreator will ensure that the service name and short uuid log files are just +// symlinks to the uuid log file path. type LogFileCreator struct { time logs_clock.LogsClock - kurtosisBackend backend_interface.KurtosisBackend - filesystem volume_filesystem.VolumeFilesystem + + kurtosisBackend backend_interface.KurtosisBackend } func NewLogFileCreator( @@ -26,23 +40,92 @@ func NewLogFileCreator( } } -// CreateLogFilePathsIdempotently creates three log files for every service across all running enclaves. +// CreateLogFiles creates three log files for every service across all running enclaves. // The first is a file with the name ending in the uuid of the service. -// The other two file paths are symlinks to the uuid file, but the file names end with the shortened uuid and service name. +// The other two file paths are symlinks to the uuid file, ending with the shortened uuid and service name respectively. // The file paths are created idempotently meaning if they already exist, new ones are not created. -// If files exist for the shortened uuid and service name files, and they are not symlinks, they are removed and symlink files -// are created. -func (creator *LogFileCreator) CreateLogFilePathsIdempotently() { - //- engine would query all the enclaves - //- engine would query all the services in that enclave - //- collect all the enclave uuids and service names/uuids/shortened uuids - // - //- determine the current year and time - // - //- engine would create a file for the uuid - //- idempotently - //- engine would create a symlink to symlink the shortened uuid to the uuid filepath - //- if an actual file already exists, remove it and create symlink - //- engine would create a symlink to symlink the name to the uuid filepath - //- if an actual file already exists, remove it and create symlink +// If files exist for the shortened uuid and service name files, but they are not symlinks, they are removed and symlink files +// are created to prevent duplicate log storage. +func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { + var err error + + // get year and time for the file paths + year, week := creator.time.Now().ISOWeek() + + // collect enclave and service info for the file paths + enclaveToServicesMap, err := creator.getEnclaveAndServiceInfo(ctx) + if err != nil { + // already wrapped with propagate + return err + } + + for enclaveUuid, serviceRegistrations := range enclaveToServicesMap { + for _, serviceRegistration := range serviceRegistrations { + serviceUuidStr := string(serviceRegistration.GetUUID()) + serviceNameStr := string(serviceRegistration.GetName()) + serviceShortUuidStr := uuid_generator.ShortenedUUIDString(serviceUuidStr) + + // create log file for the uuid idempotently + serviceUuidFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceUuidStr) + _, err = creator.filesystem.Open(serviceUuidFilePathStr) + if err != nil { + return stacktrace.Propagate(err, "An error occurred creating log file path '%v'.", serviceUuidFilePathStr) + } + + // create symlinks for name and shortened uuid log files + serviceNameFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceNameStr) + err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceNameFilePathStr) + if err != nil { + return err + } + + serviceShortUuidFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceShortUuidStr) + err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceShortUuidFilePathStr) + if err != nil { + return err + } + } + } + + return nil +} + +func (creator *LogFileCreator) getEnclaveAndServiceInfo(ctx context.Context) (map[enclave.EnclaveUUID][]*service.ServiceRegistration, error) { + var enclaveToServicesMap map[enclave.EnclaveUUID][]*service.ServiceRegistration + + // collect info of all services in enclaves + enclaves, err := creator.kurtosisBackend.GetEnclaves(ctx, &enclave.EnclaveFilters{}) + if err != nil { + return nil, stacktrace.Propagate(err, "An error occurred while trying to get all enclaves from kurtosis backend.") + } + for enclaveUuid, _ := range enclaves { + var serviceRegistrations []*service.ServiceRegistration + + enclaveServices, err := creator.kurtosisBackend.GetUserServices(ctx, enclaveUuid, &service.ServiceFilters{}) + if err != nil { + return nil, stacktrace.Propagate(err, "An error occurred while trying to get user services for enclave '%v' from kurtosis backend.", enclaveUuid) + } + for _, serviceInfo := range enclaveServices { + serviceRegistrations = append(serviceRegistrations, serviceInfo.GetRegistration()) + } + + enclaveToServicesMap[enclaveUuid] = serviceRegistrations + } + return enclaveToServicesMap, nil +} + +func (creator *LogFileCreator) createSymlinkLogFile(targetFilePath, symlinkFilePath string) error { + // in case a log file (symlink or not) already exists, remove it + if err := creator.filesystem.RemoveAll(symlinkFilePath); err != nil { + return stacktrace.Propagate(err, "An error occurred attempting to remove an existing log file at the symlink file path '%v'.", symlinkFilePath) + } + if err := creator.filesystem.Symlink(targetFilePath, symlinkFilePath); err != nil { + return stacktrace.Propagate(err, "An error occurred creating a symlink file path '%v' for target file path '%v'.", symlinkFilePath, targetFilePath) + } + return nil +} + +// creates a filepath of format //year/week//serviceIdentifier. +func getFilepathStr(year, week int, enclaveUuid, serviceIdentifier string) string { + return fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(year), strconv.Itoa(week), enclaveUuid, serviceIdentifier, volume_consts.Filetype) } From 89c79be2e09e00bb225331e13515389f307f87e6 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Wed, 4 Oct 2023 20:54:02 -0400 Subject: [PATCH 03/11] adjust volume fs for symlinks --- .../volume_filesystem/volume_filesystem.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go index 1da21592fc..c82b1a8418 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go @@ -17,6 +17,7 @@ type VolumeFilesystem interface { Open(name string) (VolumeFile, error) Stat(name string) (VolumeFileInfo, error) RemoveAll(path string) error + Symlink(target, link string) error } type VolumeFile interface { @@ -25,6 +26,7 @@ type VolumeFile interface { } type VolumeFileInfo interface { + Mode() os.FileMode } // OsVolumeFilesystem is an implementation of the filesystem using disk @@ -46,6 +48,10 @@ func (fs *OsVolumeFilesystem) RemoveAll(path string) error { return os.RemoveAll(path) } +func (fs *OsVolumeFilesystem) Symlink(target, link string) error { + return os.Symlink(target, link) +} + // MockedVolumeFilesystem is an implementation used for unit testing type MockedVolumeFilesystem struct { // we use an underlying map filesystem that's easy to mock file data with @@ -78,6 +84,13 @@ func (fs *MockedVolumeFilesystem) RemoveAll(path string) error { return nil } +func (fs *MockedVolumeFilesystem) Symlink(target, link string) error { + // fstest.MapFs doesn't support mocking symlinks + // the best we can do is test the file exists + _, err := fs.mapFS.Open(trimForwardSlash(link)) + return err +} + func trimForwardSlash(name string) string { return strings.TrimLeft(name, forwardSlash) } From 0b437e7b468b804d10ce3579099ef2e268fb108c Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Wed, 4 Oct 2023 21:27:24 -0400 Subject: [PATCH 04/11] schedule log file creation --- .../engine_functions/create_engine.go | 3 +- .../log_file_creator/log_file_creator.go | 10 +-- .../log_file_creator/log_file_creator_test.go | 79 ++++++++++++------- .../persistent_volume/volume_consts/consts.go | 9 ++- engine/server/engine/main.go | 18 +++++ 5 files changed, 82 insertions(+), 37 deletions(-) diff --git a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/create_engine.go b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/create_engine.go index e2fabdad9d..3ac97edcc5 100644 --- a/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/create_engine.go +++ b/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/engine_functions/create_engine.go @@ -17,6 +17,7 @@ import ( "github.com/kurtosis-tech/kurtosis/engine/launcher/args" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/logs_clock" + "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem" "github.com/kurtosis-tech/stacktrace" "github.com/sirupsen/logrus" @@ -119,7 +120,7 @@ func CreateEngine( // do a first removal logRemover.Run() - logRemovalTicker := time.NewTicker(removeLogsWaitHours) + logRemovalTicker := time.NewTicker(volume_consts.RemoveLogsWaitHours) for range logRemovalTicker.C { logRemover.Run() } diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index 684cf0a2a2..b08679a930 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -22,21 +22,21 @@ import ( // To prevent storing duplicate logs, the LogFileCreator will ensure that the service name and short uuid log files are just // symlinks to the uuid log file path. type LogFileCreator struct { - time logs_clock.LogsClock + kurtosisBackend backend_interface.KurtosisBackend filesystem volume_filesystem.VolumeFilesystem - kurtosisBackend backend_interface.KurtosisBackend + time logs_clock.LogsClock } func NewLogFileCreator( - time logs_clock.LogsClock, kurtosisBackend backend_interface.KurtosisBackend, - filesystem volume_filesystem.VolumeFilesystem) *LogFileCreator { + filesystem volume_filesystem.VolumeFilesystem, + time logs_clock.LogsClock) *LogFileCreator { return &LogFileCreator{ - time: time, kurtosisBackend: kurtosisBackend, filesystem: filesystem, + time: time, } } diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go index 0221bdb8b3..88fe4087b0 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go @@ -1,32 +1,51 @@ package log_file_creator -import "testing" - -func TestLogFileCreatorCreatesNewFilePaths(t *testing.T) { - // mock the filesystem - - // mock the time - - // mock kurtosis backend GetUserServices call - - // execute create new file paths function - - // check they are added to the mocked filesystem -} - -func TestLogFileCreatorCreatesFilePathsIdempotently(t *testing.T) { - // mock the filesystem - // add file paths to the file system - - // mock the time - - // mock kurtosis backend GetUserServices call - - // execute create new file paths function - - // check that no new files are added -} - -func TestLogFileCreatorCreatesNewFilePathsForOnlyNonExistentFilePaths(t *testing.T) { - -} +const ( + testEnclaveUuid = "test-enclave-1" +) + +//func TestLogFileCreatorCreatesNewFilePaths(t *testing.T) { +// // mock the filesystem +// mapFS := &fstest.MapFS{} +// fs := volume_filesystem.NewMockedVolumeFilesystem(mapFS) +// +// // mock the time +// time := logs_clock.NewMockLogsClock(2023, 10, 5) +// +// // mock kurtosis backend GetUserServices call +// kurtosisBackend := backend_interface.NewMockKurtosisBackend(t) +// //kurtosisBackend.EXPECT(). +// // GetUserService() +// +// expectedFilePaths := []string{} +// +// // execute create new file paths function +// ctx := context.Background() +// fileCreator := NewLogFileCreator(time, kurtosisBackend, fs) +// err := fileCreator.CreateLogFiles(ctx) +// +// require.NoError(t, err) +// // check they exist in the mocked filesystem +// for _, path := range expectedFilePaths { +// file, err := fs.Stat(path) +// require.NoError(t, err) +// require.NotNil(t, file) +// } +//} +// +//func TestLogFileCreatorCreatesFilePathsIdempotently(t *testing.T) { +// // mock the filesystem +// // add file paths to the file system +// +// // mock the time +// +// // mock kurtosis backend GetUserServices call +// +// // execute create new file paths function +// +// // check that no new files are added +//} +// +//func TestLogFileCreatorCreatesNewFilePathsForOnlyNonExistentFilePaths(t *testing.T) { +// +//} diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go index 397b7d1a71..a6c3f9957d 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go @@ -1,6 +1,9 @@ package volume_consts -import "strings" +import ( + "strings" + "time" +) const ( // Location of logs on the filesystem of the engine @@ -17,6 +20,10 @@ const ( LogRetentionPeriodInWeeks = 4 + RemoveLogsWaitHours = 6 * time.Hour + + CreateLogFilesInterval = 3 * time.Minute + // basepath/enclave uuid/service uuid PerFileFmtStr = "%s%s/%s%s" diff --git a/engine/server/engine/main.go b/engine/server/engine/main.go index fb72affad6..d6f60bacc8 100644 --- a/engine/server/engine/main.go +++ b/engine/server/engine/main.go @@ -20,8 +20,10 @@ import ( "github.com/kurtosis-tech/kurtosis/engine/launcher/args" "github.com/kurtosis-tech/kurtosis/engine/launcher/args/kurtosis_backend_config" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume" + "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/logs_clock" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy" + "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem" "github.com/kurtosis-tech/kurtosis/engine/server/engine/enclave_manager" "github.com/kurtosis-tech/kurtosis/engine/server/engine/server" @@ -150,6 +152,22 @@ func runMain() error { perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(realTime) perWeekLogsDatabaseClient := persistent_volume.NewPersistentVolumeLogsDatabaseClient(kurtosisBackend, osFs, perWeekStreamStrategy) + go func() { + // TODO: Remove this when moving away from persistent volume logs db + // creating log file paths on an interval is a hack to prevent duplicate logs from being stored by the log aggregator + logrus.Debug("Scheduling log file path creation...") + fileCreator := log_file_creator.NewLogFileCreator(kurtosisBackend, osFs, realTime) + logFileCreatorTicker := time.NewTicker(volume_consts.CreateLogFilesInterval) + for range logFileCreatorTicker.C { + logrus.Debug("Attempting to create log file paths.") + err = fileCreator.CreateLogFiles(ctx) + if err != nil { + logrus.Errorf("An error occurred attempting to create log file paths: %v", err) + } + logrus.Debug("Successfully created log file paths.") + } + }() + go func() { fileServer := http.FileServer(http.Dir(pathToStaticFolder)) handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { From 890b47ff517926574a8fd8185d02d09310c2a564 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Wed, 4 Oct 2023 21:41:54 -0400 Subject: [PATCH 05/11] init map --- .../log_file_creator/log_file_creator.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index b08679a930..594e6b79f3 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -11,6 +11,7 @@ import ( "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem" "github.com/kurtosis-tech/stacktrace" + "github.com/sirupsen/logrus" "strconv" ) @@ -72,6 +73,7 @@ func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { return stacktrace.Propagate(err, "An error occurred creating log file path '%v'.", serviceUuidFilePathStr) } + logrus.Info("CREATING SYMLINKED FILES") // create symlinks for name and shortened uuid log files serviceNameFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceNameStr) err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceNameFilePathStr) @@ -84,6 +86,7 @@ func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { if err != nil { return err } + logrus.Info("SUCCESSFULLY CREATED SYMLINKED FILES") } } @@ -91,7 +94,7 @@ func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { } func (creator *LogFileCreator) getEnclaveAndServiceInfo(ctx context.Context) (map[enclave.EnclaveUUID][]*service.ServiceRegistration, error) { - var enclaveToServicesMap map[enclave.EnclaveUUID][]*service.ServiceRegistration + enclaveToServicesMap := map[enclave.EnclaveUUID][]*service.ServiceRegistration{} // collect info of all services in enclaves enclaves, err := creator.kurtosisBackend.GetEnclaves(ctx, &enclave.EnclaveFilters{}) @@ -114,13 +117,14 @@ func (creator *LogFileCreator) getEnclaveAndServiceInfo(ctx context.Context) (ma return enclaveToServicesMap, nil } -func (creator *LogFileCreator) createSymlinkLogFile(targetFilePath, symlinkFilePath string) error { - // in case a log file (symlink or not) already exists, remove it - if err := creator.filesystem.RemoveAll(symlinkFilePath); err != nil { - return stacktrace.Propagate(err, "An error occurred attempting to remove an existing log file at the symlink file path '%v'.", symlinkFilePath) +func (creator *LogFileCreator) createSymlinkLogFile(targetLogFilePath, symlinkLogFilePath string) error { + // remove existing log files that could be storing logs at this path + if err := creator.filesystem.RemoveAll(symlinkLogFilePath); err != nil { + return stacktrace.Propagate(err, "An error occurred attempting to remove an existing log file at the symlink file path '%v'.", symlinkLogFilePath) } - if err := creator.filesystem.Symlink(targetFilePath, symlinkFilePath); err != nil { - return stacktrace.Propagate(err, "An error occurred creating a symlink file path '%v' for target file path '%v'.", symlinkFilePath, targetFilePath) + // replace with symlink + if err := creator.filesystem.Symlink(targetLogFilePath, symlinkLogFilePath); err != nil { + return stacktrace.Propagate(err, "An error occurred creating a symlink file path '%v' for target file path '%v'.", targetLogFilePath, targetLogFilePath) } return nil } From 5f8e25ca391527be7c7599ba713c75ff7c4abf7e Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Wed, 4 Oct 2023 23:40:29 -0400 Subject: [PATCH 06/11] create instead of open log file --- .../log_file_creator/log_file_creator.go | 32 +++++++++++-------- .../volume_filesystem/volume_filesystem.go | 13 +++++++- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index 594e6b79f3..f357a60c46 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -12,6 +12,7 @@ import ( "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem" "github.com/kurtosis-tech/stacktrace" "github.com/sirupsen/logrus" + "os" "strconv" ) @@ -44,16 +45,13 @@ func NewLogFileCreator( // CreateLogFiles creates three log files for every service across all running enclaves. // The first is a file with the name ending in the uuid of the service. // The other two file paths are symlinks to the uuid file, ending with the shortened uuid and service name respectively. -// The file paths are created idempotently meaning if they already exist, new ones are not created. // If files exist for the shortened uuid and service name files, but they are not symlinks, they are removed and symlink files // are created to prevent duplicate log storage. func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { var err error - // get year and time for the file paths year, week := creator.time.Now().ISOWeek() - // collect enclave and service info for the file paths enclaveToServicesMap, err := creator.getEnclaveAndServiceInfo(ctx) if err != nil { // already wrapped with propagate @@ -66,24 +64,19 @@ func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { serviceNameStr := string(serviceRegistration.GetName()) serviceShortUuidStr := uuid_generator.ShortenedUUIDString(serviceUuidStr) - // create log file for the uuid idempotently serviceUuidFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceUuidStr) - _, err = creator.filesystem.Open(serviceUuidFilePathStr) - if err != nil { - return stacktrace.Propagate(err, "An error occurred creating log file path '%v'.", serviceUuidFilePathStr) + if err = creator.createLogFileIdempotently(serviceUuidFilePathStr); err != nil { + return err } logrus.Info("CREATING SYMLINKED FILES") - // create symlinks for name and shortened uuid log files serviceNameFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceNameStr) - err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceNameFilePathStr) - if err != nil { + if err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceNameFilePathStr); err != nil { return err } serviceShortUuidFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceShortUuidStr) - err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceShortUuidFilePathStr) - if err != nil { + if err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceShortUuidFilePathStr); err != nil { return err } logrus.Info("SUCCESSFULLY CREATED SYMLINKED FILES") @@ -96,7 +89,6 @@ func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { func (creator *LogFileCreator) getEnclaveAndServiceInfo(ctx context.Context) (map[enclave.EnclaveUUID][]*service.ServiceRegistration, error) { enclaveToServicesMap := map[enclave.EnclaveUUID][]*service.ServiceRegistration{} - // collect info of all services in enclaves enclaves, err := creator.kurtosisBackend.GetEnclaves(ctx, &enclave.EnclaveFilters{}) if err != nil { return nil, stacktrace.Propagate(err, "An error occurred while trying to get all enclaves from kurtosis backend.") @@ -117,6 +109,20 @@ func (creator *LogFileCreator) getEnclaveAndServiceInfo(ctx context.Context) (ma return enclaveToServicesMap, nil } +func (creator *LogFileCreator) createLogFileIdempotently(logFilePath string) error { + var err error + if _, err = creator.filesystem.Stat(logFilePath); os.IsNotExist(err) { + if _, err = creator.filesystem.Create(logFilePath); err != nil { + return stacktrace.Propagate(err, "An error occurred creating a log file path at '%v'", logFilePath) + } + return nil + } + if err != nil { + return stacktrace.Propagate(err, "An error occurred checking if log file path at '%v' existed.", logFilePath) + } + return nil +} + func (creator *LogFileCreator) createSymlinkLogFile(targetLogFilePath, symlinkLogFilePath string) error { // remove existing log files that could be storing logs at this path if err := creator.filesystem.RemoveAll(symlinkLogFilePath); err != nil { diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go index c82b1a8418..bba05b90e3 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go @@ -15,6 +15,7 @@ const ( // primarily for the purpose of enabling unit testing persistentVolumeLogsDatabaseClient type VolumeFilesystem interface { Open(name string) (VolumeFile, error) + Create(name string) (VolumeFile, error) Stat(name string) (VolumeFileInfo, error) RemoveAll(path string) error Symlink(target, link string) error @@ -40,6 +41,10 @@ func (fs *OsVolumeFilesystem) Open(name string) (VolumeFile, error) { return os.Open(name) } +func (fs *OsVolumeFilesystem) Create(name string) (VolumeFile, error) { + return os.Create(name) +} + func (fs *OsVolumeFilesystem) Stat(name string) (VolumeFileInfo, error) { return os.Stat(name) } @@ -54,7 +59,7 @@ func (fs *OsVolumeFilesystem) Symlink(target, link string) error { // MockedVolumeFilesystem is an implementation used for unit testing type MockedVolumeFilesystem struct { - // we use an underlying map filesystem that's easy to mock file data with + // uses an underlying map filesystem that's easy to mock file data with mapFS *fstest.MapFS } @@ -68,6 +73,12 @@ func (fs *MockedVolumeFilesystem) Open(name string) (VolumeFile, error) { return fs.mapFS.Open(trimForwardSlash(name)) } +func (fs *MockedVolumeFilesystem) Create(name string) (VolumeFile, error) { + // Trim any forward slashes from this filepath + // fstest.MapFS doesn't like absolute paths!!! + return fs.mapFS.Open(trimForwardSlash(name)) +} + func (fs *MockedVolumeFilesystem) Stat(name string) (VolumeFileInfo, error) { // Trim any forward slashes from this filepath // fstest.MapFS doesn't like absolute paths!!! From 13e8820eeff52826dcbfb418cc2f790fd8a2053b Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Thu, 5 Oct 2023 00:13:57 -0400 Subject: [PATCH 07/11] clean up log stmts --- .../persistent_volume/log_file_creator/log_file_creator.go | 5 +++-- engine/server/engine/main.go | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index f357a60c46..412d351e54 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -69,17 +69,17 @@ func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { return err } - logrus.Info("CREATING SYMLINKED FILES") serviceNameFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceNameStr) if err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceNameFilePathStr); err != nil { return err } + logrus.Tracef("Created symlinked log file: '%v'", serviceNameFilePathStr) serviceShortUuidFilePathStr := getFilepathStr(year, week, string(enclaveUuid), serviceShortUuidStr) if err = creator.createSymlinkLogFile(serviceUuidFilePathStr, serviceShortUuidFilePathStr); err != nil { return err } - logrus.Info("SUCCESSFULLY CREATED SYMLINKED FILES") + logrus.Tracef("Created symlinked log file: '%v'", serviceShortUuidFilePathStr) } } @@ -115,6 +115,7 @@ func (creator *LogFileCreator) createLogFileIdempotently(logFilePath string) err if _, err = creator.filesystem.Create(logFilePath); err != nil { return stacktrace.Propagate(err, "An error occurred creating a log file path at '%v'", logFilePath) } + logrus.Tracef("Created log file: '%v'", logFilePath) return nil } if err != nil { diff --git a/engine/server/engine/main.go b/engine/server/engine/main.go index d6f60bacc8..b3716ab3c9 100644 --- a/engine/server/engine/main.go +++ b/engine/server/engine/main.go @@ -155,16 +155,16 @@ func runMain() error { go func() { // TODO: Remove this when moving away from persistent volume logs db // creating log file paths on an interval is a hack to prevent duplicate logs from being stored by the log aggregator - logrus.Debug("Scheduling log file path creation...") fileCreator := log_file_creator.NewLogFileCreator(kurtosisBackend, osFs, realTime) logFileCreatorTicker := time.NewTicker(volume_consts.CreateLogFilesInterval) for range logFileCreatorTicker.C { - logrus.Debug("Attempting to create log file paths.") + logrus.Debug("Creating log file paths...") err = fileCreator.CreateLogFiles(ctx) if err != nil { logrus.Errorf("An error occurred attempting to create log file paths: %v", err) + } else { + logrus.Debug("Successfully created log file paths.") } - logrus.Debug("Successfully created log file paths.") } }() From d8cc1480d319ecad1d14acb0d9ec7c1e7b9ad4ba Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Thu, 5 Oct 2023 01:21:38 -0400 Subject: [PATCH 08/11] refactor mocked fs to use afero --- .../log_file_creator/log_file_creator.go | 2 +- .../log_remover/log_remover_test.go | 36 +- ...istent_volume_logs_database_client_test.go | 197 +++++----- .../per_week_stream_logs_strategy_test.go | 160 +++------ .../persistent_volume/volume_consts/consts.go | 8 - .../volume_filesystem/volume_filesystem.go | 48 ++- engine/server/go.mod | 1 + engine/server/go.sum | 340 ++++++++++++++++++ go.work.sum | 29 +- 9 files changed, 527 insertions(+), 294 deletions(-) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index 412d351e54..cd59ac01a8 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -126,7 +126,7 @@ func (creator *LogFileCreator) createLogFileIdempotently(logFilePath string) err func (creator *LogFileCreator) createSymlinkLogFile(targetLogFilePath, symlinkLogFilePath string) error { // remove existing log files that could be storing logs at this path - if err := creator.filesystem.RemoveAll(symlinkLogFilePath); err != nil { + if err := creator.filesystem.Remove(symlinkLogFilePath); err != nil { return stacktrace.Propagate(err, "An error occurred attempting to remove an existing log file at the symlink file path '%v'.", symlinkLogFilePath) } // replace with symlink diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go index cdb3e7db25..5a82f83462 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go @@ -6,9 +6,9 @@ import ( "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts" "github.com/kurtosis-tech/kurtosis/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem" "github.com/stretchr/testify/require" + "os" "strconv" "testing" - "testing/fstest" ) const ( @@ -19,6 +19,8 @@ const ( ) func TestLogRemover_Run(t *testing.T) { + mockFs := volume_filesystem.NewMockedVolumeFilesystem() + week49filepath := getWeekFilepathStr(2022, 49) week50filepath := getWeekFilepathStr(2022, 50) week51filepath := getWeekFilepathStr(2022, 51) @@ -26,28 +28,13 @@ func TestLogRemover_Run(t *testing.T) { week1filepath := getWeekFilepathStr(2023, 1) week2filepath := getWeekFilepathStr(2023, 2) - mapFs := &fstest.MapFS{ - week49filepath: { - Data: []byte{}, - }, - week50filepath: { - Data: []byte{}, - }, - week51filepath: { - Data: []byte{}, - }, - week52filepath: { - Data: []byte{}, - }, - week1filepath: { - Data: []byte{}, - }, - week2filepath: { - Data: []byte{}, - }, - } + mockFs.Create(week49filepath) + mockFs.Create(week50filepath) + mockFs.Create(week51filepath) + mockFs.Create(week52filepath) + mockFs.Create(week1filepath) + mockFs.Create(week2filepath) - mockFs := volume_filesystem.NewMockedVolumeFilesystem(mapFs) currentWeek := 2 mockTime := logs_clock.NewMockLogsClock(2023, currentWeek, defaultDay) @@ -57,9 +44,10 @@ func TestLogRemover_Run(t *testing.T) { logRemover.Run() _, err := mockFs.Stat(week49filepath) - require.Error(t, err) // check the file doesn't exist + require.Error(t, err) + require.True(t, os.IsNotExist(err)) } func getWeekFilepathStr(year, week int) string { - return fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(year), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + return fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(year), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) } diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go index 40969da8ba..c6f474906e 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go @@ -16,7 +16,6 @@ import ( "strconv" "strings" "testing" - "testing/fstest" "time" ) @@ -256,12 +255,12 @@ func TestStreamUserServiceLogs_ThousandsOfLogLinesSuccessfulExecution(t *testing testUserService1Uuid: true, } - file1 := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpathForTests, string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) - underlyingFs := &fstest.MapFS{ - file1: { - Data: []byte(logLinesStr), - }, - } + underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() + + file1PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) + file1, _ := underlyingFs.Create(file1PathStr) + file1.WriteString(logLinesStr) + perFileStreamStrategy := stream_logs_strategy.NewPerFileStreamLogsStrategy() receivedUserServiceLogsByUuid, testEvaluationErr := executeStreamCallAndGetReceivedServiceLogLines( @@ -307,12 +306,11 @@ func TestStreamUserServiceLogsPerWeek_ThousandsOfLogLinesSuccessfulExecution(t * testUserService1Uuid: true, } - file1 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(startingWeek), string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) - underlyingFs := &fstest.MapFS{ - file1: { - Data: []byte(logLinesStr), - }, - } + underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() + file1PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(startingWeek), string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) + file1, _ := underlyingFs.Create(file1PathStr) + file1.WriteString(logLinesStr) + mockTime := logs_clock.NewMockLogsClock(defaultYear, startingWeek, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -351,12 +349,11 @@ func TestStreamUserServiceLogs_EmptyLogLines(t *testing.T) { logLinesStr := "" - file1 := fmt.Sprintf("%s%s/%s%s", volume_consts.LogsStorageDirpathForTests, string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) - underlyingFs := &fstest.MapFS{ - file1: { - Data: []byte(logLinesStr), - }, - } + underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() + file1PathStr := fmt.Sprintf("%s%s/%s%s", volume_consts.LogsStorageDirpath, string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) + file1, _ := underlyingFs.Create(file1PathStr) + file1.WriteString(logLinesStr) + perFileStreamStrategy := stream_logs_strategy.NewPerFileStreamLogsStrategy() receivedUserServiceLogsByUuid, testEvaluationErr := executeStreamCallAndGetReceivedServiceLogLines( @@ -393,12 +390,11 @@ func TestStreamUserServiceLogsPerWeek_EmptyLogLines(t *testing.T) { logLinesStr := "" - file1 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(startingWeek), string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) - underlyingFs := &fstest.MapFS{ - file1: { - Data: []byte(logLinesStr), - }, - } + underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() + file1PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(startingWeek), string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) + file1, _ := underlyingFs.Create(file1PathStr) + file1.WriteString(logLinesStr) + mockTime := logs_clock.NewMockLogsClock(defaultYear, startingWeek, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -448,20 +444,19 @@ func TestStreamUserServiceLogsPerWeek_WithLogsAcrossWeeks(t *testing.T) { logLine3b, logLine4} + underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() + week3logLinesStr := strings.Join(week3logLines, "\n") + "\n" week4logLinesStr := strings.Join(week4logLines, "\n") - week4filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(4), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) - week3filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(3), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + week4filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(4), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + week4, _ := underlyingFs.Create(week4filepath) + week4.WriteString(week4logLinesStr) + + week3filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(3), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + week3, _ := underlyingFs.Create(week3filepath) + week3.WriteString(week3logLinesStr) - underlyingFs := &fstest.MapFS{ - week4filepath: { - Data: []byte(week4logLinesStr), - }, - week3filepath: { - Data: []byte(week3logLinesStr), - }, - } mockTime := logs_clock.NewMockLogsClock(defaultYear, 4, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -512,20 +507,19 @@ func TestStreamUserServiceLogsPerWeek_WithLogLineAcrossWeeks(t *testing.T) { logLine2, logLine3a} + underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() + week3logLinesStr := strings.Join(week3logLines, "\n") + "\n" week4logLinesStr := strings.Join(week4logLines, "\n") + "\n" - week4filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(4), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) - week3filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(3), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + week4filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(4), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + week4, _ := underlyingFs.Create(week4filepath) + week4.WriteString(week4logLinesStr) + + week3filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(3), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + week3, _ := underlyingFs.Create(week3filepath) + week3.WriteString(week3logLinesStr) - underlyingFs := &fstest.MapFS{ - week4filepath: { - Data: []byte(week4logLinesStr), - }, - week3filepath: { - Data: []byte(week3logLinesStr), - }, - } mockTime := logs_clock.NewMockLogsClock(defaultYear, 4, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -560,7 +554,7 @@ func executeStreamCallAndGetReceivedServiceLogLines( userServiceUuids map[service.ServiceUUID]bool, expectedServiceAmountLogLinesByServiceUuid map[service.ServiceUUID]int, shouldFollowLogs bool, - underlyingFs *fstest.MapFS, + underlyingFs volume_filesystem.VolumeFilesystem, streamStrategy stream_logs_strategy.StreamLogsStrategy, ) (map[service.ServiceUUID][]logline.LogLine, error) { ctx := context.Background() @@ -573,8 +567,7 @@ func executeStreamCallAndGetReceivedServiceLogLines( kurtosisBackend := backend_interface.NewMockKurtosisBackend(t) - mockedFs := volume_filesystem.NewMockedVolumeFilesystem(underlyingFs) - logsDatabaseClient := NewPersistentVolumeLogsDatabaseClient(kurtosisBackend, mockedFs, streamStrategy) + logsDatabaseClient := NewPersistentVolumeLogsDatabaseClient(kurtosisBackend, underlyingFs, streamStrategy) userServiceLogsByUuidChan, errChan, receivedCancelCtxFunc, err := logsDatabaseClient.StreamUserServiceLogs(ctx, enclaveUuid, userServiceUuids, logLinesFilters, shouldFollowLogs, defaultShouldReturnAllLogs, defaultNumLogLines) if err != nil { @@ -629,90 +622,76 @@ func executeStreamCallAndGetReceivedServiceLogLines( return receivedServiceLogsByUuid, nil } -func createFilledPerFileFilesystem() *fstest.MapFS { +func createFilledPerFileFilesystem() volume_filesystem.VolumeFilesystem { logLines := []string{logLine1, logLine2, logLine3a, logLine3b, logLine4, logLine5, logLine6, logLine7, logLine8} logLinesStr := strings.Join(logLines, "\n") - file1 := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpathForTests, testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) - file2 := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpathForTests, testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) - file3 := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpathForTests, testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) + file1PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + file2PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) + file3PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) - mapFs := &fstest.MapFS{ - file1: { - Data: []byte(logLinesStr), - }, - file2: { - Data: []byte(logLinesStr), - }, - file3: { - Data: []byte(logLinesStr), - }, - } + mapFs := volume_filesystem.NewMockedVolumeFilesystem() + + file1, _ := mapFs.Create(file1PathStr) + file1.WriteString(logLinesStr) + + file2, _ := mapFs.Create(file2PathStr) + file2.WriteString(logLinesStr) + + file3, _ := mapFs.Create(file3PathStr) + file3.WriteString(logLinesStr) return mapFs } -func createFilledPerWeekFilesystem(week int) *fstest.MapFS { +func createFilledPerWeekFilesystem(week int) volume_filesystem.VolumeFilesystem { logLines := []string{logLine1, logLine2, logLine3a, logLine3b, logLine4, logLine5, logLine6, logLine7, logLine8} logLinesStr := strings.Join(logLines, "\n") - file1 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) - file2 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) - file3 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) + file1PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + file2PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) + file3PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) - mapFs := &fstest.MapFS{ - file1: { - Data: []byte(logLinesStr), - }, - file2: { - Data: []byte(logLinesStr), - }, - file3: { - Data: []byte(logLinesStr), - }, - } + mapFs := volume_filesystem.NewMockedVolumeFilesystem() + + file1, _ := mapFs.Create(file1PathStr) + file1.WriteString(logLinesStr) + + file2, _ := mapFs.Create(file2PathStr) + file2.WriteString(logLinesStr) + + file3, _ := mapFs.Create(file3PathStr) + file3.WriteString(logLinesStr) return mapFs } -func createEmptyPerFileFilesystem() *fstest.MapFS { - file1 := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpathForTests, testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) - file2 := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpathForTests, testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) - file3 := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpathForTests, testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) +func createEmptyPerFileFilesystem() volume_filesystem.VolumeFilesystem { + file1PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + file2PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) + file3PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) - mapFs := &fstest.MapFS{ - file1: { - Data: []byte{}, - }, - file2: { - Data: []byte{}, - }, - file3: { - Data: []byte{}, - }, - } + mapFs := volume_filesystem.NewMockedVolumeFilesystem() + + mapFs.Create(file1PathStr) + mapFs.Create(file2PathStr) + mapFs.Create(file3PathStr) return mapFs } -func createEmptyPerWeekFilesystem(week int) *fstest.MapFS { - file1 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) - file2 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) - file3 := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) - - mapFs := &fstest.MapFS{ - file1: { - Data: []byte{}, - }, - file2: { - Data: []byte{}, - }, - file3: { - Data: []byte{}, - }, - } +func createEmptyPerWeekFilesystem(week int) volume_filesystem.VolumeFilesystem { + file1PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + file2PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService2Uuid, volume_consts.Filetype) + file3PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(week), testEnclaveUuid, testUserService3Uuid, volume_consts.Filetype) + + mapFs := volume_filesystem.NewMockedVolumeFilesystem() + + mapFs.Create(file1PathStr) + mapFs.Create(file2PathStr) + mapFs.Create(file3PathStr) return mapFs } diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go index b310114c10..fb56311663 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go @@ -11,7 +11,6 @@ import ( "strconv" "strings" "testing" - "testing/fstest" ) const ( @@ -25,6 +24,8 @@ const ( ) func TestGetLogFilePaths(t *testing.T) { + filesystem := volume_filesystem.NewMockedVolumeFilesystem() + // ../week/enclave uuid/service uuid.json week12filepath := getWeekFilepathStr(defaultYear, 12) week13filepath := getWeekFilepathStr(defaultYear, 13) @@ -33,28 +34,13 @@ func TestGetLogFilePaths(t *testing.T) { week16filepath := getWeekFilepathStr(defaultYear, 16) week17filepath := getWeekFilepathStr(defaultYear, 17) - mapFS := &fstest.MapFS{ - week12filepath: { - Data: []byte{}, - }, - week13filepath: { - Data: []byte{}, - }, - week14filepath: { - Data: []byte{}, - }, - week15filepath: { - Data: []byte{}, - }, - week16filepath: { - Data: []byte{}, - }, - week17filepath: { - Data: []byte{}, - }, - } + filesystem.Create(week12filepath) + filesystem.Create(week13filepath) + filesystem.Create(week14filepath) + filesystem.Create(week15filepath) + filesystem.Create(week16filepath) + filesystem.Create(week17filepath) - filesystem := volume_filesystem.NewMockedVolumeFilesystem(mapFS) currentWeek := 17 expectedLogFilePaths := []string{ @@ -72,11 +58,13 @@ func TestGetLogFilePaths(t *testing.T) { require.NoError(t, err) require.Equal(t, len(expectedLogFilePaths), len(logFilePaths)) for i, filePath := range expectedLogFilePaths { - require.Equal(t, "/"+filePath, logFilePaths[i]) + require.Equal(t, filePath, logFilePaths[i]) } } func TestGetLogFilePathsAcrossNewYear(t *testing.T) { + filesystem := volume_filesystem.NewMockedVolumeFilesystem() + // ../week/enclave uuid/service uuid.json week50filepath := getWeekFilepathStr(defaultYear-1, 50) week51filepath := getWeekFilepathStr(defaultYear-1, 51) @@ -84,25 +72,12 @@ func TestGetLogFilePathsAcrossNewYear(t *testing.T) { week1filepath := getWeekFilepathStr(defaultYear, 1) week2filepath := getWeekFilepathStr(defaultYear, 2) - mapFS := &fstest.MapFS{ - week50filepath: { - Data: []byte{}, - }, - week51filepath: { - Data: []byte{}, - }, - week52filepath: { - Data: []byte{}, - }, - week1filepath: { - Data: []byte{}, - }, - week2filepath: { - Data: []byte{}, - }, - } + filesystem.Create(week50filepath) + filesystem.Create(week51filepath) + filesystem.Create(week52filepath) + filesystem.Create(week1filepath) + filesystem.Create(week2filepath) - filesystem := volume_filesystem.NewMockedVolumeFilesystem(mapFS) currentWeek := 2 expectedLogFilePaths := []string{ @@ -120,11 +95,13 @@ func TestGetLogFilePathsAcrossNewYear(t *testing.T) { require.NoError(t, err) require.Equal(t, len(expectedLogFilePaths), len(logFilePaths)) for i, filePath := range expectedLogFilePaths { - require.Equal(t, "/"+filePath, logFilePaths[i]) + require.Equal(t, filePath, logFilePaths[i]) } } func TestGetLogFilePathsAcrossNewYearWith53Weeks(t *testing.T) { + filesystem := volume_filesystem.NewMockedVolumeFilesystem() + // According to ISOWeek, 2015 has 53 weeks week52filepath := getWeekFilepathStr(2015, 52) week53filepath := getWeekFilepathStr(2015, 53) @@ -132,25 +109,12 @@ func TestGetLogFilePathsAcrossNewYearWith53Weeks(t *testing.T) { week2filepath := getWeekFilepathStr(2016, 2) week3filepath := getWeekFilepathStr(2016, 3) - mapFS := &fstest.MapFS{ - week52filepath: { - Data: []byte{}, - }, - week53filepath: { - Data: []byte{}, - }, - week1filepath: { - Data: []byte{}, - }, - week2filepath: { - Data: []byte{}, - }, - week3filepath: { - Data: []byte{}, - }, - } + filesystem.Create(week52filepath) + filesystem.Create(week53filepath) + filesystem.Create(week1filepath) + filesystem.Create(week2filepath) + filesystem.Create(week3filepath) - filesystem := volume_filesystem.NewMockedVolumeFilesystem(mapFS) currentWeek := 3 expectedLogFilePaths := []string{ @@ -168,29 +132,22 @@ func TestGetLogFilePathsAcrossNewYearWith53Weeks(t *testing.T) { require.NoError(t, err) require.Equal(t, len(expectedLogFilePaths), len(logFilePaths)) for i, filePath := range expectedLogFilePaths { - require.Equal(t, "/"+filePath, logFilePaths[i]) + require.Equal(t, filePath, logFilePaths[i]) } } func TestGetLogFilePathsWithDiffRetentionPeriod(t *testing.T) { + filesystem := volume_filesystem.NewMockedVolumeFilesystem() + // ../week/enclave uuid/service uuid.json week52filepath := getWeekFilepathStr(defaultYear-1, 52) week1filepath := getWeekFilepathStr(defaultYear, 1) week2filepath := getWeekFilepathStr(defaultYear, 2) - mapFS := &fstest.MapFS{ - week52filepath: { - Data: []byte{}, - }, - week1filepath: { - Data: []byte{}, - }, - week2filepath: { - Data: []byte{}, - }, - } + filesystem.Create(week52filepath) + filesystem.Create(week1filepath) + filesystem.Create(week2filepath) - filesystem := volume_filesystem.NewMockedVolumeFilesystem(mapFS) currentWeek := 2 retentionPeriod := 2 @@ -207,27 +164,21 @@ func TestGetLogFilePathsWithDiffRetentionPeriod(t *testing.T) { require.NoError(t, err) require.Equal(t, len(expectedLogFilePaths), len(logFilePaths)) for i, filePath := range expectedLogFilePaths { - require.Equal(t, "/"+filePath, logFilePaths[i]) + require.Equal(t, filePath, logFilePaths[i]) } } func TestGetLogFilePathsReturnsAllAvailableWeeks(t *testing.T) { + filesystem := volume_filesystem.NewMockedVolumeFilesystem() + // ../week/enclave uuid/service uuid.json week52filepath := getWeekFilepathStr(defaultYear-1, 52) week1filepath := getWeekFilepathStr(defaultYear, 1) week2filepath := getWeekFilepathStr(defaultYear, 2) - mapFS := &fstest.MapFS{ - week52filepath: { - Data: []byte{}, - }, - week1filepath: { - Data: []byte{}, - }, - week2filepath: { - Data: []byte{}, - }, - } + filesystem.Create(week52filepath) + filesystem.Create(week1filepath) + filesystem.Create(week2filepath) // should return existing file paths even though log files going all the back to retention period don't exist expectedLogFilePaths := []string{ @@ -236,7 +187,6 @@ func TestGetLogFilePathsReturnsAllAvailableWeeks(t *testing.T) { week2filepath, } - filesystem := volume_filesystem.NewMockedVolumeFilesystem(mapFS) currentWeek := 2 mockTime := logs_clock.NewMockLogsClock(defaultYear, currentWeek, defaultDay) @@ -246,29 +196,22 @@ func TestGetLogFilePathsReturnsAllAvailableWeeks(t *testing.T) { require.NoError(t, err) require.Less(t, len(logFilePaths), defaultRetentionPeriodInWeeks) for i, filePath := range expectedLogFilePaths { - require.Equal(t, "/"+filePath, logFilePaths[i]) + require.Equal(t, filePath, logFilePaths[i]) } } func TestGetLogFilePathsReturnsCorrectPathsIfWeeksMissingInBetween(t *testing.T) { + filesystem := volume_filesystem.NewMockedVolumeFilesystem() + // ../week/enclave uuid/service uuid.json week52filepath := getWeekFilepathStr(defaultYear, 0) week1filepath := getWeekFilepathStr(defaultYear, 1) week3filepath := getWeekFilepathStr(defaultYear, 3) - mapFS := &fstest.MapFS{ - week52filepath: { - Data: []byte{}, - }, - week1filepath: { - Data: []byte{}, - }, - week3filepath: { - Data: []byte{}, - }, - } + filesystem.Create(week52filepath) + filesystem.Create(week1filepath) + filesystem.Create(week3filepath) - filesystem := volume_filesystem.NewMockedVolumeFilesystem(mapFS) currentWeek := 3 mockTime := logs_clock.NewMockLogsClock(defaultYear, currentWeek, defaultDay) @@ -277,7 +220,7 @@ func TestGetLogFilePathsReturnsCorrectPathsIfWeeksMissingInBetween(t *testing.T) require.NoError(t, err) require.Len(t, logFilePaths, 1) - require.Equal(t, "/"+week3filepath, logFilePaths[0]) // should only return week 3 because week 2 is missing + require.Equal(t, week3filepath, logFilePaths[0]) // should only return week 3 because week 2 is missing } func TestGetLogFilePathsReturnsCorrectPathsIfCurrentWeekHasNoLogsYet(t *testing.T) { @@ -285,19 +228,15 @@ func TestGetLogFilePathsReturnsCorrectPathsIfCurrentWeekHasNoLogsYet(t *testing. currentWeek := 3 mockTime := logs_clock.NewMockLogsClock(defaultYear, currentWeek, defaultDay) + filesystem := volume_filesystem.NewMockedVolumeFilesystem() + // ../week/enclave uuid/service uuid.json week1filepath := getWeekFilepathStr(defaultYear, 1) week2filepath := getWeekFilepathStr(defaultYear, 2) // no logs for week current week exist yet - mapFS := &fstest.MapFS{ - week1filepath: { - Data: []byte{}, - }, - week2filepath: { - Data: []byte{}, - }, - } + filesystem.Create(week1filepath) + filesystem.Create(week2filepath) // should return week 1 and 2 logs, even though no logs for current week yet expectedLogFilePaths := []string{ @@ -305,14 +244,13 @@ func TestGetLogFilePathsReturnsCorrectPathsIfCurrentWeekHasNoLogsYet(t *testing. week2filepath, } - filesystem := volume_filesystem.NewMockedVolumeFilesystem(mapFS) strategy := NewPerWeekStreamLogsStrategy(mockTime) logFilePaths, err := strategy.getLogFilePaths(filesystem, defaultRetentionPeriodInWeeks, testEnclaveUuid, testUserService1Uuid) require.NoError(t, err) require.Equal(t, len(expectedLogFilePaths), len(logFilePaths)) for i, filePath := range expectedLogFilePaths { - require.Equal(t, "/"+filePath, logFilePaths[i]) + require.Equal(t, filePath, logFilePaths[i]) } } @@ -333,7 +271,7 @@ func TestIsWithinRetentionPeriod(t *testing.T) { } func getWeekFilepathStr(year, week int) string { - return fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpathForTests, strconv.Itoa(year), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) + return fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(year), strconv.Itoa(week), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) } func TestGetCompleteJsonLogString(t *testing.T) { diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go index a6c3f9957d..253e44a6c0 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_consts/consts.go @@ -1,7 +1,6 @@ package volume_consts import ( - "strings" "time" ) @@ -33,10 +32,3 @@ const ( // ... enclave uuid/service uuid PerWeekFilePathFmtStr = PerWeekDirPathStr + "%s/%s%s" ) - -var ( - // We use this storage dir path for tests because fstest.MapFS doesn't like absolute paths - // when using fstest.MapFS, all paths need to be stored and retrieved as a relative path - // so we trim the leading forward slash - LogsStorageDirpathForTests = strings.TrimLeft(LogsStorageDirpath, "/") -) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go index bba05b90e3..415ff01114 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go @@ -1,10 +1,9 @@ package volume_filesystem import ( + "github.com/spf13/afero" "io" "os" - "strings" - "testing/fstest" ) const ( @@ -18,12 +17,14 @@ type VolumeFilesystem interface { Create(name string) (VolumeFile, error) Stat(name string) (VolumeFileInfo, error) RemoveAll(path string) error + Remove(filepath string) error Symlink(target, link string) error } type VolumeFile interface { io.Reader Close() error + WriteString(s string) (int, error) } type VolumeFileInfo interface { @@ -53,6 +54,10 @@ func (fs *OsVolumeFilesystem) RemoveAll(path string) error { return os.RemoveAll(path) } +func (fs *OsVolumeFilesystem) Remove(filepath string) error { + return os.Remove(filepath) +} + func (fs *OsVolumeFilesystem) Symlink(target, link string) error { return os.Symlink(target, link) } @@ -60,48 +65,35 @@ func (fs *OsVolumeFilesystem) Symlink(target, link string) error { // MockedVolumeFilesystem is an implementation used for unit testing type MockedVolumeFilesystem struct { // uses an underlying map filesystem that's easy to mock file data with - mapFS *fstest.MapFS + mapFS afero.Fs } -func NewMockedVolumeFilesystem(fs *fstest.MapFS) *MockedVolumeFilesystem { - return &MockedVolumeFilesystem{mapFS: fs} +func NewMockedVolumeFilesystem() *MockedVolumeFilesystem { + return &MockedVolumeFilesystem{mapFS: afero.NewMemMapFs()} } func (fs *MockedVolumeFilesystem) Open(name string) (VolumeFile, error) { - // Trim any forward slashes from this filepath - // fstest.MapFS doesn't like absolute paths!!! - return fs.mapFS.Open(trimForwardSlash(name)) + return fs.mapFS.Open(name) } func (fs *MockedVolumeFilesystem) Create(name string) (VolumeFile, error) { - // Trim any forward slashes from this filepath - // fstest.MapFS doesn't like absolute paths!!! - return fs.mapFS.Open(trimForwardSlash(name)) + return fs.mapFS.Create(name) } func (fs *MockedVolumeFilesystem) Stat(name string) (VolumeFileInfo, error) { - // Trim any forward slashes from this filepath - // fstest.MapFS doesn't like absolute paths!!! - return fs.mapFS.Stat(trimForwardSlash(name)) + return fs.mapFS.Stat(name) } func (fs *MockedVolumeFilesystem) RemoveAll(path string) error { - path = trimForwardSlash(path) - for filepath := range *fs.mapFS { - if strings.HasPrefix(filepath, path) { - delete(*fs.mapFS, filepath) - } - } - return nil + return fs.mapFS.RemoveAll(path) } -func (fs *MockedVolumeFilesystem) Symlink(target, link string) error { - // fstest.MapFs doesn't support mocking symlinks - // the best we can do is test the file exists - _, err := fs.mapFS.Open(trimForwardSlash(link)) - return err +func (fs *MockedVolumeFilesystem) Remove(filepath string) error { + return fs.mapFS.Remove(filepath) } -func trimForwardSlash(name string) string { - return strings.TrimLeft(name, forwardSlash) +func (fs *MockedVolumeFilesystem) Symlink(target, link string) error { + // afero.MemMapFs doesn't support symlinks so the best we can do is create the symlink + _, err := fs.mapFS.Create(link) + return err } diff --git a/engine/server/go.mod b/engine/server/go.mod index 86021466b0..beeb0ff247 100644 --- a/engine/server/go.mod +++ b/engine/server/go.mod @@ -85,6 +85,7 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect + github.com/spf13/afero v1.10.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.0 // indirect golang.org/x/mod v0.12.0 // indirect diff --git a/engine/server/go.sum b/engine/server/go.sum index f8fcfe2e16..672c5441a9 100644 --- a/engine/server/go.sum +++ b/engine/server/go.sum @@ -1,15 +1,59 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= connectrpc.com/connect v1.11.1 h1:dqRwblixqkVh+OFBOOL1yIf1jS/yP0MSJLijRj29bFg= connectrpc.com/connect v1.11.1/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 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/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -27,7 +71,11 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/emicklei/go-restful/v3 v3.9.0 h1:XwGDlfxEnQZzuopoqxwSEllNcCOM9DhhFyhFIIGKwxE= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +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/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -35,6 +83,9 @@ github.com/gammazero/deque v0.1.0 h1:f9LnNmq66VDeuAlSAapemq/U7hJ2jpIWa4c09q8Dlik github.com/gammazero/deque v0.1.0/go.mod h1:KQw7vFau1hHuM8xmI9RbgKFbAsQFWmBpqQ2KenFLk6M= github.com/gammazero/workerpool v1.1.2 h1:vuioDQbgrz4HoaCi2q1HLlOXdpbap5AET7xu5/qj87g= github.com/gammazero/workerpool v1.1.2/go.mod h1:UelbXcO0zCIGFcufcirHhq2/xtLXJdQ29qZNlXG9OjQ= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -48,44 +99,91 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8Wd github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 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.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= 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.4.1/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.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/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/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -125,14 +223,18 @@ github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 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/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE= github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -142,6 +244,7 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -149,90 +252,315 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 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-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 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-20190108225652-1e06a53dbb7e/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-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= 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= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8= golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE= 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-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/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.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= 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-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 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/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 h1:2FZP5XuJY9zQyGM5N0rtovnoXjiMUEIUMvw0m9wlpLc= google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 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.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI= google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -241,16 +569,20 @@ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQ 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.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= @@ -266,7 +598,12 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.27.2 h1:+H17AJpUMvl+clT+BPnKf0E3ksMAzoBBg7CntpSuADo= k8s.io/api v0.27.2/go.mod h1:ENmbocXfBT2ADujUXcBhHV55RIT31IIEvkntP6vZKS4= k8s.io/apimachinery v0.27.2 h1:vBjGaKKieaIreI+oQwELalVG4d8f3YAMNpWLzDXkxeg= @@ -279,6 +616,9 @@ k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5F k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc= k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/go.work.sum b/go.work.sum index ab4ec2bbba..19a29c6d0a 100644 --- a/go.work.sum +++ b/go.work.sum @@ -410,6 +410,7 @@ cloud.google.com/go/speech v1.15.0 h1:JEVoWGNnTF128kNty7T4aG4eqv2z86yiMJPT9Zjp+i cloud.google.com/go/speech v1.15.0/go.mod h1:y6oH7GhqCaZANH7+Oe0BhgIogsNInLlz542tg3VqeYI= cloud.google.com/go/speech v1.17.1 h1:KIV99afoYTJqA2qi8Cjbl5DpjSRzvqFgKcptGXg6kxw= cloud.google.com/go/speech v1.17.1/go.mod h1:8rVNzU43tQvxDaGvqOhpDqgkJTFowBpDvCJ14kGlJYo= +cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU= cloud.google.com/go/storage v1.29.0 h1:6weCgzRvMg7lzuUurI4697AqIRPU1SvzHhynwpW31jI= cloud.google.com/go/storage v1.30.1 h1:uOdMxAs8HExqBlnLtnQyP0YkvbiDpdGShGKtx6U/oNM= cloud.google.com/go/storage v1.30.1/go.mod h1:NfxhC0UJE1aXSx7CIIbCf7y9HKT7BiccwkR7+P7gN8E= @@ -586,7 +587,6 @@ github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f h1:7T++XKzy4xg7PKy+bM+Sa9/oe1OC88yz2hXQUISoXfA= github.com/envoyproxy/go-control-plane v0.11.1-0.20230524094728-9239064ad72f/go.mod h1:sfYdkwUW4BA3PbKjySwjJy+O4Pu0h62rlqCMHNk+K+Q= @@ -601,8 +601,8 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQW github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= @@ -622,11 +622,11 @@ github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8 github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= -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/lint v0.0.0-20180702182130-06c8688daad7 h1:2hRPrmiwPrp3fQX967rNJIhQPtiGXdlQWAxKbKw3VHA= github.com/golang/mock v1.2.0 h1:28o5sBqPkBsMGnC6b4MvE2TzSr5/AT4c/1fLqVGIwlk= +github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= @@ -638,6 +638,7 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -649,12 +650,12 @@ github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5 github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU= github.com/googleapis/gax-go/v2 v2.0.3 h1:siORttZ36U2R/WjiJuDz8znElWBiAlO9rVt+mqJt0Cc= github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gax-go/v2 v2.10.0/go.mod h1:4UOEnMCrxsSqQ940WnTiD6qJ63le2ev3xfyagutxiPw= github.com/googleapis/gax-go/v2 v2.11.0 h1:9V9PWXEsWnPpQhu/PeQIkS4eGzMlTLGgt80cUUI8Ki4= github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5iydzRfb3peWZJI= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -695,6 +696,7 @@ github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hudl/fargo v1.3.0 h1:0U6+BtN6LhaYuTnIJq4Wyq5cpn6O2kWrxAtcqBmYY6w= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d h1:/WZQPMZNsjZ7IlCpsLGdQBINg5bxKQ1K1sh6awxLtkA= github.com/jarcoal/httpmock v1.0.4 h1:jp+dy/+nonJE4g4xbVtl9QdrUNbn6/3hDT5R4nDIZnA= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1 h1:ujPKutqRlJtcfWk6toYVYagwra7HQHbXOaS171b4Tg8= @@ -705,6 +707,7 @@ github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHW github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 h1:rBMNdlhTLzJjJSDIjNEXX1Pz3Hmwmz91v+zycvx9PJc= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= @@ -714,6 +717,7 @@ github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j github.com/klauspost/cpuid v1.2.0 h1:NMpwD2G9JSFOE1/TJjGSo5zG7Yb2bTe7eq1jH+irmeE= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/pty v1.1.3 h1:/Um6a/ZmD5tF7peoOJ5oN5KMQ0DrGVQSXLNwyckutPk= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= @@ -773,6 +777,7 @@ github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+v github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/pkg/profile v1.2.1 h1:F++O52m40owAmADcojzM+9gyjmMOY/T4oYJkgFDH8RE= +github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/prometheus/client_golang v1.7.1 h1:NTGy1Ja9pByO+xAeH/qiWnLrKtr3hJPNjaVUwnjpdpA= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= @@ -851,7 +856,7 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs= go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= -go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -867,20 +872,17 @@ golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852 h1:xYq6+9AtI+xP3M4r0N1hCkHrInHDBohhquRgx9Kk6gI= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -891,7 +893,6 @@ golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= @@ -901,7 +902,7 @@ golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3j golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.3.1 h1:oJra/lMfmtm13/rgY/8i3MzjFWYXvQIAKjQ3HqofMk8= google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= -google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.40.0 h1:uWrpz12dpVPn7cojP82mk02XDgTJLDPc2KbVTxrWb4A= google.golang.org/api v0.125.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= google.golang.org/api v0.126.0 h1:q4GJq+cAdMAC7XP7njvQ4tvohGLiSlytuL4BQxbIZ+o= google.golang.org/api v0.126.0/go.mod h1:mBwVAtz+87bEN6CbA1GtZPDOqY2R5ONPqJeIlvyo4Aw= @@ -918,7 +919,6 @@ google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cba google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230629202037-9506855d4529/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= @@ -934,14 +934,17 @@ gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919 h1:tmXTu+dfa+d9Evp8NpJdgOy6+rt8/x4yG7qPBrtNfLY= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c h1:GohjlNKauSai7gN4wsJkeZ3WAJx4Sh+oT/b5IYn5suA= k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= +rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= sourcegraph.com/sourcegraph/go-diff v0.5.0 h1:eTiIR0CoWjGzJcnQ3OkhIl/b9GJovq4lSAVRt0ZFEG8= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4 h1:JPJh2pk3+X4lXAkZIk2RuE/7/FoK9maXw+TNPJhVS/c= From 15d5aa5348958e3af470f211fc7a51f18d9266d4 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Thu, 5 Oct 2023 01:46:45 -0400 Subject: [PATCH 09/11] add debug logs --- .../log_file_creator/log_file_creator_test.go | 51 ------------------- .../per_week_stream_logs_strategy.go | 2 +- .../volume_filesystem/volume_filesystem.go | 4 -- 3 files changed, 1 insertion(+), 56 deletions(-) delete mode 100644 engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go deleted file mode 100644 index 88fe4087b0..0000000000 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package log_file_creator - -const ( - testEnclaveUuid = "test-enclave-1" -) - -//func TestLogFileCreatorCreatesNewFilePaths(t *testing.T) { -// // mock the filesystem -// mapFS := &fstest.MapFS{} -// fs := volume_filesystem.NewMockedVolumeFilesystem(mapFS) -// -// // mock the time -// time := logs_clock.NewMockLogsClock(2023, 10, 5) -// -// // mock kurtosis backend GetUserServices call -// kurtosisBackend := backend_interface.NewMockKurtosisBackend(t) -// //kurtosisBackend.EXPECT(). -// // GetUserService() -// -// expectedFilePaths := []string{} -// -// // execute create new file paths function -// ctx := context.Background() -// fileCreator := NewLogFileCreator(time, kurtosisBackend, fs) -// err := fileCreator.CreateLogFiles(ctx) -// -// require.NoError(t, err) -// // check they exist in the mocked filesystem -// for _, path := range expectedFilePaths { -// file, err := fs.Stat(path) -// require.NoError(t, err) -// require.NotNil(t, file) -// } -//} -// -//func TestLogFileCreatorCreatesFilePathsIdempotently(t *testing.T) { -// // mock the filesystem -// // add file paths to the file system -// -// // mock the time -// -// // mock kurtosis backend GetUserServices call -// -// // execute create new file paths function -// -// // check that no new files are added -//} -// -//func TestLogFileCreatorCreatesNewFilePathsForOnlyNonExistentFilePaths(t *testing.T) { -// -//} diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy.go index 32febab692..43cf059118 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy.go @@ -102,8 +102,8 @@ func (strategy *PerWeekStreamLogsStrategy) StreamLogs( if err := strategy.followLogs(latestLogFile, logsByKurtosisUserServiceUuidChan, serviceUuid, conjunctiveLogLinesFiltersWithRegex); err != nil { streamErrChan <- stacktrace.Propagate(err, "An error occurred creating following logs for service '%v' in enclave '%v'", serviceUuid, enclaveUuid) return - } + logrus.Debugf("Following logs...") } } diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go index 415ff01114..72f2520ac0 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/volume_filesystem/volume_filesystem.go @@ -6,10 +6,6 @@ import ( "os" ) -const ( - forwardSlash = "/" -) - // VolumeFilesystem interface is an abstraction of the disk filesystem // primarily for the purpose of enabling unit testing persistentVolumeLogsDatabaseClient type VolumeFilesystem interface { From 994f6885c02c0ccd883b327c5ac186f2ef20d99f Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Thu, 5 Oct 2023 01:51:52 -0400 Subject: [PATCH 10/11] fmt --- .../persistent_volume/log_file_creator/log_file_creator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index cd59ac01a8..b0598ff077 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -93,7 +93,7 @@ func (creator *LogFileCreator) getEnclaveAndServiceInfo(ctx context.Context) (ma if err != nil { return nil, stacktrace.Propagate(err, "An error occurred while trying to get all enclaves from kurtosis backend.") } - for enclaveUuid, _ := range enclaves { + for enclaveUuid := range enclaves { var serviceRegistrations []*service.ServiceRegistration enclaveServices, err := creator.kurtosisBackend.GetUserServices(ctx, enclaveUuid, &service.ServiceFilters{}) From 079dcbcab9e76d60194c7f5c29e9097e2b8da125 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Thu, 5 Oct 2023 02:05:46 -0400 Subject: [PATCH 11/11] lint --- .../log_file_creator/log_file_creator.go | 4 +- .../log_remover/log_remover_test.go | 12 ++--- ...istent_volume_logs_database_client_test.go | 40 +++++++------- .../per_week_stream_logs_strategy_test.go | 54 +++++++++---------- 4 files changed, 55 insertions(+), 55 deletions(-) diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go index b0598ff077..93168672ed 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_file_creator/log_file_creator.go @@ -89,14 +89,14 @@ func (creator *LogFileCreator) CreateLogFiles(ctx context.Context) error { func (creator *LogFileCreator) getEnclaveAndServiceInfo(ctx context.Context) (map[enclave.EnclaveUUID][]*service.ServiceRegistration, error) { enclaveToServicesMap := map[enclave.EnclaveUUID][]*service.ServiceRegistration{} - enclaves, err := creator.kurtosisBackend.GetEnclaves(ctx, &enclave.EnclaveFilters{}) + enclaves, err := creator.kurtosisBackend.GetEnclaves(ctx, &enclave.EnclaveFilters{UUIDs: nil, Statuses: nil}) if err != nil { return nil, stacktrace.Propagate(err, "An error occurred while trying to get all enclaves from kurtosis backend.") } for enclaveUuid := range enclaves { var serviceRegistrations []*service.ServiceRegistration - enclaveServices, err := creator.kurtosisBackend.GetUserServices(ctx, enclaveUuid, &service.ServiceFilters{}) + enclaveServices, err := creator.kurtosisBackend.GetUserServices(ctx, enclaveUuid, &service.ServiceFilters{Names: nil, UUIDs: nil, Statuses: nil}) if err != nil { return nil, stacktrace.Propagate(err, "An error occurred while trying to get user services for enclave '%v' from kurtosis backend.", enclaveUuid) } diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go index 5a82f83462..ce4cbced91 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/log_remover/log_remover_test.go @@ -28,12 +28,12 @@ func TestLogRemover_Run(t *testing.T) { week1filepath := getWeekFilepathStr(2023, 1) week2filepath := getWeekFilepathStr(2023, 2) - mockFs.Create(week49filepath) - mockFs.Create(week50filepath) - mockFs.Create(week51filepath) - mockFs.Create(week52filepath) - mockFs.Create(week1filepath) - mockFs.Create(week2filepath) + _, _ = mockFs.Create(week49filepath) + _, _ = mockFs.Create(week50filepath) + _, _ = mockFs.Create(week51filepath) + _, _ = mockFs.Create(week52filepath) + _, _ = mockFs.Create(week1filepath) + _, _ = mockFs.Create(week2filepath) currentWeek := 2 diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go index c6f474906e..d8d19b21db 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/persistent_volume_logs_database_client_test.go @@ -259,7 +259,7 @@ func TestStreamUserServiceLogs_ThousandsOfLogLinesSuccessfulExecution(t *testing file1PathStr := fmt.Sprintf(volume_consts.PerFileFmtStr, volume_consts.LogsStorageDirpath, string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) file1, _ := underlyingFs.Create(file1PathStr) - file1.WriteString(logLinesStr) + _, _ = file1.WriteString(logLinesStr) perFileStreamStrategy := stream_logs_strategy.NewPerFileStreamLogsStrategy() @@ -309,7 +309,7 @@ func TestStreamUserServiceLogsPerWeek_ThousandsOfLogLinesSuccessfulExecution(t * underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() file1PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(startingWeek), string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) file1, _ := underlyingFs.Create(file1PathStr) - file1.WriteString(logLinesStr) + _, _ = file1.WriteString(logLinesStr) mockTime := logs_clock.NewMockLogsClock(defaultYear, startingWeek, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -352,7 +352,7 @@ func TestStreamUserServiceLogs_EmptyLogLines(t *testing.T) { underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() file1PathStr := fmt.Sprintf("%s%s/%s%s", volume_consts.LogsStorageDirpath, string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) file1, _ := underlyingFs.Create(file1PathStr) - file1.WriteString(logLinesStr) + _, _ = file1.WriteString(logLinesStr) perFileStreamStrategy := stream_logs_strategy.NewPerFileStreamLogsStrategy() @@ -393,7 +393,7 @@ func TestStreamUserServiceLogsPerWeek_EmptyLogLines(t *testing.T) { underlyingFs := volume_filesystem.NewMockedVolumeFilesystem() file1PathStr := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(startingWeek), string(enclaveUuid), testUserService1Uuid, volume_consts.Filetype) file1, _ := underlyingFs.Create(file1PathStr) - file1.WriteString(logLinesStr) + _, _ = file1.WriteString(logLinesStr) mockTime := logs_clock.NewMockLogsClock(defaultYear, startingWeek, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -451,11 +451,11 @@ func TestStreamUserServiceLogsPerWeek_WithLogsAcrossWeeks(t *testing.T) { week4filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(4), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) week4, _ := underlyingFs.Create(week4filepath) - week4.WriteString(week4logLinesStr) + _, _ = week4.WriteString(week4logLinesStr) week3filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(3), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) week3, _ := underlyingFs.Create(week3filepath) - week3.WriteString(week3logLinesStr) + _, _ = week3.WriteString(week3logLinesStr) mockTime := logs_clock.NewMockLogsClock(defaultYear, 4, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -514,11 +514,11 @@ func TestStreamUserServiceLogsPerWeek_WithLogLineAcrossWeeks(t *testing.T) { week4filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(4), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) week4, _ := underlyingFs.Create(week4filepath) - week4.WriteString(week4logLinesStr) + _, _ = week4.WriteString(week4logLinesStr) week3filepath := fmt.Sprintf(volume_consts.PerWeekFilePathFmtStr, volume_consts.LogsStorageDirpath, strconv.Itoa(defaultYear), strconv.Itoa(3), testEnclaveUuid, testUserService1Uuid, volume_consts.Filetype) week3, _ := underlyingFs.Create(week3filepath) - week3.WriteString(week3logLinesStr) + _, _ = week3.WriteString(week3logLinesStr) mockTime := logs_clock.NewMockLogsClock(defaultYear, 4, defaultDay) perWeekStreamStrategy := stream_logs_strategy.NewPerWeekStreamLogsStrategy(mockTime) @@ -634,13 +634,13 @@ func createFilledPerFileFilesystem() volume_filesystem.VolumeFilesystem { mapFs := volume_filesystem.NewMockedVolumeFilesystem() file1, _ := mapFs.Create(file1PathStr) - file1.WriteString(logLinesStr) + _, _ = file1.WriteString(logLinesStr) file2, _ := mapFs.Create(file2PathStr) - file2.WriteString(logLinesStr) + _, _ = file2.WriteString(logLinesStr) file3, _ := mapFs.Create(file3PathStr) - file3.WriteString(logLinesStr) + _, _ = file3.WriteString(logLinesStr) return mapFs } @@ -657,13 +657,13 @@ func createFilledPerWeekFilesystem(week int) volume_filesystem.VolumeFilesystem mapFs := volume_filesystem.NewMockedVolumeFilesystem() file1, _ := mapFs.Create(file1PathStr) - file1.WriteString(logLinesStr) + _, _ = file1.WriteString(logLinesStr) file2, _ := mapFs.Create(file2PathStr) - file2.WriteString(logLinesStr) + _, _ = file2.WriteString(logLinesStr) file3, _ := mapFs.Create(file3PathStr) - file3.WriteString(logLinesStr) + _, _ = file3.WriteString(logLinesStr) return mapFs } @@ -675,9 +675,9 @@ func createEmptyPerFileFilesystem() volume_filesystem.VolumeFilesystem { mapFs := volume_filesystem.NewMockedVolumeFilesystem() - mapFs.Create(file1PathStr) - mapFs.Create(file2PathStr) - mapFs.Create(file3PathStr) + _, _ = mapFs.Create(file1PathStr) + _, _ = mapFs.Create(file2PathStr) + _, _ = mapFs.Create(file3PathStr) return mapFs } @@ -689,9 +689,9 @@ func createEmptyPerWeekFilesystem(week int) volume_filesystem.VolumeFilesystem { mapFs := volume_filesystem.NewMockedVolumeFilesystem() - mapFs.Create(file1PathStr) - mapFs.Create(file2PathStr) - mapFs.Create(file3PathStr) + _, _ = mapFs.Create(file1PathStr) + _, _ = mapFs.Create(file2PathStr) + _, _ = mapFs.Create(file3PathStr) return mapFs } diff --git a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go index fb56311663..c46d49942c 100644 --- a/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go +++ b/engine/server/engine/centralized_logs/client_implementations/persistent_volume/stream_logs_strategy/per_week_stream_logs_strategy_test.go @@ -34,12 +34,12 @@ func TestGetLogFilePaths(t *testing.T) { week16filepath := getWeekFilepathStr(defaultYear, 16) week17filepath := getWeekFilepathStr(defaultYear, 17) - filesystem.Create(week12filepath) - filesystem.Create(week13filepath) - filesystem.Create(week14filepath) - filesystem.Create(week15filepath) - filesystem.Create(week16filepath) - filesystem.Create(week17filepath) + _, _ = filesystem.Create(week12filepath) + _, _ = filesystem.Create(week13filepath) + _, _ = filesystem.Create(week14filepath) + _, _ = filesystem.Create(week15filepath) + _, _ = filesystem.Create(week16filepath) + _, _ = filesystem.Create(week17filepath) currentWeek := 17 @@ -72,11 +72,11 @@ func TestGetLogFilePathsAcrossNewYear(t *testing.T) { week1filepath := getWeekFilepathStr(defaultYear, 1) week2filepath := getWeekFilepathStr(defaultYear, 2) - filesystem.Create(week50filepath) - filesystem.Create(week51filepath) - filesystem.Create(week52filepath) - filesystem.Create(week1filepath) - filesystem.Create(week2filepath) + _, _ = filesystem.Create(week50filepath) + _, _ = filesystem.Create(week51filepath) + _, _ = filesystem.Create(week52filepath) + _, _ = filesystem.Create(week1filepath) + _, _ = filesystem.Create(week2filepath) currentWeek := 2 @@ -109,11 +109,11 @@ func TestGetLogFilePathsAcrossNewYearWith53Weeks(t *testing.T) { week2filepath := getWeekFilepathStr(2016, 2) week3filepath := getWeekFilepathStr(2016, 3) - filesystem.Create(week52filepath) - filesystem.Create(week53filepath) - filesystem.Create(week1filepath) - filesystem.Create(week2filepath) - filesystem.Create(week3filepath) + _, _ = filesystem.Create(week52filepath) + _, _ = filesystem.Create(week53filepath) + _, _ = filesystem.Create(week1filepath) + _, _ = filesystem.Create(week2filepath) + _, _ = filesystem.Create(week3filepath) currentWeek := 3 @@ -144,9 +144,9 @@ func TestGetLogFilePathsWithDiffRetentionPeriod(t *testing.T) { week1filepath := getWeekFilepathStr(defaultYear, 1) week2filepath := getWeekFilepathStr(defaultYear, 2) - filesystem.Create(week52filepath) - filesystem.Create(week1filepath) - filesystem.Create(week2filepath) + _, _ = filesystem.Create(week52filepath) + _, _ = filesystem.Create(week1filepath) + _, _ = filesystem.Create(week2filepath) currentWeek := 2 retentionPeriod := 2 @@ -176,9 +176,9 @@ func TestGetLogFilePathsReturnsAllAvailableWeeks(t *testing.T) { week1filepath := getWeekFilepathStr(defaultYear, 1) week2filepath := getWeekFilepathStr(defaultYear, 2) - filesystem.Create(week52filepath) - filesystem.Create(week1filepath) - filesystem.Create(week2filepath) + _, _ = filesystem.Create(week52filepath) + _, _ = filesystem.Create(week1filepath) + _, _ = filesystem.Create(week2filepath) // should return existing file paths even though log files going all the back to retention period don't exist expectedLogFilePaths := []string{ @@ -208,9 +208,9 @@ func TestGetLogFilePathsReturnsCorrectPathsIfWeeksMissingInBetween(t *testing.T) week1filepath := getWeekFilepathStr(defaultYear, 1) week3filepath := getWeekFilepathStr(defaultYear, 3) - filesystem.Create(week52filepath) - filesystem.Create(week1filepath) - filesystem.Create(week3filepath) + _, _ = filesystem.Create(week52filepath) + _, _ = filesystem.Create(week1filepath) + _, _ = filesystem.Create(week3filepath) currentWeek := 3 @@ -235,8 +235,8 @@ func TestGetLogFilePathsReturnsCorrectPathsIfCurrentWeekHasNoLogsYet(t *testing. week2filepath := getWeekFilepathStr(defaultYear, 2) // no logs for week current week exist yet - filesystem.Create(week1filepath) - filesystem.Create(week2filepath) + _, _ = filesystem.Create(week1filepath) + _, _ = filesystem.Create(week2filepath) // should return week 1 and 2 logs, even though no logs for current week yet expectedLogFilePaths := []string{