Skip to content

fix: regenerate counterfeiter fakes and demultiplex FSC container logs - #1060

Merged
mbrandenburger merged 2 commits into
hyperledger:mainfrom
mbrandenburger:fix/fakes-and-docker-logs
Nov 4, 2026
Merged

mbrandenburger merged 2 commits into
hyperledger:mainfrom
mbrandenburger:fix/fakes-and-docker-logs

Conversation

@mbrandenburger

Copy link
Copy Markdown
Contributor

Fixes #1057

  • internal/attestation/epid/ias_test.go uses counterfeiter:generate with the module pinned in go.mod, like the other packages, and writes the fake to internal/attestation/fakes, where the test imports it from.
  • All fakes are regenerated with counterfeiter v6.14.0, so go generate no longer produces a diff. That accounts for most of the line count.
  • The FSC extension demultiplexes the chaincode container logs with stdcopy.StdCopy before scanning them, which removes the 8-byte frame headers from the debug log.

The tests in internal, ercc/registry, ecc/chaincode and secret-keeper-go pass with the new fakes, and extension/fsc builds and vets. I didn't run the FSC integration test.

@mbrandenburger
mbrandenburger requested a review from a team as a code owner November 4, 2026 12:29
@mbrandenburger mbrandenburger self-assigned this Nov 4, 2026
The epid test generated its HTTP client fake into epid/fakes, while the
test imports internal/attestation/fakes, and it relied on a counterfeiter
binary on the PATH. Use the counterfeiter:generate directive with the
pinned module version, like the other packages, and point it at the
directory the test imports.

Regenerate all fakes with counterfeiter v6.14.0 from go.mod, so that
running go generate no longer produces a diff.

Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
The chaincode containers run without a TTY, so the Docker log stream
prefixes every frame with an 8-byte stdout/stderr header. Reading it with
a plain scanner put those bytes into the debug log. Demultiplex the
stream with stdcopy before scanning it.

Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
Fixes: hyperledger#1057
@mbrandenburger
mbrandenburger force-pushed the fix/fakes-and-docker-logs branch from 7e3d1da to cab5b6f Compare November 4, 2026 19:42
@mbrandenburger
mbrandenburger merged commit 5811bdb into hyperledger:main Nov 4, 2026
8 checks passed
@mbrandenburger
mbrandenburger deleted the fix/fakes-and-docker-logs branch November 4, 2026 19:42
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.

counterfeiter fakes are out of date, and FSC container logs contain stream headers

2 participants