Skip to content

[v14] tsh: skip invalid profiles instead of failing#38513

Merged
zmb3 merged 1 commit intobranch/v14from
bot/backport-38330-branch/v14
Feb 21, 2024
Merged

[v14] tsh: skip invalid profiles instead of failing#38513
zmb3 merged 1 commit intobranch/v14from
bot/backport-38330-branch/v14

Conversation

@zmb3
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 commented Feb 21, 2024

Backport #38330 to branch/v14

changelog: Ensure that tsh continues to function if one of its profiles is invalid.

The tsh status command attempts to decode one profile per YAML
file in $TSH_HOME. If an error is encountered along the way,
the entire command fails and tsh does not display information
about any profiles.

An especially confusing corner case is when a user mistakenly
places tsh's configuration at $TSH_HOME/config.yaml instead of
$TSH_HOME/config/config.yaml. In this case, the config file is
assumed to be a profile and the user is presentedc with a
confusing error message.

Fix this by skipping over profiles that fail to load but continuing
to report on the ones that load successfully.

Closes #38302
@zmb3 zmb3 added this pull request to the merge queue Feb 21, 2024
Merged via the queue into branch/v14 with commit 15de646 Feb 21, 2024
@zmb3 zmb3 deleted the bot/backport-38330-branch/v14 branch February 21, 2024 18:36
@fheinecke fheinecke mentioned this pull request Mar 11, 2024
This was referenced Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants