Skip to content

Conversation

@AkihiroSuda
Copy link
Contributor

@AkihiroSuda AkihiroSuda commented Jun 19, 2025

@thaJeztah
Copy link
Collaborator

oh! looks like the golangci-lint config needs updating as well (probably gonna be a bit tedious);

  Running [/home/runner/golangci-lint-2.1.6-linux-amd64/golangci-lint config path] in [/home/runner/work/logrus/logrus] ...
  Running [/home/runner/golangci-lint-2.1.6-linux-amd64/golangci-lint run] in [/home/runner/work/logrus/logrus] ...
  Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/product/migration-guide for migration instructions
  Failed executing command with error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/product/migration-guide for migration instructions
@AkihiroSuda
Copy link
Contributor Author

Also seeing data race
https://github.com/sirupsen/logrus/actions/runs/15756066745/job/44417392329?pr=1459

Details

=== RUN   TestWriterSplitNewlines
==================
WARNING: DATA RACE
Read at 0x00c0002ebec0 by goroutine 558:
  bytes.(*Buffer).String()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:71 +0x59d
  github.com/sirupsen/logrus_test.TestWriterSplitNewlines()
      /home/runner/work/logrus/logrus/writer_test.go:63 +0x57d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44

Previous write at 0x00c0002ebec0 by goroutine 559:
  bytes.(*Buffer).tryGrowByReslice()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:117 +0xa8
  bytes.(*Buffer).Write()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:177 +0xbc
  github.com/sirupsen/logrus.(*Entry).write()
      /home/runner/work/logrus/logrus/entry.go:294 +0x268
  github.com/sirupsen/logrus.(*Entry).log()
      /home/runner/work/logrus/logrus/entry.go:252 +0xa6a
  github.com/sirupsen/logrus.(*Entry).Log()
      /home/runner/work/logrus/logrus/entry.go:304 +0x8b
  github.com/sirupsen/logrus.(*Entry).Info()
      /home/runner/work/logrus/logrus/entry.go:321 +0x56
  github.com/sirupsen/logrus.(*Entry).Info-fm()
      <autogenerated>:1 +0x17
  github.com/sirupsen/logrus.(*Entry).writerScanner()
      /home/runner/work/logrus/logrus/writer.go:87 +0x22c
  github.com/sirupsen/logrus.(*Entry).WriterLevel.gowrap1()
      /home/runner/work/logrus/logrus/writer.go:57 +0x4f

Goroutine 558 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x825
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.runTests()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2034 +0xf17
  main.main()
      _testmain.go:283 +0x164

Goroutine 559 (finished) created at:
  github.com/sirupsen/logrus.(*Entry).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:57 +0x5a4
  github.com/sirupsen/logrus.(*Logger).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:21 +0x45c
  github.com/sirupsen/logrus.(*Logger).Writer()
      /home/runner/work/logrus/logrus/writer.go:12 +0x36e
  github.com/sirupsen/logrus_test.TestWriterSplitNewlines()
      /home/runner/work/logrus/logrus/writer_test.go:50 +0x36d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44
==================
==================
WARNING: DATA RACE
Read at 0x00c0002d0350 by goroutine 558:
  runtime.slicebytetostring()
      /opt/hostedtoolcache/go/1.23.10/x64/src/runtime/string.go:91 +0x0
  bytes.(*Buffer).String()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:71 +0x5d9
  github.com/sirupsen/logrus_test.TestWriterSplitNewlines()
      /home/runner/work/logrus/logrus/writer_test.go:63 +0x57d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44

Previous write at 0x00c0002d0356 by goroutine 559:
  runtime.slicecopy()
      /opt/hostedtoolcache/go/1.23.10/x64/src/runtime/slice.go:355 +0x0
  bytes.(*Buffer).Write()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:181 +0x118
  github.com/sirupsen/logrus.(*Entry).write()
      /home/runner/work/logrus/logrus/entry.go:294 +0x268
  github.com/sirupsen/logrus.(*Entry).log()
      /home/runner/work/logrus/logrus/entry.go:252 +0xa6a
  github.com/sirupsen/logrus.(*Entry).Log()
      /home/runner/work/logrus/logrus/entry.go:304 +0x8b
  github.com/sirupsen/logrus.(*Entry).Info()
      /home/runner/work/logrus/logrus/entry.go:321 +0x56
  github.com/sirupsen/logrus.(*Entry).Info-fm()
      <autogenerated>:1 +0x17
  github.com/sirupsen/logrus.(*Entry).writerScanner()
      /home/runner/work/logrus/logrus/writer.go:87 +0x22c
  github.com/sirupsen/logrus.(*Entry).WriterLevel.gowrap1()
      /home/runner/work/logrus/logrus/writer.go:57 +0x4f

Goroutine 558 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x825
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.runTests()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2034 +0xf17
  main.main()
      _testmain.go:283 +0x164

Goroutine 559 (finished) created at:
  github.com/sirupsen/logrus.(*Entry).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:57 +0x5a4
  github.com/sirupsen/logrus.(*Logger).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:21 +0x45c
  github.com/sirupsen/logrus.(*Logger).Writer()
      /home/runner/work/logrus/logrus/writer.go:12 +0x36e
  github.com/sirupsen/logrus_test.TestWriterSplitNewlines()
      /home/runner/work/logrus/logrus/writer_test.go:50 +0x36d
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44
==================
    testing.go:1399: race detected during execution of test
--- FAIL: TestWriterSplitNewlines (0.50s)
=== RUN   TestWriterSplitsMax64KB
==================
WARNING: DATA RACE
Read at 0x00c0003fd530 by goroutine 560:
  bytes.(*Buffer).String()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:71 +0x66b
  github.com/sirupsen/logrus_test.TestWriterSplitsMax64KB()
      /home/runner/work/logrus/logrus/writer_test.go:95 +0x648
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44

Previous write at 0x00c0003fd530 by goroutine 561:
  bytes.(*Buffer).tryGrowByReslice()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:117 +0xa8
  bytes.(*Buffer).Write()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:177 +0xbc
  github.com/sirupsen/logrus.(*Entry).write()
      /home/runner/work/logrus/logrus/entry.go:294 +0x268
  github.com/sirupsen/logrus.(*Entry).log()
      /home/runner/work/logrus/logrus/entry.go:252 +0xa6a
  github.com/sirupsen/logrus.(*Entry).Log()
      /home/runner/work/logrus/logrus/entry.go:304 +0x8b
  github.com/sirupsen/logrus.(*Entry).Info()
      /home/runner/work/logrus/logrus/entry.go:321 +0x56
  github.com/sirupsen/logrus.(*Entry).Info-fm()
      <autogenerated>:1 +0x17
  github.com/sirupsen/logrus.(*Entry).writerScanner()
      /home/runner/work/logrus/logrus/writer.go:87 +0x22c
  github.com/sirupsen/logrus.(*Entry).WriterLevel.gowrap1()
      /home/runner/work/logrus/logrus/writer.go:57 +0x4f

Goroutine 560 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x825
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.runTests()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2034 +0xf17
  main.main()
      _testmain.go:283 +0x164

Goroutine 561 (finished) created at:
  github.com/sirupsen/logrus.(*Entry).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:57 +0x5a4
  github.com/sirupsen/logrus.(*Logger).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:21 +0x47c
  github.com/sirupsen/logrus.(*Logger).Writer()
      /home/runner/work/logrus/logrus/writer.go:12 +0x386
  github.com/sirupsen/logrus_test.TestWriterSplitsMax64KB()
      /home/runner/work/logrus/logrus/writer_test.go:75 +0x385
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44
==================
==================
WARNING: DATA RACE
Read at 0x00c0006b4030 by goroutine 560:
  runtime.slicebytetostring()
      /opt/hostedtoolcache/go/1.23.10/x64/src/runtime/string.go:91 +0x0
  bytes.(*Buffer).String()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:71 +0x6ad
  github.com/sirupsen/logrus_test.TestWriterSplitsMax64KB()
      /home/runner/work/logrus/logrus/writer_test.go:95 +0x648
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44

Previous write at 0x00c0006b4030 by goroutine 561:
  runtime.slicecopy()
      /opt/hostedtoolcache/go/1.23.10/x64/src/runtime/slice.go:355 +0x0
  bytes.(*Buffer).Write()
      /opt/hostedtoolcache/go/1.23.10/x64/src/bytes/buffer.go:181 +0x118
  github.com/sirupsen/logrus.(*Entry).write()
      /home/runner/work/logrus/logrus/entry.go:294 +0x268
  github.com/sirupsen/logrus.(*Entry).log()
      /home/runner/work/logrus/logrus/entry.go:252 +0xa6a
  github.com/sirupsen/logrus.(*Entry).Log()
      /home/runner/work/logrus/logrus/entry.go:304 +0x8b
  github.com/sirupsen/logrus.(*Entry).Info()
      /home/runner/work/logrus/logrus/entry.go:321 +0x56
  github.com/sirupsen/logrus.(*Entry).Info-fm()
      <autogenerated>:1 +0x17
  github.com/sirupsen/logrus.(*Entry).writerScanner()
      /home/runner/work/logrus/logrus/writer.go:87 +0x22c
  github.com/sirupsen/logrus.(*Entry).WriterLevel.gowrap1()
      /home/runner/work/logrus/logrus/writer.go:57 +0x4f

Goroutine 560 (running) created at:
  testing.(*T).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x825
  testing.runTests.func1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2168 +0x85
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.runTests()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2166 +0x8be
  testing.(*M).Run()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:2034 +0xf17
  main.main()
      _testmain.go:283 +0x164

Goroutine 561 (finished) created at:
  github.com/sirupsen/logrus.(*Entry).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:57 +0x5a4
  github.com/sirupsen/logrus.(*Logger).WriterLevel()
      /home/runner/work/logrus/logrus/writer.go:21 +0x47c
  github.com/sirupsen/logrus.(*Logger).Writer()
      /home/runner/work/logrus/logrus/writer.go:12 +0x386
  github.com/sirupsen/logrus_test.TestWriterSplitsMax64KB()
      /home/runner/work/logrus/logrus/writer_test.go:75 +0x385
  testing.tRunner()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1690 +0x226
  testing.(*T).Run.gowrap1()
      /opt/hostedtoolcache/go/1.23.10/x64/src/testing/testing.go:1743 +0x44
==================
    testing.go:1399: race detected during execution of test
--- FAIL: TestWriterSplitsMax64KB (0.51s)

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
```
WARN [runner/nolint_filter] Found unknown linters in //nolint directives: scopelint
entry.go:44:6: the methods of "Entry" use pointer receiver and non-pointer receiver. (recvcheck)
type Entry struct {
     ^
logrus.go:13:6: the methods of "Level" use pointer receiver and non-pointer receiver. (recvcheck)
type Level uint32
     ^
internal/testutils/testutils.go:10:2: ST1001: should not use dot imports (staticcheck)
        . "github.com/sirupsen/logrus"
        ^
text_formatter.go:309:6: QF1001: could apply De Morgan's law (staticcheck)
                if !((ch >= 'a' && ch <= 'z') ||
                   ^
text_formatter.go:337:3: QF1012: Use fmt.Fprintf(...) instead of WriteString(fmt.Sprintf(...)) (staticcheck)
                b.WriteString(fmt.Sprintf("%q", stringVal))
                ^
internal/testutils/testutils.go:26:2: error-nil: use require.NoError (testifylint)
        require.Nil(t, err)
        ^
6 issues:
* recvcheck: 2
* staticcheck: 3
* testifylint: 1
```

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Also set `GOTOOLCHAIN=local` so as to enforce installing a specific version of Go

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda AkihiroSuda changed the title CI: update actions Jun 20, 2025
@thaJeztah
Copy link
Collaborator

Also seeing data race

Saw that one, yes! Happy you fixed that one as well; thank you!

Copy link
Collaborator

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@thaJeztah thaJeztah merged commit fc38423 into sirupsen:master Jun 20, 2025
9 checks passed
arthurzam pushed a commit to gentoo-golang-dist/forgejo-runner that referenced this pull request Jan 18, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) | `v1.9.3` -> `v1.9.4` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fsirupsen%2flogrus/v1.9.4?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fsirupsen%2flogrus/v1.9.3/v1.9.4?slim=true) |

---

### Release Notes

<details>
<summary>sirupsen/logrus (github.com/sirupsen/logrus)</summary>

### [`v1.9.4`](https://github.com/sirupsen/logrus/releases/tag/v1.9.4)

[Compare Source](sirupsen/logrus@v1.9.3...v1.9.4)

#### Notable changes

- go.mod: update minimum supported go version to v1.17 [#&#8203;1460](sirupsen/logrus#1460)
- go.mod: bump up dependencies  [#&#8203;1460](sirupsen/logrus#1460)
- Touch-up godoc and add "doc" links.
- README: fix links, grammar, and update examples.
- Add GNU/Hurd support [#&#8203;1364](sirupsen/logrus#1364)
- Add WASI wasip1 support [#&#8203;1388](sirupsen/logrus#1388)
- Remove uses of deprecated `ioutil` package [#&#8203;1472](sirupsen/logrus#1472)
- CI: update actions and golangci-lint [#&#8203;1459](sirupsen/logrus#1459)
- CI: remove appveyor, add macOS  [#&#8203;1460](sirupsen/logrus#1460)

**Full Changelog**: <sirupsen/logrus@v1.9.3...v1.9.4>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43OC4xIiwidXBkYXRlZEluVmVyIjoiNDIuNzguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiS2luZC9EZXBlbmRlbmN5VXBkYXRlIiwicnVuLWVuZC10by1lbmQtdGVzdHMiXX0=-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1306
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants