fix: skip failing resources instead of aborting listing#122
Open
shsketch wants to merge 1 commit intopassbolt:v5from
Open
fix: skip failing resources instead of aborting listing#122shsketch wants to merge 1 commit intopassbolt:v5from
shsketch wants to merge 1 commit intopassbolt:v5from
Conversation
When a single resource fails to decrypt (e.g. malformed secret data, unsupported resource type, or timeout), the entire list command would abort with an error. This patch makes the listing resilient by logging a warning to stderr and continuing with the next resource. Affected code paths: - resource/list.go: JSON output loop and table output loop - resource/filter.go: CEL filter evaluation loop
|
|
Collaborator
|
I think this already was fixed on main here d1ea838 I tagged main as a new release just now, can you confirm if this is still an issue? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a single resource fails to decrypt (e.g. malformed secret data, unsupported resource type, or request timeout), the
list resourcecommand aborts entirely with an error. This makes the command unusable on instances with even one problematic resource.This patch makes the listing resilient by:
Affected code paths:
resource/list.go: JSON output loop and table output loopresource/filter.go: CEL filter evaluation loopContext
On a Passbolt v5 instance with ~1270 resources, the
list resourcecommand was failing due to individual resources with parsing issues. With this fix, all valid resources are listed and problematic ones are reported as warnings.Test plan
list resourcecompletes even when some resources fail to decrypt