Skip to content

Conversation

@linzhp
Copy link
Contributor

@linzhp linzhp commented Jan 3, 2024

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?
Some tests need to send SIGTERM to child processes, which would cause panic in the timeout handler. A way to fix that is to call signal.Reset(syscall.SIGTERM) in TestMain to unregister the timeout handler. However, we need to make sure signal.Reset(syscall.SIGTERM) is called after signal.Notify(c, syscall.SIGTERM) in RegisterTimeoutHandler(). This PR moves the signal.Notify(c, syscall.SIGTERM) outside the goroutine so it's called synchronously before TestMain

Other notes for review

@fmeum fmeum enabled auto-merge (squash) January 3, 2024 17:30
@fmeum fmeum merged commit 5b9d2c0 into bazel-contrib:master Jan 3, 2024
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/bazel-starlib Jan 3, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) |
http_archive | patch | `v0.44.1` -> `v0.44.2` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_go (io_bazel_rules_go)</summary>

###
[`v0.44.2`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.44.2)

[Compare
Source](https://togithub.com/bazelbuild/rules_go/compare/v0.44.1...v0.44.2)

#### `WORKSPACE` code

load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive")

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"7c76d6236b28ff695aa28cf35f95de317a9472fd1fb14ac797c9bf684f09b37c",
        urls = [

"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",

"https://github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",
        ],
    )

load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains",
"go_rules_dependencies")

    go_rules_dependencies()

    go_register_toolchains(version = "1.21.5")

#### What's Changed

- Make C++ toolchain optional by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/rules_go/pull/3390](https://togithub.com/bazelbuild/rules_go/pull/3390)
- Fix a race detected only if a test times out by
[@&#8203;patrickmscott](https://togithub.com/patrickmscott) in
[https://github.com/bazelbuild/rules_go/pull/3808](https://togithub.com/bazelbuild/rules_go/pull/3808)
- registering timeout handler synchronously by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/rules_go/pull/3810](https://togithub.com/bazelbuild/rules_go/pull/3810)
- patch release 0.44.2 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3811](https://togithub.com/bazelbuild/rules_go/pull/3811)

**Full Changelog**:
bazel-contrib/rules_go@v0.44.1...v0.44.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
renovate bot referenced this pull request in kreempuff/rules_unreal_engine Jan 3, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) |
http_archive | patch | `v0.44.1` -> `v0.44.2` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bazelbuild/rules_go (io_bazel_rules_go)</summary>

###
[`v0.44.2`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.44.2)

[Compare
Source](https://togithub.com/bazelbuild/rules_go/compare/v0.44.1...v0.44.2)

#### `WORKSPACE` code

load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive")

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"7c76d6236b28ff695aa28cf35f95de317a9472fd1fb14ac797c9bf684f09b37c",
        urls = [

"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",

"https://github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",
        ],
    )

load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains",
"go_rules_dependencies")

    go_rules_dependencies()

    go_register_toolchains(version = "1.21.5")

#### What's Changed

- Make C++ toolchain optional by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/rules_go/pull/3390](https://togithub.com/bazelbuild/rules_go/pull/3390)
- Fix a race detected only if a test times out by
[@&#8203;patrickmscott](https://togithub.com/patrickmscott) in
[https://github.com/bazelbuild/rules_go/pull/3808](https://togithub.com/bazelbuild/rules_go/pull/3808)
- registering timeout handler synchronously by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/rules_go/pull/3810](https://togithub.com/bazelbuild/rules_go/pull/3810)
- patch release 0.44.2 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3811](https://togithub.com/bazelbuild/rules_go/pull/3811)

**Full Changelog**:
bazel-contrib/rules_go@v0.44.1...v0.44.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/kreempuff/rules_unreal_engine).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Jan 7, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) |
http_archive | patch | `v0.44.1` -> `v0.44.2` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_go (io_bazel_rules_go)</summary>

###
[`v0.44.2`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.44.2)

[Compare
Source](https://togithub.com/bazelbuild/rules_go/compare/v0.44.1...v0.44.2)

#### `WORKSPACE` code

load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive")

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"7c76d6236b28ff695aa28cf35f95de317a9472fd1fb14ac797c9bf684f09b37c",
        urls = [

"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",

"https://github.com/bazelbuild/rules_go/releases/download/v0.44.2/rules_go-v0.44.2.zip",
        ],
    )

load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains",
"go_rules_dependencies")

    go_rules_dependencies()

    go_register_toolchains(version = "1.21.5")

#### What's Changed

- Make C++ toolchain optional by
[@&#8203;illicitonion](https://togithub.com/illicitonion) in
[https://github.com/bazelbuild/rules_go/pull/3390](https://togithub.com/bazelbuild/rules_go/pull/3390)
- Fix a race detected only if a test times out by
[@&#8203;patrickmscott](https://togithub.com/patrickmscott) in
[https://github.com/bazelbuild/rules_go/pull/3808](https://togithub.com/bazelbuild/rules_go/pull/3808)
- registering timeout handler synchronously by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/rules_go/pull/3810](https://togithub.com/bazelbuild/rules_go/pull/3810)
- patch release 0.44.2 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3811](https://togithub.com/bazelbuild/rules_go/pull/3811)

**Full Changelog**:
bazel-contrib/rules_go@v0.44.1...v0.44.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants