From 407b61598f68038866a8be7eadaa8d07cc59fcca Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 10:46:16 +0800 Subject: [PATCH 01/42] aa --- .github/workflows/clear.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/clear.yml diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml new file mode 100644 index 000000000000..ea48c01f31cd --- /dev/null +++ b/.github/workflows/clear.yml @@ -0,0 +1,14 @@ +--- +name: clear old packages +on: + schedule: + - cron: "0 0 * * *" + +jobs: + scan-old-package: + runs-on: ubuntu-22.04 + + steps: + - name: Scan old package versions and store the version id to env + run: | + ls From 5a9f18413891ff3c7a9bb86312f4c843d499e295 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 11:08:08 +0800 Subject: [PATCH 02/42] aa --- .github/workflows/clear.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index ea48c01f31cd..f7141a5f9961 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -1,8 +1,8 @@ --- name: clear old packages -on: - schedule: - - cron: "0 0 * * *" +on: workflow_dispatch + # schedule: + # - cron: "0 0 * * *" jobs: scan-old-package: From 6a00627f8042b3903c57552e433d6e78f3806b21 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 11:11:20 +0800 Subject: [PATCH 03/42] aa --- .github/workflows/clear.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index f7141a5f9961..102f81b29575 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -1,4 +1,4 @@ ---- + name: clear old packages on: workflow_dispatch # schedule: @@ -6,7 +6,7 @@ on: workflow_dispatch jobs: scan-old-package: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Scan old package versions and store the version id to env From e60529ebf87a0228c5a1a6afe6d0f73d56b981c5 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 11:15:44 +0800 Subject: [PATCH 04/42] aa --- .github/workflows/clear.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index 102f81b29575..d019c0ebcc02 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -7,8 +7,14 @@ on: workflow_dispatch jobs: scan-old-package: runs-on: ubuntu-latest - steps: + - uses: actions/checkout@v3 + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.19' + - name: Install dependencies + run: go get . - name: Scan old package versions and store the version id to env run: | - ls + ls -l From 2bc4b0e7c9f1558abfe3fdcdec0503b945d2a8f1 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 11:20:39 +0800 Subject: [PATCH 05/42] aa --- .github/workflows/clear.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index d019c0ebcc02..a995c7fa16c9 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -13,6 +13,8 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.19' + - name: + run: | - name: Install dependencies run: go get . - name: Scan old package versions and store the version id to env From b97bd788f4472d75263f3bbc5f11f53cbd99cf29 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 11:23:02 +0800 Subject: [PATCH 06/42] aa --- .github/workflows/clear.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index a995c7fa16c9..7eee0887cad3 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -13,8 +13,9 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.19' - - name: + - name: get current dir run: | + pwd - name: Install dependencies run: go get . - name: Scan old package versions and store the version id to env From e676cecb5129449d28218b32cd0c201bc9beee70 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 11:28:07 +0800 Subject: [PATCH 07/42] Update clear.yml test --- .github/workflows/clear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index 7eee0887cad3..d38bdc77e260 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -14,7 +14,7 @@ jobs: with: go-version: '1.19' - name: get current dir - run: | + run: | pwd - name: Install dependencies run: go get . From f82c0dcb9d5371aa20e41ab272630383bb286c22 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 11:37:02 +0800 Subject: [PATCH 08/42] aa --- cmd/cleantool/cleantool.go | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 cmd/cleantool/cleantool.go diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go new file mode 100644 index 000000000000..ef36223d66a6 --- /dev/null +++ b/cmd/cleantool/cleantool.go @@ -0,0 +1,48 @@ +package main + +import ( + "context" + "log" + "time" + + "github.com/google/go-github/v52/github" + "golang.org/x/oauth2" +) + +func main() { + ctx := context.Background() + ts := oauth2.StaticTokenSource( + &oauth2.Token{AccessToken: "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"}, + ) + tc := oauth2.NewClient(ctx, ts) + client := github.NewClient(tc) + + packageType := "container" + packageName := "ferretdb-dev" + orgName := "FerretDB" + daysBack := 90 + pageSize := 100 + var versions []int64 + for i := 1; i < 100; i++ { + listOption := github.ListOptions{Page: i, PerPage: pageSize} + packageListOption := github.PackageListOptions{ListOptions: listOption} + packages, _, err := client.Organizations.PackageGetAllVersions(ctx, orgName, packageType, packageName, &packageListOption) + if err != nil { + log.Printf("Failed to get versions for page %d", i) + } + for _, v := range packages { + if time.Now().After(v.UpdatedAt.Add(time.Duration(daysBack) * 24 * time.Hour)) { + log.Printf("Stale version: %v (%v, %s)", v.GetID(), v.GetVersion(), v.UpdatedAt) + versions = append(versions, v.GetID()) + } else { + log.Printf("skip version: %v (%v, %s)", v.GetID(), v.GetVersion(), v.UpdatedAt) + } + } + if len(packages) < pageSize { + log.Printf("Come to the last page (page %d)", i) + break + } + + } + log.Println(versions) +} From d996268d071afad3cb27229033cd7fbf192de1ef Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 11:39:18 +0800 Subject: [PATCH 09/42] Update clear.yml aa --- .github/workflows/clear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index d38bdc77e260..b75963306235 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -17,7 +17,7 @@ jobs: run: | pwd - name: Install dependencies - run: go get . + run: go get ./cmd/cleantool - name: Scan old package versions and store the version id to env run: | ls -l From fec9b236621c9ea1524039ccdb9f2ab4e0c00913 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 11:43:55 +0800 Subject: [PATCH 10/42] aa --- cmd/cleantool/cleantool.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index ef36223d66a6..6e24219131de 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -4,6 +4,7 @@ import ( "context" "log" "time" + "os" "github.com/google/go-github/v52/github" "golang.org/x/oauth2" @@ -11,12 +12,12 @@ import ( func main() { ctx := context.Background() + token := os.Getenv("FOO") ts := oauth2.StaticTokenSource( - &oauth2.Token{AccessToken: "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"}, + &oauth2.Token{AccessToken: token}, ) tc := oauth2.NewClient(ctx, ts) client := github.NewClient(tc) - packageType := "container" packageName := "ferretdb-dev" orgName := "FerretDB" From 144093236cf713d4b455b0c514046a36c829b979 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 12:59:00 +0800 Subject: [PATCH 11/42] aa --- cmd/cleantool/cleantool.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index 6e24219131de..e5c16a251d3b 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -3,8 +3,8 @@ package main import ( "context" "log" - "time" "os" + "time" "github.com/google/go-github/v52/github" "golang.org/x/oauth2" @@ -12,7 +12,7 @@ import ( func main() { ctx := context.Background() - token := os.Getenv("FOO") + token := os.Getenv("ROBOT_TOKEN") ts := oauth2.StaticTokenSource( &oauth2.Token{AccessToken: token}, ) From 2a58a0bf3fd9799e6187914649b61d4147e0d8d1 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 13:01:03 +0800 Subject: [PATCH 12/42] aa --- .github/workflows/clear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index b75963306235..cff3088547ab 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -20,4 +20,4 @@ jobs: run: go get ./cmd/cleantool - name: Scan old package versions and store the version id to env run: | - ls -l + go run cmd/cleantool/cleantool.go From ff2dd8df262da258c3a49a7fa33aae074d8fb87d Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 16:50:46 +0800 Subject: [PATCH 13/42] aa --- cmd/cleantool/cleantool.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index e5c16a251d3b..f9981b606569 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -12,7 +12,11 @@ import ( func main() { ctx := context.Background() - token := os.Getenv("ROBOT_TOKEN") + tokenName := "ROBOT_TOKEN" + token := os.Getenv(tokenName) + if token == "" { + log.Fatalf("env %v is not found", tokenName) + } ts := oauth2.StaticTokenSource( &oauth2.Token{AccessToken: token}, ) From baece81d8d81e6911bb2e4b0dc23df379840d500 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 16:58:08 +0800 Subject: [PATCH 14/42] aa --- .github/workflows/clear.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index cff3088547ab..b2b7054e9bb7 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -19,5 +19,7 @@ jobs: - name: Install dependencies run: go get ./cmd/cleantool - name: Scan old package versions and store the version id to env + env: + ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} run: | go run cmd/cleantool/cleantool.go From c4a4c669b5682e243a3efbee4236d97fb0455707 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 16:59:54 +0800 Subject: [PATCH 15/42] aa --- cmd/cleantool/cleantool.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index f9981b606569..79838dc052d4 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -14,6 +14,9 @@ func main() { ctx := context.Background() tokenName := "ROBOT_TOKEN" token := os.Getenv(tokenName) + for _, v := range os.Environ() { + log.Println(v) + } if token == "" { log.Fatalf("env %v is not found", tokenName) } From a41a3363d153ca1692a0cafdee42491494f951a0 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 17:06:13 +0800 Subject: [PATCH 16/42] Update clear.yml aaa --- .github/workflows/clear.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index b2b7054e9bb7..bbc942e74229 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -21,5 +21,6 @@ jobs: - name: Scan old package versions and store the version id to env env: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} + ENV_NAME: just_a_test run: | go run cmd/cleantool/cleantool.go From 1069af2d5dac50b33b49dc4b98da35cbf2766cf7 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 17:24:17 +0800 Subject: [PATCH 17/42] Update clear.yml aa --- .github/workflows/clear.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index bbc942e74229..756211b3cfc3 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -18,6 +18,10 @@ jobs: pwd - name: Install dependencies run: go get ./cmd/cleantool + - name: get env + env: + ENV_NAME: just_a_test + run: echo $ENV_NAME - name: Scan old package versions and store the version id to env env: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} From 411c977926bf4a48d35dcd2ce7b77701fce3e5cd Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 17:25:21 +0800 Subject: [PATCH 18/42] Update clear.yml aa --- .github/workflows/clear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index 756211b3cfc3..e3afee0977ac 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -21,7 +21,7 @@ jobs: - name: get env env: ENV_NAME: just_a_test - run: echo $ENV_NAME + run: echo $ENV_NAME;env - name: Scan old package versions and store the version id to env env: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} From a7b73f15668d8a9e27fe22ca4e6f0c4f82ce5e33 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 17:26:27 +0800 Subject: [PATCH 19/42] Update clear.yml aa --- .github/workflows/clear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index e3afee0977ac..d1d60761bf83 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -24,7 +24,7 @@ jobs: run: echo $ENV_NAME;env - name: Scan old package versions and store the version id to env env: - ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} + ROBOT_TOKEN: just_a_token # ${{ secrets.ROBOT_TOKEN }} ENV_NAME: just_a_test run: | go run cmd/cleantool/cleantool.go From 9e4fade31c1f34b8ae30895f05d7d607a7cbcff4 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 17:28:11 +0800 Subject: [PATCH 20/42] Update clear.yml ss --- .github/workflows/clear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index d1d60761bf83..e3afee0977ac 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -24,7 +24,7 @@ jobs: run: echo $ENV_NAME;env - name: Scan old package versions and store the version id to env env: - ROBOT_TOKEN: just_a_token # ${{ secrets.ROBOT_TOKEN }} + ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} ENV_NAME: just_a_test run: | go run cmd/cleantool/cleantool.go From 60cdcadb318fa05bae4aaef057ca8606855ec05d Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 17:46:51 +0800 Subject: [PATCH 21/42] Update clear.yml aaa --- .github/workflows/clear.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index e3afee0977ac..5c30913b4db0 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -13,15 +13,15 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.19' - - name: get current dir - run: | - pwd + - name: Install dependencies run: go get ./cmd/cleantool - - name: get env + + - shell: bash env: - ENV_NAME: just_a_test - run: echo $ENV_NAME;env + SUPER_SECRET: ${{ secrets.SuperSecret }} + run: | + echo "a somple test $SUPER_SECRET" - name: Scan old package versions and store the version id to env env: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} From 212a706ea3fbdb72978983c978315afa8e892bd7 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 17:59:48 +0800 Subject: [PATCH 22/42] Update clear.yml aa --- .github/workflows/clear.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index 5c30913b4db0..db3af3959c44 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -13,18 +13,10 @@ jobs: uses: actions/setup-go@v4 with: go-version: '1.19' - - name: Install dependencies run: go get ./cmd/cleantool - - - shell: bash - env: - SUPER_SECRET: ${{ secrets.SuperSecret }} - run: | - echo "a somple test $SUPER_SECRET" - name: Scan old package versions and store the version id to env env: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} - ENV_NAME: just_a_test run: | go run cmd/cleantool/cleantool.go From 0fec9235f487c085e863824218a1301daf1d76a1 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 18:00:47 +0800 Subject: [PATCH 23/42] Update cleantool.go aa --- cmd/cleantool/cleantool.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index 79838dc052d4..cc3c3b1b8226 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -14,11 +14,8 @@ func main() { ctx := context.Background() tokenName := "ROBOT_TOKEN" token := os.Getenv(tokenName) - for _, v := range os.Environ() { - log.Println(v) - } if token == "" { - log.Fatalf("env %v is not found", tokenName) + log.Fatalf("env variable %v is not found, please set it before run it", tokenName) } ts := oauth2.StaticTokenSource( &oauth2.Token{AccessToken: token}, From cd32337551922b64bb1ac042726ecfec4bb91b87 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sat, 29 Apr 2023 18:32:51 +0800 Subject: [PATCH 24/42] aa --- cmd/cleantool/cleantool.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index cc3c3b1b8226..f281a193423e 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -2,11 +2,14 @@ package main import ( "context" + "fmt" "log" "os" + "strings" "time" "github.com/google/go-github/v52/github" + "github.com/sethvargo/go-githubactions" "golang.org/x/oauth2" ) @@ -27,7 +30,7 @@ func main() { orgName := "FerretDB" daysBack := 90 pageSize := 100 - var versions []int64 + var versions []string for i := 1; i < 100; i++ { listOption := github.ListOptions{Page: i, PerPage: pageSize} packageListOption := github.PackageListOptions{ListOptions: listOption} @@ -38,7 +41,7 @@ func main() { for _, v := range packages { if time.Now().After(v.UpdatedAt.Add(time.Duration(daysBack) * 24 * time.Hour)) { log.Printf("Stale version: %v (%v, %s)", v.GetID(), v.GetVersion(), v.UpdatedAt) - versions = append(versions, v.GetID()) + versions = append(versions, fmt.Sprintf("%v", (v.GetID()))) } else { log.Printf("skip version: %v (%v, %s)", v.GetID(), v.GetVersion(), v.UpdatedAt) } @@ -50,4 +53,8 @@ func main() { } log.Println(versions) + staleVersions := strings.Join(versions, ", ") + log.Printf("Setting STALE_VERSIONS to %q.", staleVersions) + githubactions.SetEnv("STALE_VERSIONS", staleVersions) + } From 0417e7471369554713b8910a9e3714c1d910f585 Mon Sep 17 00:00:00 2001 From: wqhhust Date: Sat, 29 Apr 2023 18:37:58 +0800 Subject: [PATCH 25/42] Update clear.yml aa --- .github/workflows/clear.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index db3af3959c44..19f100c2c229 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -20,3 +20,5 @@ jobs: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} run: | go run cmd/cleantool/cleantool.go + - name: echo STALE_VERSIONS + run: echo $STALE_VERSIONS From 9601530d92b517aa61131b41864aa3006a8a4b22 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Sun, 30 Apr 2023 20:02:24 +0800 Subject: [PATCH 26/42] aa --- .github/workflows/clear.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index 19f100c2c229..49b81f85c7af 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.19' + go-version: '1.20' - name: Install dependencies run: go get ./cmd/cleantool - name: Scan old package versions and store the version id to env From 49a4eee4fa201f116a2045743b7e0b0f4ebcbd58 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Tue, 2 May 2023 09:02:08 +0800 Subject: [PATCH 27/42] aa --- .github/workflows/clear.yml | 7 ++++--- cmd/cleantool/cleantool.go | 28 ++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.github/workflows/clear.yml b/.github/workflows/clear.yml index 49b81f85c7af..518d58bc29c9 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clear.yml @@ -1,8 +1,9 @@ name: clear old packages -on: workflow_dispatch - # schedule: - # - cron: "0 0 * * *" +on: + workflow_dispatch: + schedule: + - cron: "0 0 * * *" jobs: scan-old-package: diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index f281a193423e..e6749b0e24e2 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -1,3 +1,17 @@ +// Copyright 2021 FerretDB Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package main import ( @@ -9,7 +23,6 @@ import ( "time" "github.com/google/go-github/v52/github" - "github.com/sethvargo/go-githubactions" "golang.org/x/oauth2" ) @@ -30,13 +43,14 @@ func main() { orgName := "FerretDB" daysBack := 90 pageSize := 100 + pageIndex := 1 var versions []string - for i := 1; i < 100; i++ { - listOption := github.ListOptions{Page: i, PerPage: pageSize} + for { + listOption := github.ListOptions{Page: pageIndex, PerPage: pageSize} packageListOption := github.PackageListOptions{ListOptions: listOption} packages, _, err := client.Organizations.PackageGetAllVersions(ctx, orgName, packageType, packageName, &packageListOption) if err != nil { - log.Printf("Failed to get versions for page %d", i) + log.Printf("Failed to get versions for page %d", pageIndex) } for _, v := range packages { if time.Now().After(v.UpdatedAt.Add(time.Duration(daysBack) * 24 * time.Hour)) { @@ -47,14 +61,12 @@ func main() { } } if len(packages) < pageSize { - log.Printf("Come to the last page (page %d)", i) + log.Printf("Come to the last page (page %d)", pageIndex) break } - + pageIndex++ } log.Println(versions) staleVersions := strings.Join(versions, ", ") log.Printf("Setting STALE_VERSIONS to %q.", staleVersions) - githubactions.SetEnv("STALE_VERSIONS", staleVersions) - } From 25786237db43e229311e7397bc260b19ecc3295f Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Tue, 2 May 2023 09:40:12 +0800 Subject: [PATCH 28/42] aa --- .github/workflows/{clear.yml => clean.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{clear.yml => clean.yml} (95%) diff --git a/.github/workflows/clear.yml b/.github/workflows/clean.yml similarity index 95% rename from .github/workflows/clear.yml rename to .github/workflows/clean.yml index 518d58bc29c9..cdd94aa13b92 100644 --- a/.github/workflows/clear.yml +++ b/.github/workflows/clean.yml @@ -1,5 +1,5 @@ -name: clear old packages +name: clean old packages on: workflow_dispatch: schedule: From c3a578ca356b1d55dc9dd7e0adabd6d9e77cc727 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Tue, 2 May 2023 10:21:25 +0800 Subject: [PATCH 29/42] aa --- cmd/cleantool/cleantool.go | 24 ++++++++++++++------- go.mod | 19 ++++++++++++++++- go.sum | 43 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 8 deletions(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index e6749b0e24e2..358c704bab88 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -26,6 +26,20 @@ import ( "golang.org/x/oauth2" ) +func isPackageToBeClean(p *github.PackageVersion) bool { + daysBack := 90 + toBeClean := false + + if time.Now().After(p.UpdatedAt.Add(time.Duration(daysBack) * 24 * time.Hour)) { + log.Printf("Stale version: %v (%v, %s)", p.GetID(), p.GetVersion(), p.UpdatedAt) + toBeClean = true + } else { + log.Printf("skip version: %v (%v, %s)", p.GetID(), p.GetVersion(), p.UpdatedAt) + } + + return toBeClean +} + func main() { ctx := context.Background() tokenName := "ROBOT_TOKEN" @@ -41,7 +55,6 @@ func main() { packageType := "container" packageName := "ferretdb-dev" orgName := "FerretDB" - daysBack := 90 pageSize := 100 pageIndex := 1 var versions []string @@ -53,11 +66,8 @@ func main() { log.Printf("Failed to get versions for page %d", pageIndex) } for _, v := range packages { - if time.Now().After(v.UpdatedAt.Add(time.Duration(daysBack) * 24 * time.Hour)) { - log.Printf("Stale version: %v (%v, %s)", v.GetID(), v.GetVersion(), v.UpdatedAt) - versions = append(versions, fmt.Sprintf("%v", (v.GetID()))) - } else { - log.Printf("skip version: %v (%v, %s)", v.GetID(), v.GetVersion(), v.UpdatedAt) + if isPackageToBeClean(v) { + versions = append(versions, fmt.Sprintf("%v", v.GetID())) } } if len(packages) < pageSize { @@ -68,5 +78,5 @@ func main() { } log.Println(versions) staleVersions := strings.Join(versions, ", ") - log.Printf("Setting STALE_VERSIONS to %q.", staleVersions) + log.Printf("STALE_VERSIONS is: %q.", staleVersions) } diff --git a/go.mod b/go.mod index 0140b5ec361f..ebe53ae82209 100644 --- a/go.mod +++ b/go.mod @@ -25,13 +25,21 @@ require ( golang.org/x/sys v0.7.0 ) +require ( + github.com/google/go-github/v52 v52.0.0 + golang.org/x/oauth2 v0.7.0 +) + require ( cloud.google.com/go/compute v1.18.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect + github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/benbjohnson/clock v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cloudflare/circl v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deepmap/oapi-codegen v1.12.4 // indirect github.com/getkin/kin-openapi v0.114.0 // indirect @@ -39,10 +47,16 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-toolsmith/astcast v1.0.0 // indirect + github.com/go-toolsmith/astequal v1.0.0 // indirect + github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21 // indirect + github.com/go-toolsmith/pkgload v1.0.0 // indirect + github.com/go-toolsmith/typep v1.0.0 // indirect github.com/golang/glog v1.0.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.6.9 // indirect + github.com/google/go-querystring v1.1.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.1 // indirect github.com/invopop/yaml v0.2.0 // indirect @@ -51,6 +65,7 @@ require ( github.com/jackc/puddle/v2 v2.2.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kisielk/gotool v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -58,12 +73,14 @@ require ( github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/perimeterx/marshmallow v1.1.4 // indirect github.com/prometheus/procfs v0.9.0 // indirect + github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/oauth2 v0.5.0 // indirect + golang.org/x/mod v0.8.0 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/text v0.9.0 // indirect + golang.org/x/tools v0.6.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec // indirect google.golang.org/grpc v1.53.0 // indirect diff --git a/go.sum b/go.sum index bf6f94b9565e..b94a412bc76e 100644 --- a/go.sum +++ b/go.sum @@ -6,8 +6,12 @@ cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGB cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w= github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0= +github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796 h1:LkyKOzdmNBpJs/9iWbF7Dx4q0Ue0wESKUVLaUgcbpg8= +github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796/go.mod h1:V4gPjiBeLsr++PoZh39o+6fZ++EbypxSUmMplhmBNRY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/SAP/go-hdb v1.2.1 h1:Bd9jS47v10rVSCFSeMLjXIJUKDbLzlfwZAKjsKb4Fg8= github.com/SAP/go-hdb v1.2.1/go.mod h1:eWjj7L4p1HWEDbYjWasS0xp+jxSGaAwkZPK2KMyCfk0= @@ -24,11 +28,14 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -67,6 +74,17 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= +github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21 h1:wP6mXeB2V/d1P1K7bZ5vDUO3YqEzcvOREOxZPEu3gVI= +github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= +github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= +github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= +github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= 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/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= @@ -98,8 +116,13 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/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-github/v52 v52.0.0 h1:uyGWOY+jMQ8GVGSX8dkSwCzlehU3WfdxQ7GweO/JP7M= +github.com/google/go-github/v52 v52.0.0/go.mod h1:WJV6VEEUPuMo5pXqqa2ZCZEdbQqua4zAk2MZTIo+m+4= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -133,6 +156,7 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -173,6 +197,8 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82 h1:QF4W71MCNii0+HRHDb2MZibP8T/LOrHSeQFTOKOO+k0= +github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82/go.mod h1:J+D9JADOEBW+/QpzEDx79QyP1Y9HHeciwOrr1AlKqng= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= @@ -206,6 +232,7 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= @@ -225,6 +252,7 @@ go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -236,6 +264,9 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl 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.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= +golang.org/x/mod v0.8.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= @@ -247,14 +278,18 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= +golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= +golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= 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= @@ -274,6 +309,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -282,9 +320,11 @@ 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.5/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.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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= @@ -293,6 +333,9 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= From 33ed5eb15b144d0e53f052ee4401ffe18170db71 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Tue, 2 May 2023 10:28:33 +0800 Subject: [PATCH 30/42] aa --- .github/workflows/clean.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index cdd94aa13b92..1a5d8b83fbb8 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -21,5 +21,3 @@ jobs: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} run: | go run cmd/cleantool/cleantool.go - - name: echo STALE_VERSIONS - run: echo $STALE_VERSIONS From dcbcec6c7a9afd0be76309c12a3547b1e6376959 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Tue, 2 May 2023 15:33:43 +0800 Subject: [PATCH 31/42] aa --- cmd/cleantool/cleantool.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index 358c704bab88..937b1b24d3a9 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -26,15 +26,17 @@ import ( "golang.org/x/oauth2" ) +// if the most recent update time of the package was 90 days ago, then mark it as +// stale. func isPackageToBeClean(p *github.PackageVersion) bool { daysBack := 90 toBeClean := false if time.Now().After(p.UpdatedAt.Add(time.Duration(daysBack) * 24 * time.Hour)) { - log.Printf("Stale version: %v (%v, %s)", p.GetID(), p.GetVersion(), p.UpdatedAt) + log.Printf("Stale version id: %v , recent update was at %s", p.GetID(), p.UpdatedAt) toBeClean = true } else { - log.Printf("skip version: %v (%v, %s)", p.GetID(), p.GetVersion(), p.UpdatedAt) + log.Printf("Skip version id: %v , recent update was at %s", p.GetID(), p.UpdatedAt) } return toBeClean @@ -78,5 +80,5 @@ func main() { } log.Println(versions) staleVersions := strings.Join(versions, ", ") - log.Printf("STALE_VERSIONS is: %q.", staleVersions) + log.Printf("Found %d stale versions: %v", len(versions), staleVersions) } From e2370add62de015d73be047e46238cb7193c0e45 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Tue, 2 May 2023 15:48:07 +0800 Subject: [PATCH 32/42] aa --- cmd/cleantool/cleantool.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index 937b1b24d3a9..8e07d1ac25c4 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -78,7 +78,6 @@ func main() { } pageIndex++ } - log.Println(versions) staleVersions := strings.Join(versions, ", ") log.Printf("Found %d stale versions: %v", len(versions), staleVersions) } From e59448b857381cddcf6d8fa48c1fe7e58e0aeef8 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Wed, 3 May 2023 09:15:03 +0800 Subject: [PATCH 33/42] aaa --- cmd/cleantool/cleantool.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/cleantool/cleantool.go b/cmd/cleantool/cleantool.go index 8e07d1ac25c4..63b4052906ca 100644 --- a/cmd/cleantool/cleantool.go +++ b/cmd/cleantool/cleantool.go @@ -34,6 +34,7 @@ func isPackageToBeClean(p *github.PackageVersion) bool { if time.Now().After(p.UpdatedAt.Add(time.Duration(daysBack) * 24 * time.Hour)) { log.Printf("Stale version id: %v , recent update was at %s", p.GetID(), p.UpdatedAt) + toBeClean = true } else { log.Printf("Skip version id: %v , recent update was at %s", p.GetID(), p.UpdatedAt) @@ -46,9 +47,11 @@ func main() { ctx := context.Background() tokenName := "ROBOT_TOKEN" token := os.Getenv(tokenName) + if token == "" { log.Fatalf("env variable %v is not found, please set it before run it", tokenName) } + ts := oauth2.StaticTokenSource( &oauth2.Token{AccessToken: token}, ) @@ -59,25 +62,32 @@ func main() { orgName := "FerretDB" pageSize := 100 pageIndex := 1 + var versions []string + for { listOption := github.ListOptions{Page: pageIndex, PerPage: pageSize} packageListOption := github.PackageListOptions{ListOptions: listOption} packages, _, err := client.Organizations.PackageGetAllVersions(ctx, orgName, packageType, packageName, &packageListOption) + if err != nil { log.Printf("Failed to get versions for page %d", pageIndex) } + for _, v := range packages { if isPackageToBeClean(v) { versions = append(versions, fmt.Sprintf("%v", v.GetID())) } } + if len(packages) < pageSize { log.Printf("Come to the last page (page %d)", pageIndex) break } + pageIndex++ } + staleVersions := strings.Join(versions, ", ") log.Printf("Found %d stale versions: %v", len(versions), staleVersions) } From 6150cdf0355332a2d0bd8ba7f2ceb994512b57f0 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Wed, 3 May 2023 22:17:05 +0800 Subject: [PATCH 34/42] commit --- {cmd => tools}/cleantool/cleantool.go | 0 tools/go.mod | 8 +++----- tools/go.sum | 3 +++ 3 files changed, 6 insertions(+), 5 deletions(-) rename {cmd => tools}/cleantool/cleantool.go (100%) diff --git a/cmd/cleantool/cleantool.go b/tools/cleantool/cleantool.go similarity index 100% rename from cmd/cleantool/cleantool.go rename to tools/cleantool/cleantool.go diff --git a/tools/go.mod b/tools/go.mod index f256a22a5ccf..ab3a28f4f817 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -3,12 +3,13 @@ module github.com/FerretDB/FerretDB/tools go 1.20 require ( - github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796 - github.com/go-task/task/v3 v3.24.0 + github.com/go-task/task/v3 v3.20.0 + github.com/google/go-github/v41 v41.0.0 github.com/goreleaser/nfpm/v2 v2.28.0 github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82 github.com/reviewdog/reviewdog v0.14.1 github.com/stretchr/testify v1.8.2 + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 golang.org/x/perf v0.0.0-20230227161431-f7320a6d63e8 golang.org/x/tools v0.8.0 golang.org/x/vuln v0.0.0-20230419012003-9268f8338db8 @@ -49,7 +50,6 @@ require ( github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-github/v39 v39.2.0 // indirect - github.com/google/go-github/v41 v41.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gax-go/v2 v2.3.0 // indirect @@ -100,10 +100,8 @@ require ( go.opencensus.io v0.23.0 // indirect golang.org/x/build v0.0.0-20200616162219-07bebbe343e9 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/exp v0.0.0-20230212135524-a684f29349b6 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.9.0 // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/term v0.7.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index a0789eb7444d..6cc6c7bc66ba 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -175,6 +175,8 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/task/v3 v3.20.0 h1:pTavuhP+AiEpKLzh5I6Lja9Ux7ypYO5QMsEPTbhYEDc= +github.com/go-task/task/v3 v3.20.0/go.mod h1:y7rWakbLR5gFElGgo6rA2dyr6vU/zNIDVfn3S4Of6OI= github.com/go-task/task/v3 v3.24.0 h1:0DKsGTmqYbEaACffm9H2BOm8pTcuSnb5SRUl7TCilQ4= github.com/go-task/task/v3 v3.24.0/go.mod h1:wx5IE8QSi35PEcTt0eC37C1tOTrSVIWBpNtiC6R/V0E= github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= @@ -501,6 +503,7 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 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-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= golang.org/x/exp v0.0.0-20230212135524-a684f29349b6 h1:Ic9KukPQ7PegFzHckNiMTQXGgEszA7mY2Fn4ZMtnMbw= golang.org/x/exp v0.0.0-20230212135524-a684f29349b6/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE= From 1552427a6ca0aa6a65af6c0a9df441584d5f6ae4 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Wed, 3 May 2023 22:18:49 +0800 Subject: [PATCH 35/42] aa --- .github/workflows/clean.yml | 2 +- tools/cleantool/cleantool.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 1a5d8b83fbb8..b2c9887edc64 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -15,7 +15,7 @@ jobs: with: go-version: '1.20' - name: Install dependencies - run: go get ./cmd/cleantool + run: go get ./tools/cleantool - name: Scan old package versions and store the version id to env env: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} diff --git a/tools/cleantool/cleantool.go b/tools/cleantool/cleantool.go index 63b4052906ca..5a603c0e3d06 100644 --- a/tools/cleantool/cleantool.go +++ b/tools/cleantool/cleantool.go @@ -22,7 +22,7 @@ import ( "strings" "time" - "github.com/google/go-github/v52/github" + "github.com/google/go-github/v41/github" "golang.org/x/oauth2" ) From 81ea34c234e8357c1ac631a2b1387a18ac61fc86 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Wed, 3 May 2023 23:09:02 +0800 Subject: [PATCH 36/42] aa --- .github/workflows/clean.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index b2c9887edc64..aae0f4870025 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -15,9 +15,9 @@ jobs: with: go-version: '1.20' - name: Install dependencies - run: go get ./tools/cleantool + run: cd tools; go get ./cleantool - name: Scan old package versions and store the version id to env env: ROBOT_TOKEN: ${{ secrets.ROBOT_TOKEN }} run: | - go run cmd/cleantool/cleantool.go + cd tools;go run ./cleantool/cleantool.go From 4bfb3475b1bb9c62ce0291bca58d09c54a68c7de Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Wed, 3 May 2023 23:14:57 +0800 Subject: [PATCH 37/42] aa --- go.mod | 1 - 1 file changed, 1 deletion(-) diff --git a/go.mod b/go.mod index ebe53ae82209..167e125c2857 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,6 @@ require ( ) require ( - github.com/google/go-github/v52 v52.0.0 golang.org/x/oauth2 v0.7.0 ) From 25df91ace3f17a8e0fc02a536ae73b730c47cbc4 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Thu, 4 May 2023 09:26:19 +0800 Subject: [PATCH 38/42] run go mod tidy --- go.mod | 18 +----------------- go.sum | 43 ------------------------------------------- 2 files changed, 1 insertion(+), 60 deletions(-) diff --git a/go.mod b/go.mod index 167e125c2857..a40ef6299b56 100644 --- a/go.mod +++ b/go.mod @@ -25,20 +25,13 @@ require ( golang.org/x/sys v0.7.0 ) -require ( - golang.org/x/oauth2 v0.7.0 -) - require ( cloud.google.com/go/compute v1.18.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect github.com/benbjohnson/clock v1.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cloudflare/circl v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deepmap/oapi-codegen v1.12.4 // indirect github.com/getkin/kin-openapi v0.114.0 // indirect @@ -46,16 +39,10 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/swag v0.22.3 // indirect - github.com/go-toolsmith/astcast v1.0.0 // indirect - github.com/go-toolsmith/astequal v1.0.0 // indirect - github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21 // indirect - github.com/go-toolsmith/pkgload v1.0.0 // indirect - github.com/go-toolsmith/typep v1.0.0 // indirect github.com/golang/glog v1.0.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/gnostic v0.6.9 // indirect - github.com/google/go-querystring v1.1.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.1 // indirect github.com/invopop/yaml v0.2.0 // indirect @@ -64,7 +51,6 @@ require ( github.com/jackc/puddle/v2 v2.2.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/kisielk/gotool v1.0.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -72,14 +58,12 @@ require ( github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/perimeterx/marshmallow v1.1.4 // indirect github.com/prometheus/procfs v0.9.0 // indirect - github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82 // indirect github.com/rogpeppe/go-internal v1.10.0 // indirect go.uber.org/atomic v1.10.0 // indirect go.uber.org/multierr v1.6.0 // indirect - golang.org/x/mod v0.8.0 // indirect + golang.org/x/oauth2 v0.7.0 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/text v0.9.0 // indirect - golang.org/x/tools v0.6.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230222225845-10f96fb3dbec // indirect google.golang.org/grpc v1.53.0 // indirect diff --git a/go.sum b/go.sum index b94a412bc76e..5fcaef45b1c5 100644 --- a/go.sum +++ b/go.sum @@ -6,12 +6,8 @@ cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGB cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w= github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0= -github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796 h1:LkyKOzdmNBpJs/9iWbF7Dx4q0Ue0wESKUVLaUgcbpg8= -github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796/go.mod h1:V4gPjiBeLsr++PoZh39o+6fZ++EbypxSUmMplhmBNRY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/SAP/go-hdb v1.2.1 h1:Bd9jS47v10rVSCFSeMLjXIJUKDbLzlfwZAKjsKb4Fg8= github.com/SAP/go-hdb v1.2.1/go.mod h1:eWjj7L4p1HWEDbYjWasS0xp+jxSGaAwkZPK2KMyCfk0= @@ -28,14 +24,11 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudflare/circl v1.1.0 h1:bZgT/A+cikZnKIwn7xL2OBj012Bmvho/o6RpRvv3GKY= -github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -74,17 +67,6 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= -github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= -github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21 h1:wP6mXeB2V/d1P1K7bZ5vDUO3YqEzcvOREOxZPEu3gVI= -github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= -github.com/go-toolsmith/pkgload v1.0.0 h1:4DFWWMXVfbcN5So1sBNW9+yeiMqLFGl1wFLTL5R0Tgg= -github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= -github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= -github.com/go-toolsmith/typep v1.0.0 h1:zKymWyA1TRYvqYrYDrfEMZULyrhcnGY3x7LDKU2XQaA= -github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= 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/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= @@ -116,13 +98,8 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2/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-github/v52 v52.0.0 h1:uyGWOY+jMQ8GVGSX8dkSwCzlehU3WfdxQ7GweO/JP7M= -github.com/google/go-github/v52 v52.0.0/go.mod h1:WJV6VEEUPuMo5pXqqa2ZCZEdbQqua4zAk2MZTIo+m+4= -github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= -github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -156,7 +133,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -197,8 +173,6 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= -github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82 h1:QF4W71MCNii0+HRHDb2MZibP8T/LOrHSeQFTOKOO+k0= -github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82/go.mod h1:J+D9JADOEBW+/QpzEDx79QyP1Y9HHeciwOrr1AlKqng= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= @@ -232,7 +206,6 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= @@ -252,7 +225,6 @@ go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 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-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.8.0 h1:pd9TJtTueMTVQXzk8E2XESSMQDj/U7OUu0PqJqPXQjQ= golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -264,9 +236,6 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl 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.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= -golang.org/x/mod v0.8.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= @@ -278,16 +247,12 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= -golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -309,9 +274,6 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -320,11 +282,9 @@ 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.5/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.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/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= @@ -333,9 +293,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= From 1f7aaef44ec1c43a7015c2263cfd6cf06c17edd9 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Thu, 11 May 2023 10:22:02 +0800 Subject: [PATCH 39/42] aa --- .github/workflows/clean.yml | 5 ++--- tools/cleantool/cleantool.go | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index aae0f4870025..76d127217348 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -1,9 +1,8 @@ - name: clean old packages on: workflow_dispatch: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * *" jobs: scan-old-package: @@ -13,7 +12,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: "1.20" - name: Install dependencies run: cd tools; go get ./cleantool - name: Scan old package versions and store the version id to env diff --git a/tools/cleantool/cleantool.go b/tools/cleantool/cleantool.go index 5a603c0e3d06..7242c8b14e8b 100644 --- a/tools/cleantool/cleantool.go +++ b/tools/cleantool/cleantool.go @@ -69,7 +69,6 @@ func main() { listOption := github.ListOptions{Page: pageIndex, PerPage: pageSize} packageListOption := github.PackageListOptions{ListOptions: listOption} packages, _, err := client.Organizations.PackageGetAllVersions(ctx, orgName, packageType, packageName, &packageListOption) - if err != nil { log.Printf("Failed to get versions for page %d", pageIndex) } From d68a9eb4b4c8ca037e9cd0a43353628669d45542 Mon Sep 17 00:00:00 2001 From: "Daniel.Wu" Date: Fri, 12 May 2023 14:21:45 +0800 Subject: [PATCH 40/42] run lint --- tools/go.mod | 4 +++- tools/go.sum | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index ebdbd2aa1c4b..6a9d15657e54 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -3,12 +3,14 @@ module github.com/FerretDB/FerretDB/tools go 1.20 require ( + github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796 github.com/go-task/task/v3 v3.20.0 github.com/google/go-github/v41 v41.0.0 github.com/goreleaser/nfpm/v2 v2.28.0 github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82 github.com/reviewdog/reviewdog v0.14.1 github.com/stretchr/testify v1.8.2 + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 golang.org/x/perf v0.0.0-20230427221525-d343f6398b76 golang.org/x/tools v0.9.0 golang.org/x/vuln v0.1.0 @@ -99,9 +101,9 @@ require ( go.opencensus.io v0.23.0 // indirect golang.org/x/build v0.0.0-20200616162219-07bebbe343e9 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect + golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sync v0.2.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.8.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index 70d4da6dcb76..396047b8567c 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -177,8 +177,6 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8Wd github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/task/v3 v3.20.0 h1:pTavuhP+AiEpKLzh5I6Lja9Ux7ypYO5QMsEPTbhYEDc= github.com/go-task/task/v3 v3.20.0/go.mod h1:y7rWakbLR5gFElGgo6rA2dyr6vU/zNIDVfn3S4Of6OI= -github.com/go-task/task/v3 v3.24.0 h1:0DKsGTmqYbEaACffm9H2BOm8pTcuSnb5SRUl7TCilQ4= -github.com/go-task/task/v3 v3.24.0/go.mod h1:wx5IE8QSi35PEcTt0eC37C1tOTrSVIWBpNtiC6R/V0E= github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= @@ -504,8 +502,7 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 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-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20230212135524-a684f29349b6 h1:Ic9KukPQ7PegFzHckNiMTQXGgEszA7mY2Fn4ZMtnMbw= -golang.org/x/exp v0.0.0-20230212135524-a684f29349b6/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= From 244fe7c147ae7b9e3f2650c1f05aa13a524dd721 Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Fri, 12 May 2023 10:35:45 +0400 Subject: [PATCH 41/42] Bump deps --- tools/go.mod | 8 ++++---- tools/go.sum | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/go.mod b/tools/go.mod index 6a9d15657e54..5fa8ea3382e1 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -4,15 +4,15 @@ go 1.20 require ( github.com/BurntSushi/go-sumtype v0.0.0-20221020234012-480526a59796 - github.com/go-task/task/v3 v3.20.0 + github.com/go-task/task/v3 v3.24.0 github.com/google/go-github/v41 v41.0.0 github.com/goreleaser/nfpm/v2 v2.28.0 github.com/quasilyte/go-consistent v0.0.0-20220429160651-4e46040fbc82 github.com/reviewdog/reviewdog v0.14.1 github.com/stretchr/testify v1.8.2 - golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 + golang.org/x/oauth2 v0.8.0 golang.org/x/perf v0.0.0-20230427221525-d343f6398b76 - golang.org/x/tools v0.9.0 + golang.org/x/tools v0.9.1 golang.org/x/vuln v0.1.0 mvdan.cc/gofumpt v0.5.0 ) @@ -101,7 +101,7 @@ require ( go.opencensus.io v0.23.0 // indirect golang.org/x/build v0.0.0-20200616162219-07bebbe343e9 // indirect golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9 // indirect + golang.org/x/exp v0.0.0-20230212135524-a684f29349b6 // indirect golang.org/x/mod v0.10.0 // indirect golang.org/x/net v0.10.0 // indirect golang.org/x/sync v0.2.0 // indirect diff --git a/tools/go.sum b/tools/go.sum index 396047b8567c..98819e554391 100644 --- a/tools/go.sum +++ b/tools/go.sum @@ -175,8 +175,8 @@ github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/task/v3 v3.20.0 h1:pTavuhP+AiEpKLzh5I6Lja9Ux7ypYO5QMsEPTbhYEDc= -github.com/go-task/task/v3 v3.20.0/go.mod h1:y7rWakbLR5gFElGgo6rA2dyr6vU/zNIDVfn3S4Of6OI= +github.com/go-task/task/v3 v3.24.0 h1:0DKsGTmqYbEaACffm9H2BOm8pTcuSnb5SRUl7TCilQ4= +github.com/go-task/task/v3 v3.24.0/go.mod h1:wx5IE8QSi35PEcTt0eC37C1tOTrSVIWBpNtiC6R/V0E= github.com/go-toolsmith/astcast v1.0.0 h1:JojxlmI6STnFVG9yOImLeGREv8W2ocNUM+iOhR6jE7g= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= @@ -501,8 +501,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 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-20220930202632-ec3f01382ef9 h1:RjggHMcaTVp0LOVZcW0bo8alwHrOaCrGUDgfWUHhnN4= -golang.org/x/exp v0.0.0-20220930202632-ec3f01382ef9/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/exp v0.0.0-20230212135524-a684f29349b6 h1:Ic9KukPQ7PegFzHckNiMTQXGgEszA7mY2Fn4ZMtnMbw= +golang.org/x/exp v0.0.0-20230212135524-a684f29349b6/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE= golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= @@ -601,8 +601,8 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= -golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +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/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/perf v0.0.0-20230427221525-d343f6398b76 h1:cPGZx8Liyx5Pq/yX80/6WMKe2yidT0xvVCQBOGa8WHU= golang.org/x/perf v0.0.0-20230427221525-d343f6398b76/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= @@ -756,8 +756,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.9.0 h1:CtBMYmb33qYal6XpayZzNXlyK/3FpZV8bDq4CZo57b8= -golang.org/x/tools v0.9.0/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= +golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo= +golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/vuln v0.1.0 h1:9GRdj6wAIkDrsMevuolY+SXERPjQPp2P1ysYA0jpZe0= golang.org/x/vuln v0.1.0/go.mod h1:/YuzZYjGbwB8y19CisAppfyw3uTZnuCz3r+qgx/QRzU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From a20e263d04540616017369fb1901650d16ce702b Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Fri, 12 May 2023 10:36:40 +0400 Subject: [PATCH 42/42] Disable workflow for now --- .github/workflows/clean.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 76d127217348..0025a4fd09f5 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -7,6 +7,10 @@ on: jobs: scan-old-package: runs-on: ubuntu-latest + + # disable for now + if: false + steps: - uses: actions/checkout@v3 - name: Set up Go