Skip to content

Comments

rpc: retreive pin names when Detailed option provided#10966

Merged
gammazero merged 2 commits intoipfs:masterfrom
djdv:fix/rpc-pin-names
Sep 12, 2025
Merged

rpc: retreive pin names when Detailed option provided#10966
gammazero merged 2 commits intoipfs:masterfrom
djdv:fix/rpc-pin-names

Conversation

@djdv
Copy link
Contributor

@djdv djdv commented Sep 9, 2025

Closes: #10965

  1. This prevents holding on to fields between iterations that don't get overwritten; so that things like Name don't stick.
  2. This adds in the detailed option to the API request. The data and option constructor for this already existed, but seemingly wasn't used anywhere? Or I missed the references. In any case, this adds it to the request whether its true or false, as configurable via coreoptions.Pin.Ls.Detailed()
    This seems to match the documentation:

// Detailed is an option for [Pin.Ls] which sets whether or not to return
// detailed information, such as pin names and modes.

This should be a small bugfix, but if anyone thinks it belongs in the changelog, let me know and either I can add it or someone else can just push it themselves.

djdv added 2 commits September 9, 2025 01:25
Retaining the object during the loop will make fields such as `Name`
stick between iterations.
This patch decodes into a new struct each iteration, assuring we don't
retain values from other pins.
@djdv djdv requested a review from a team as a code owner September 9, 2025 05:49
@djdv djdv changed the title Fix/rpc retreive pin names when Detailed option provided rpc: retreive pin names when Detailed option provided Sep 9, 2025
@hsanjuan hsanjuan added the need/triage Needs initial labeling and prioritization label Sep 9, 2025
Copy link
Contributor

@hsanjuan hsanjuan left a comment

Choose a reason for hiding this comment

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

I'm unfamiliar with client, but in principle this seems ok. Maybe the others can point out any non-obvious ramifications.

@gammazero gammazero merged commit 38be790 into ipfs:master Sep 12, 2025
17 of 22 checks passed
@djdv djdv deleted the fix/rpc-pin-names branch September 13, 2025 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need/triage Needs initial labeling and prioritization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rpc: can't retreive pin names using API

3 participants