Skip to content

refactor(view): remove unused view service surface - #2426

Merged
SaidAltury-ibm merged 1 commit into
hyperledger-labs:mainfrom
SurbhiAgarwal1:refactor/2020-remove-unused-view-surface
Nov 1, 2026
Merged

SaidAltury-ibm merged 1 commit into
hyperledger-labs:mainfrom
SurbhiAgarwal1:refactor/2020-remove-unused-view-surface

Conversation

@SurbhiAgarwal1

Copy link
Copy Markdown
Contributor

Summary

Removes exported symbols and sentinels in public view packages that have no references in FSC or Panurus, as detailed in #2020.

Decision per Symbol:

  • �iew.ErrPanic: Removed. The sentinel is unused and no callers rely on it; recovery paths build ad-hoc errors or wrap specific sentinels.
  • �iew.ErrInvalidConfig: Removed. Unused sentinel with no direct fit in the view packages.
  • client.MSPInfo: Removed. Unused struct in platform/view/services/view/client/config.go (client Config carries ID and ConnectionConfig; MSP configuration is handled in generic fabric config).
  • server.SigningIdentity (and server.Identity): Removed. Unused interface in platform/view/services/view/grpc/server/identity.go; server signs commands via sig.Signer from SignerProvider.GetSigner.
  • server.GetService: Removed. Legacy lookup function in platform/view/services/view/grpc/server/service.go that panics because *Service is registered through dig.
  • web.ViewClient: Already removed in feat(view)!: serve the view service over HTTP with the gRPC messages and one client #2222 when platform/view/services/view/web/view.go was deleted.

Verification

  • Zero occurrences of removed symbols across repository:
    git grep -E 'ErrPanic|ErrInvalidConfig|MSPInfo|server.SigningIdentity|server.GetService|viewgrpcserver.GetService'
  • Code formatted with gofumpt.

BREAKING CHANGE: �iew.ErrPanic, �iew.ErrInvalidConfig, client.MSPInfo, server.SigningIdentity, server.Identity, and server.GetService are removed from the public API surface.

Fixes #2020

Remove exported symbols and sentinels in the public view packages that have no references in FSC or Panurus:
- view.ErrPanic and view.ErrInvalidConfig: unused sentinels in errors.go.
- client.MSPInfo: unused struct in client/config.go.
- server.SigningIdentity (and server.Identity): unused interface in grpc/server/identity.go; server signs through sig.Signer.
- server.GetService: legacy lookup function in grpc/server/service.go that panics because the service is registered via dig.
(Note: web.ViewClient was already removed in hyperledger-labs#2222).

BREAKING CHANGE: view.ErrPanic, view.ErrInvalidConfig, client.MSPInfo, server.SigningIdentity, server.Identity, and server.GetService are removed from the public API surface.

Fixes hyperledger-labs#2020

Signed-off-by: Surbhi Agarwal <SurbhiAgarwal1@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 1, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Hey @SurbhiAgarwal1 👋 thanks for the PR!
I'm your friendly PR Helper Bot 🤖 and I'll be riding shotgun on this one, keeping track of your PR's status to help you get it approved and merged.

This comment updates automatically as you push changes -- think of it as your PR's live scoreboard!
Here's the latest:


PR Checks

✅ DCO Sign-off -- All commits have valid sign-offs. Nice work!


✅ GPG Signature -- All commits have verified GPG signatures. Locked and loaded!


✅ Merge Conflicts -- No merge conflicts detected. Smooth sailing!


✅ Issue Link -- Linked to #2020 (assigned to you).


🎉 All checks passed! Your PR is ready for review. Great job!

@github-actions github-actions Bot added the status: needs review The pull request is ready for maintainer review label Nov 1, 2026
@SurbhiAgarwal1 SurbhiAgarwal1 changed the title refactor(view)!: remove unused view service surface refactor(view): remove unused view service surface Nov 1, 2026
@SaidAltury-ibm
SaidAltury-ibm self-requested a review November 1, 2026 17:36
@SaidAltury-ibm SaidAltury-ibm added this to the 26Q4 milestone Nov 1, 2026

@SaidAltury-ibm SaidAltury-ibm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @SurbhiAgarwal1 for working on this. LGTM

@mergify

mergify Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@SaidAltury-ibm
SaidAltury-ibm merged commit 7cc8176 into hyperledger-labs:main Nov 1, 2026
mbrandenburger added a commit to mbrandenburger/fabric-smart-client that referenced this pull request Nov 5, 2026
v0.27.0 is tagged at hyperledger-labs#2415, so everything merged after it ships in v0.28.0. The drain on shutdown (hyperledger-labs#2417) merged after the tag but was documented in the v0.26 to v0.27 guide; its operator section, metric, developer note and checklist rows move to the v0.27 to v0.28 guide, and the v0.26 to v0.27 guide is back to its state at the tag.

The v0.27 to v0.28 guide gains what it left out:
- the view service symbols removed in hyperledger-labs#2426
- the websocket keepalive (hyperledger-labs#2428)
- channel keys on transactions sent between nodes and their routing to the local network, with driver.Channel.ChannelKey, RequireChannelKey and NewTransactionFromEnvelopeBytesOn (hyperledger-labs#2466)
- Fabric-x proposal responses without namespaces being refused, and session IDs kept apart per sender (hyperledger-labs#2419)
- views that stop waiting for a reply when their context ends, and session.ReadMessageWithContext (hyperledger-labs#2471)
- the vault keeping a Valid status on a Busy write (hyperledger-labs#2420)
- node migrate --forget-opener, exit 12 with --check --contract, which stores node migrate reaches, and the limits of queryTimeout and migrationLockTimeout

It also corrects claims that did not match the code: which endorse transactions stay JSON after the contract step (keyless Fabric rows convert), that stores keep bytes they cannot convert, gob metadata the protobuf form cannot carry, SQLite locking during a step, the error a recipient responder without a signer sends, how nwo starts nodes, the connection state component on Fabric-x, and the default channel RequestRecipientIdentity verifies on. Fabric-only and Fabric-x-only items are marked as such, and the warning about new stores during a mixed-version window is stated once.

Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
mbrandenburger added a commit that referenced this pull request Nov 5, 2026
v0.27.0 is tagged at #2415, so everything merged after it ships in v0.28.0. The drain on shutdown (#2417) merged after the tag but was documented in the v0.26 to v0.27 guide; its operator section, metric, developer note and checklist rows move to the v0.27 to v0.28 guide, and the v0.26 to v0.27 guide is back to its state at the tag.

The v0.27 to v0.28 guide gains what it left out:
- the view service symbols removed in #2426
- the websocket keepalive (#2428)
- channel keys on transactions sent between nodes and their routing to the local network, with driver.Channel.ChannelKey, RequireChannelKey and NewTransactionFromEnvelopeBytesOn (#2466)
- Fabric-x proposal responses without namespaces being refused, and session IDs kept apart per sender (#2419)
- views that stop waiting for a reply when their context ends, and session.ReadMessageWithContext (#2471)
- the vault keeping a Valid status on a Busy write (#2420)
- node migrate --forget-opener, exit 12 with --check --contract, which stores node migrate reaches, and the limits of queryTimeout and migrationLockTimeout

It also corrects claims that did not match the code: which endorse transactions stay JSON after the contract step (keyless Fabric rows convert), that stores keep bytes they cannot convert, gob metadata the protobuf form cannot carry, SQLite locking during a step, the error a recipient responder without a signer sends, how nwo starts nodes, the connection state component on Fabric-x, and the default channel RequestRecipientIdentity verifies on. Fabric-only and Fabric-x-only items are marked as such, and the warning about new stores during a mixed-version window is stated once.

Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs review The pull request is ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(view): remove unused view service surface (ErrPanic, ErrInvalidConfig, MSPInfo, SigningIdentity, GetService, ViewClient)

3 participants