From d880a8726482ccc9842124fe33aa26d9e49fcac5 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 11:56:14 -0400 Subject: [PATCH 01/22] install nsc --- docker/goreleaser/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/goreleaser/Dockerfile b/docker/goreleaser/Dockerfile index 37c9dafc6d..d325f2b92a 100644 --- a/docker/goreleaser/Dockerfile +++ b/docker/goreleaser/Dockerfile @@ -120,3 +120,8 @@ RUN apt-get update && apt-get install -y nodejs RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin RUN rm -rf /var/lib/apt/lists/* /var/log/apt/* /tmp/* /var/tmp/* + + +RUN curl -fsSL https://get.namespace.so/cloud/install.sh | NS_ROOT=/usr/local sh && exit 0 +ENV NS_ROOT=/usr/local/bin +ENV PATH=${PATH}:/usr/local/bin From a37c3853ee55018a2e40512187e22c0c7e7a4cd0 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:04:30 -0400 Subject: [PATCH 02/22] install nsc --- .github/workflows/go.yml | 12 ++++++++++-- core/README.md | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index de5090c565..9f9bb6f82d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -77,7 +77,7 @@ jobs: test: name: Go Coverage - runs-on: ${{ matrix.platform }} + runs-on: namespace-profile-default-coverage-runner # ${{ matrix.platform }} if: ${{ needs.changes.outputs.package_count_deps > 0 && (github.event_name != 'push' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }} needs: changes strategy: @@ -105,7 +105,15 @@ jobs: run: working-directory: ${{ matrix.package }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 + if: ${{ !contains(runner.name, 'nsc') }} + with: + fetch-depth: 2 + submodules: 'recursive' + + - name: Checkout with Namespace Git mirrors cache + uses: namespacelabs/nscloud-checkout-action@v5 + if: ${{ contains(runner.name, 'nsc') }} with: fetch-depth: 2 submodules: 'recursive' diff --git a/core/README.md b/core/README.md index 646b106eea..e307596658 100644 --- a/core/README.md +++ b/core/README.md @@ -27,3 +27,4 @@ root ├── testsuite: Provides a wrapper around testify/suite. ├── threaditer: Provides a thread-safe generic iterator for a slice. + From 72cec9fba9b220b1da4b6ca8e0b3344116a9ee9f Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:08:31 -0400 Subject: [PATCH 03/22] install nsc --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9f9bb6f82d..9c06004191 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -105,7 +105,7 @@ jobs: run: working-directory: ${{ matrix.package }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v4 if: ${{ !contains(runner.name, 'nsc') }} with: fetch-depth: 2 From 6f5ded5ee36465597e5bd1a6530ca281b34b29c3 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:13:53 -0400 Subject: [PATCH 04/22] cleanup --- .github/workflows/go.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 9c06004191..5d431516e6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -116,7 +116,10 @@ jobs: if: ${{ contains(runner.name, 'nsc') }} with: fetch-depth: 2 - submodules: 'recursive' + submodules: 'false' + + - name: F + run: nsc git-checkout update-submodules --mirror_base_path=${NSC_GIT_MIRROR} --repository_path=${GITHUB_WORKSPACE} --recurse - name: Go modules cache uses: actions/cache@v4 From c16740ddf39a333cc9c654f5de857fd25e15662e Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:21:02 -0400 Subject: [PATCH 05/22] cache --- .github/workflows/go.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 5d431516e6..316b1198fd 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -106,23 +106,13 @@ jobs: working-directory: ${{ matrix.package }} steps: - uses: actions/checkout@v4 - if: ${{ !contains(runner.name, 'nsc') }} with: fetch-depth: 2 submodules: 'recursive' - - name: Checkout with Namespace Git mirrors cache - uses: namespacelabs/nscloud-checkout-action@v5 - if: ${{ contains(runner.name, 'nsc') }} - with: - fetch-depth: 2 - submodules: 'false' - - - name: F - run: nsc git-checkout update-submodules --mirror_base_path=${NSC_GIT_MIRROR} --repository_path=${GITHUB_WORKSPACE} --recurse - - name: Go modules cache uses: actions/cache@v4 + if: ${{ !contains(runner.name, 'nsc') }} with: # see https://github.com/mvdan/github-actions-golang # also: https://glebbahmutov.com/blog/do-not-let-npm-cache-snowball/ w/ go build (workaround now is having a cache that just gets expired at night) @@ -139,6 +129,13 @@ jobs: uses: actions/setup-go@v5 with: go-version: ${{ matrix.go-version }} + cache: ${{ contains(runner.name, 'nsc') && 'false' || 'true' }} + + - name: Setup Go cache + uses: namespacelabs/nscloud-cache-action@v1 + if: ${{ contains(runner.name, 'nsc') }} + with: + cache: go - name: Verify MariaDB connection env: From 2f5430474f23965c32879688f59090e65bed2297 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:36:45 -0400 Subject: [PATCH 06/22] add cache key --- .github/workflows/go.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 316b1198fd..059ece3ad3 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -77,7 +77,7 @@ jobs: test: name: Go Coverage - runs-on: namespace-profile-default-coverage-runner # ${{ matrix.platform }} + runs-on: ${{ contains(matrix.pacakge, 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner') }} namespace-profile-default-coverage-runner # ${{ matrix.platform }} if: ${{ needs.changes.outputs.package_count_deps > 0 && (github.event_name != 'push' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }} needs: changes strategy: @@ -131,6 +131,7 @@ jobs: go-version: ${{ matrix.go-version }} cache: ${{ contains(runner.name, 'nsc') && 'false' || 'true' }} + # TODO: consider setting up cache key, see: https://discord.com/channels/975088590705012777/1263347501721714793/1263534719954452560 - name: Setup Go cache uses: namespacelabs/nscloud-cache-action@v1 if: ${{ contains(runner.name, 'nsc') }} @@ -209,7 +210,7 @@ jobs: MYSQL_DATABASE: test MYSQL_ROOT_PASSWORD: password MYSQL_PORT: ${{ job.services.mariadb.ports[3306] }} - GOMEMLIMIT: 3GiB + GOMEMLIMIT: 8GiB GOGC: -1 ETHEREUM_RPC_URI: ${{ secrets.ETHEREUM_RPC_URI }} GOPROXY: https://proxy.golang.org From aebb762409aad2c83b1ba71133fe4b9420ab6dc6 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:39:02 -0400 Subject: [PATCH 07/22] more clean --- .github/workflows/go.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 059ece3ad3..cb10d5d92a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -77,7 +77,7 @@ jobs: test: name: Go Coverage - runs-on: ${{ contains(matrix.pacakge, 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner') }} namespace-profile-default-coverage-runner # ${{ matrix.platform }} + runs-on: ${{ contains(matrix.pacakge, 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner') }} # ${{ matrix.platform }} if: ${{ needs.changes.outputs.package_count_deps > 0 && (github.event_name != 'push' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }} needs: changes strategy: @@ -263,8 +263,6 @@ jobs: matrix: go-version: - 1.22.x - platform: - - ubuntu-latest steps: - uses: actions/checkout@v4 with: From f05ce3324f01e26b69f2c4ed20cdeb48b6950593 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:40:59 -0400 Subject: [PATCH 08/22] matrix.package fix --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cb10d5d92a..b225cb3e7c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -77,7 +77,7 @@ jobs: test: name: Go Coverage - runs-on: ${{ contains(matrix.pacakge, 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner') }} # ${{ matrix.platform }} + runs-on: ${{ contains(matrix.package, 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner') }} # ${{ matrix.platform }} if: ${{ needs.changes.outputs.package_count_deps > 0 && (github.event_name != 'push' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }} needs: changes strategy: From e4ce37eb0e3e05754db8913321836a2184dd2f25 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:43:16 -0400 Subject: [PATCH 09/22] f --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b225cb3e7c..cd4023bf86 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -77,7 +77,7 @@ jobs: test: name: Go Coverage - runs-on: ${{ contains(matrix.package, 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner') }} # ${{ matrix.platform }} + runs-on: ${{ matrix.package == 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner' }} if: ${{ needs.changes.outputs.package_count_deps > 0 && (github.event_name != 'push' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }} needs: changes strategy: From c15de1c5c658a84438fe33bab6513218bebd3e9a Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:45:44 -0400 Subject: [PATCH 10/22] speed --- .github/workflows/go.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index cd4023bf86..35afadd6ee 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -77,17 +77,14 @@ jobs: test: name: Go Coverage - runs-on: ${{ matrix.package == 'agents' && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner' }} + runs-on: ${{ (matrix.package == 'agents' || matrix.package == 'core' || matrix.package == 'tools' || contains(matrix.package, 'contrib')) && 'ubuntu-latest' || 'namespace-profile-default-coverage-runner' }} if: ${{ needs.changes.outputs.package_count_deps > 0 && (github.event_name != 'push' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)) }} needs: changes strategy: fail-fast: false - max-parallel: 8 matrix: go-version: - 1.22.x - platform: - - ubuntu-latest # only do on agents for now. Anything that relies on solidity in a package should do this package: ${{ fromJSON(needs.changes.outputs.packages_deps) }} services: From a0b64077b8ce65ed408c8042f3710f5d8fee2799 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 12:57:26 -0400 Subject: [PATCH 11/22] siempre log --- .github/workflows/go.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 35afadd6ee..c3e8766e28 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -227,7 +227,7 @@ jobs: with: dest: '/tmp/logs' - name: Tar logs - if: failure() + #if: failure() run: tar cvzf ./logs.tgz /tmp/logs - name: Upload logs to GitHub if: failure() @@ -236,6 +236,9 @@ jobs: name: ${{matrix.package}}-logs.tgz path: ./logs.tgz + - name: Show Logs + run: ls + - name: Send Coverage (Codecov) uses: Wandalen/wretry.action@v1.0.36 with: @@ -493,7 +496,7 @@ jobs: if: ${{ github.event_name != 'push' && needs.changes.outputs.package_count_deps > 0 }} strategy: fail-fast: false - max-parallel: 8 + max-parallel: 12 matrix: # only do on agents for now. Anything that relies on solidity in a package should do this package: ${{ fromJSON(needs.changes.outputs.packages_deps) }} From 379c0315e1d6df34351b8d38cdd432399c3481ab Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:04:21 -0400 Subject: [PATCH 12/22] always upload --- .github/workflows/go.yml | 4 ++-- ethergo/backends/anvil/options.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c3e8766e28..260754188a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -230,11 +230,11 @@ jobs: #if: failure() run: tar cvzf ./logs.tgz /tmp/logs - name: Upload logs to GitHub - if: failure() +# if: failure() uses: actions/upload-artifact@v4 with: name: ${{matrix.package}}-logs.tgz - path: ./logs.tgz + path: logs.tgz - name: Show Logs run: ls diff --git a/ethergo/backends/anvil/options.go b/ethergo/backends/anvil/options.go index e500bd6c19..7c7998d354 100644 --- a/ethergo/backends/anvil/options.go +++ b/ethergo/backends/anvil/options.go @@ -29,7 +29,7 @@ func NewAnvilOptionBuilder() *OptionBuilder { // set default non-anvil values optionsBuilder.SetMaxWaitTime(time.Minute * 2) optionsBuilder.SetRestartPolicy(Autoremove) - optionsBuilder.SetExpirySeconds(600) + optionsBuilder.SetExpirySeconds(900) optionsBuilder.SetAccounts(10) optionsBuilder.SetBlockTime(0) From 775c840c3e013aa76068f9652c1c85d55d1f9c90 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:08:37 -0400 Subject: [PATCH 13/22] pwd --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 260754188a..7c6c19518c 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -237,7 +237,7 @@ jobs: path: logs.tgz - name: Show Logs - run: ls + run: pwd && ls - name: Send Coverage (Codecov) uses: Wandalen/wretry.action@v1.0.36 From adfef53cbf981cddf50fb84d8d62383a567992ea Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:09:15 -0400 Subject: [PATCH 14/22] all logs --- .github/workflows/go.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7c6c19518c..31bb25a848 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -226,18 +226,13 @@ jobs: uses: jwalton/gh-docker-logs@v2 with: dest: '/tmp/logs' - - name: Tar logs - #if: failure() - run: tar cvzf ./logs.tgz /tmp/logs + - name: Upload logs to GitHub # if: failure() uses: actions/upload-artifact@v4 with: name: ${{matrix.package}}-logs.tgz - path: logs.tgz - - - name: Show Logs - run: pwd && ls + path: /tmp/logs/** - name: Send Coverage (Codecov) uses: Wandalen/wretry.action@v1.0.36 From 321a634db234d3ed5ef2cbd92e75c8946e70178e Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:14:04 -0400 Subject: [PATCH 15/22] store logs --- .github/workflows/go.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 31bb25a848..b51215ba9f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -227,11 +227,18 @@ jobs: with: dest: '/tmp/logs' + - name: Replace forward slashes with dashes + id: replace + run: echo "package_name=${{ matrix.package }}" | sed 's/\//-/g' + shell: bash + env: + package_name: ${{ matrix.package }} + - name: Upload logs to GitHub # if: failure() uses: actions/upload-artifact@v4 with: - name: ${{matrix.package}}-logs.tgz + name: ${{ steps.replace.outputs.package_name }}" path: /tmp/logs/** - name: Send Coverage (Codecov) From 48ecf9a1c3e8ed6fcd2971d3826297a71a6b21b0 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:17:48 -0400 Subject: [PATCH 16/22] always upload --- .github/workflows/go.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b51215ba9f..02130eabfb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -229,16 +229,15 @@ jobs: - name: Replace forward slashes with dashes id: replace - run: echo "package_name=${{ matrix.package }}" | sed 's/\//-/g' + run: echo "::set-output name=package_name::$(echo ${{ matrix.package }} | sed 's/\//-/g')" shell: bash - env: - package_name: ${{ matrix.package }} + - name: Upload logs to GitHub # if: failure() uses: actions/upload-artifact@v4 with: - name: ${{ steps.replace.outputs.package_name }}" + name: ${{ steps.replace.outputs.package_name }} path: /tmp/logs/** - name: Send Coverage (Codecov) From 111725f86ee8f107f7e7233d061f131d135c01a1 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:18:48 -0400 Subject: [PATCH 17/22] upload the whole damn tmp --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 02130eabfb..d0eb6c1cb9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -225,7 +225,7 @@ jobs: if: always() uses: jwalton/gh-docker-logs@v2 with: - dest: '/tmp/logs' + dest: '/tmp/**' - name: Replace forward slashes with dashes id: replace From c0a1d997207468282c27da421095226b2fc2c632 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:22:17 -0400 Subject: [PATCH 18/22] whole temp dir --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index d0eb6c1cb9..7e4a53eea5 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -225,7 +225,7 @@ jobs: if: always() uses: jwalton/gh-docker-logs@v2 with: - dest: '/tmp/**' + dest: '/tmp/logs' - name: Replace forward slashes with dashes id: replace @@ -238,7 +238,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ steps.replace.outputs.package_name }} - path: /tmp/logs/** + path: /tmp/** - name: Send Coverage (Codecov) uses: Wandalen/wretry.action@v1.0.36 From a49eb54dbee24836de58344150bce2dee0d5d0f3 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:25:13 -0400 Subject: [PATCH 19/22] more --- .github/workflows/go.yml | 2 +- core/processlog/options.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7e4a53eea5..02130eabfb 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -238,7 +238,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: ${{ steps.replace.outputs.package_name }} - path: /tmp/** + path: /tmp/logs/** - name: Send Coverage (Codecov) uses: Wandalen/wretry.action@v1.0.36 diff --git a/core/processlog/options.go b/core/processlog/options.go index d22910e591..ba5f2b11d8 100644 --- a/core/processlog/options.go +++ b/core/processlog/options.go @@ -180,7 +180,7 @@ func makeRawArgs(opts []StdStreamLogArgsOption) *stdStreamLogArgs { args.LogFileName = "test" args.LogFrequency = time.Second // not a problem unless it's missing from user too, we'll validate at the end - args.LogDir, _ = os.MkdirTemp("", "") + args.LogDir, _ = os.MkdirTemp("/tmp/logs", "") args.LogFileName = "log" args.PrintFunc = func(s []byte) { From f186f8f50040e8a5a2a3a66ce4b4ce9bb36ec50c Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:30:12 -0400 Subject: [PATCH 20/22] f --- core/processlog/options.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/processlog/options.go b/core/processlog/options.go index ba5f2b11d8..17595996da 100644 --- a/core/processlog/options.go +++ b/core/processlog/options.go @@ -181,6 +181,8 @@ func makeRawArgs(opts []StdStreamLogArgsOption) *stdStreamLogArgs { args.LogFrequency = time.Second // not a problem unless it's missing from user too, we'll validate at the end args.LogDir, _ = os.MkdirTemp("/tmp/logs", "") + // just in case + _ = os.Mkdir(args.LogDir, os.ModePerm) args.LogFileName = "log" args.PrintFunc = func(s []byte) { From 51594d5b8c0b009b80e1ad2479b45c94196f9bc9 Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:34:23 -0400 Subject: [PATCH 21/22] mkdir --- core/processlog/options.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/processlog/options.go b/core/processlog/options.go index 17595996da..13f8e9eba5 100644 --- a/core/processlog/options.go +++ b/core/processlog/options.go @@ -181,8 +181,7 @@ func makeRawArgs(opts []StdStreamLogArgsOption) *stdStreamLogArgs { args.LogFrequency = time.Second // not a problem unless it's missing from user too, we'll validate at the end args.LogDir, _ = os.MkdirTemp("/tmp/logs", "") - // just in case - _ = os.Mkdir(args.LogDir, os.ModePerm) + _ = os.MkdirAll(args.LogDir, os.ModePerm) args.LogFileName = "log" args.PrintFunc = func(s []byte) { From c72b63ba053de3d33344c082597fd110e805b29b Mon Sep 17 00:00:00 2001 From: Trajan0x Date: Thu, 18 Jul 2024 13:37:40 -0400 Subject: [PATCH 22/22] clean --- core/processlog/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/processlog/options.go b/core/processlog/options.go index 13f8e9eba5..0a7b706381 100644 --- a/core/processlog/options.go +++ b/core/processlog/options.go @@ -181,7 +181,7 @@ func makeRawArgs(opts []StdStreamLogArgsOption) *stdStreamLogArgs { args.LogFrequency = time.Second // not a problem unless it's missing from user too, we'll validate at the end args.LogDir, _ = os.MkdirTemp("/tmp/logs", "") - _ = os.MkdirAll(args.LogDir, os.ModePerm) + _ = os.MkdirAll("/tmp/logs", os.ModePerm) args.LogFileName = "log" args.PrintFunc = func(s []byte) {