Skip to content

fix new-counter-demo HTTP publish error handling - #170

Open
blackdragoon26 wants to merge 2 commits into
kubeedge:masterfrom
blackdragoon26:fix/counter-http-error-guard
Open

fix new-counter-demo HTTP publish error handling#170
blackdragoon26 wants to merge 2 commits into
kubeedge:masterfrom
blackdragoon26:fix/counter-http-error-guard

Conversation

@blackdragoon26

@blackdragoon26 blackdragoon26 commented Aug 14, 2026

Copy link
Copy Markdown

What type of PR is this?

/kind bug

What this PR does / why we need it:

Prevents the new-counter-demo HTTP push method from dereferencing a nil response after a failed http.Post call. The error is logged and the publish attempt returns cleanly. A focused regression test uses a malformed endpoint so the transport failure is deterministic.

Which issue(s) this PR fixes:

Fixes #169

Special notes for your reviewer:

Validation:

go test ./data/publish/http

Does this PR introduce a user-facing change?:

Bug fix: avoid a panic when the HTTP push endpoint is unreachable.

@kubeedge-bot kubeedge-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. labels Aug 14, 2026
@kubeedge-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: blackdragoon26
To complete the pull request process, please assign shelley-baoyue after the PR has been reviewed.
You can assign the PR to them by writing /assign @shelley-baoyue in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot

Copy link
Copy Markdown
Collaborator

Welcome @blackdragoon26! It looks like this is your first PR to kubeedge/examples 🎉

@kubeedge-bot kubeedge-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 14, 2026
@blackdragoon26
blackdragoon26 marked this pull request as ready for review August 14, 2026 11:51
@kubeedge-bot kubeedge-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2026
Signed-off-by: Sankalp Jha <sankalp.jha9643@gmail.com>
@blackdragoon26
blackdragoon26 force-pushed the fix/counter-http-error-guard branch from 0924d22 to 5b8a4ef Compare August 14, 2026 11:55
@blackdragoon26

Copy link
Copy Markdown
Author

@Catherine-monk, @Shelley-BaoYue
Kindly review this PR.

Signed-off-by: blackdragoon26 <sankalp.jha9643@gmail.com>
@blackdragoon26
blackdragoon26 force-pushed the fix/counter-http-error-guard branch from 4db6ebe to 7b6f029 Compare August 24, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new-counter-demo HTTP push panics when the target endpoint is unreachable

2 participants