Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[26.1 backport] plugins/hooks: Don't show empty hook messages #5083

Merged
merged 1 commit into from
May 31, 2024

Conversation

vvoland
Copy link
Collaborator

@vvoland vvoland commented May 20, 2024

- What I did
Don't show Next steps: with no messages at all when plugin returns an unitialized value of HookMessage (zero-initialization sets its type to NextSteps and empty template).

- How to verify it
Unit test

- Description for the changelog

Don't show empty hints when plugins returns an empty hook message.

- A picture of a cute animal (not mandatory but encouraged)

Verified

This commit was signed with the committer’s verified signature.
vvoland Paweł Gronowski
Don't show `Next steps:` with no messages at all when plugin returns an
unitialized value of `HookMessage` (zero-initialization sets its type to
NextSteps and empty template).

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 296a6f5)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added this to the 26.1.4 milestone May 20, 2024
@vvoland vvoland self-assigned this May 20, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 61.34%. Comparing base (b72abbb) to head (e382a5f).

Additional details and impacted files
@@            Coverage Diff             @@
##             26.1    #5083      +/-   ##
==========================================
- Coverage   61.34%   61.34%   -0.01%     
==========================================
  Files         298      298              
  Lines       20688    20700      +12     
==========================================
+ Hits        12691    12698       +7     
- Misses       7096     7100       +4     
- Partials      901      902       +1     

Copy link
Member

@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.

@thaJeztah
Copy link
Member

Moving this to draft; we're discussing if it's needed.

@thaJeztah thaJeztah marked this pull request as draft May 31, 2024 12:56
@neersighted neersighted marked this pull request as ready for review May 31, 2024 20:08
@neersighted neersighted merged commit 3f807ed into docker:26.1 May 31, 2024
104 checks passed
renovate bot added a commit to earthly/dind that referenced this pull request Jun 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/docker](https://togithub.com/docker/docker) | patch | `26.1.3`
-> `26.1.4` |

---

### Release Notes

<details>
<summary>docker/docker (docker/docker)</summary>

### [`v26.1.4`](https://togithub.com/moby/moby/releases/tag/v26.1.4)

[Compare
Source](https://togithub.com/docker/docker/compare/v26.1.3...v26.1.4)

#### 26.1.4

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 26.1.4
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A26.1.4)
- [moby/moby, 26.1.4
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A26.1.4)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v26.1.4/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v26.1.4/docs/api/version-history.md).

##### Security

This release updates the Go runtime to 1.21.11 which contains security
fixes for:

-   [CVE-2024-24789]
-   [CVE-2024-24790]
- A symlink time of check to time of use race condition during directory
removal reported by Addison Crump
([@&#8203;addisoncrump](https://togithub.com/addisoncrump)).

##### Bug fixes and enhancements

- Fixed an issue where promoting a node immediately after another node
was demoted could cause the promotion to fail.
[moby/moby#47870](https://togithub.com/moby/moby/pull/47870)
- Prevent the daemon log from being spammed with `superfluous
response.WriteHeader call ...` messages..
[moby/moby#47843](https://togithub.com/moby/moby/pull/47843)
- Don't show empty hints when plugins return an empty hook message.
[docker/cli#5083](https://togithub.com/docker/cli/pull/5083)
- Added `ContextType: "moby"` to the context list/inspect output to
address a compatibility issue with Visual Studio Container Tools.
[docker/cli#5095](https://togithub.com/docker/cli/pull/5095)
- Fix a compatibility issue with Visual Studio Container Tools.
[docker/cli#5095](https://togithub.com/docker/cli/pull/5095)

##### Packaging updates

- Update containerd (static binaries only) to
[v1.7.17](https://togithub.com/containerd/containerd/releases/tag/v1.7.17).
[moby/moby#47841](https://togithub.com/moby/moby/pull/47841)
- [CVE-2024-24789], [CVE-2024-24790]: Update Go runtime to 1.21.11.
[moby/moby#47904](https://togithub.com/moby/moby/pull/47904)
- Update Compose to
[v2.27.1](https://togithub.com/docker/compose/releases/tag/v2.27.1).
[docker/docker-ce-packages#1022](https://togithub.com/docker/docker-ce-packaging/pull/1022)
- Update Buildx to
[v0.14.1](https://togithub.com/docker/buildx/releases/tag/v0.14.1).
[docker/docker-ce-packages#1021](https://togithub.com/docker/docker-ce-packaging/pull/1021)

    [CVE-2024-24789]: https://togithub.com/golang/go/issues/66869

    [CVE-2024-24790]: https://togithub.com/golang/go/issues/67680

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6am on monday" (UTC), 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/earthly/dind).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to earthly/dind that referenced this pull request Jun 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [docker/docker](https://togithub.com/docker/docker) | patch | `26.1.3`
-> `26.1.4` |

---

### Release Notes

<details>
<summary>docker/docker (docker/docker)</summary>

### [`v26.1.4`](https://togithub.com/moby/moby/releases/tag/v26.1.4)

[Compare
Source](https://togithub.com/docker/docker/compare/v26.1.3...v26.1.4)

#### 26.1.4

For a full list of pull requests and changes in this release, refer to
the relevant GitHub milestones:

- [docker/cli, 26.1.4
milestone](https://togithub.com/docker/cli/issues?q=is%3Aclosed+milestone%3A26.1.4)
- [moby/moby, 26.1.4
milestone](https://togithub.com/moby/moby/issues?q=is%3Aclosed+milestone%3A26.1.4)
- Deprecated and removed features, see [Deprecated
Features](https://togithub.com/docker/cli/blob/v26.1.4/docs/deprecated.md).
- Changes to the Engine API, see [API version
history](https://togithub.com/moby/moby/blob/v26.1.4/docs/api/version-history.md).

##### Security

This release updates the Go runtime to 1.21.11 which contains security
fixes for:

-   [CVE-2024-24789]
-   [CVE-2024-24790]
- A symlink time of check to time of use race condition during directory
removal reported by Addison Crump
([@&#8203;addisoncrump](https://togithub.com/addisoncrump)).

##### Bug fixes and enhancements

- Fixed an issue where promoting a node immediately after another node
was demoted could cause the promotion to fail.
[moby/moby#47870](https://togithub.com/moby/moby/pull/47870)
- Prevent the daemon log from being spammed with `superfluous
response.WriteHeader call ...` messages..
[moby/moby#47843](https://togithub.com/moby/moby/pull/47843)
- Don't show empty hints when plugins return an empty hook message.
[docker/cli#5083](https://togithub.com/docker/cli/pull/5083)
- Added `ContextType: "moby"` to the context list/inspect output to
address a compatibility issue with Visual Studio Container Tools.
[docker/cli#5095](https://togithub.com/docker/cli/pull/5095)
- Fix a compatibility issue with Visual Studio Container Tools.
[docker/cli#5095](https://togithub.com/docker/cli/pull/5095)

##### Packaging updates

- Update containerd (static binaries only) to
[v1.7.17](https://togithub.com/containerd/containerd/releases/tag/v1.7.17).
[moby/moby#47841](https://togithub.com/moby/moby/pull/47841)
- [CVE-2024-24789], [CVE-2024-24790]: Update Go runtime to 1.21.11.
[moby/moby#47904](https://togithub.com/moby/moby/pull/47904)
- Update Compose to
[v2.27.1](https://togithub.com/docker/compose/releases/tag/v2.27.1).
[docker/docker-ce-packages#1022](https://togithub.com/docker/docker-ce-packaging/pull/1022)
- Update Buildx to
[v0.14.1](https://togithub.com/docker/buildx/releases/tag/v0.14.1).
[docker/docker-ce-packages#1021](https://togithub.com/docker/docker-ce-packaging/pull/1021)

    [CVE-2024-24789]: https://togithub.com/golang/go/issues/66869

    [CVE-2024-24790]: https://togithub.com/golang/go/issues/67680

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6am on monday" (UTC), 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/earthly/dind).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants