Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return the config file not found error #5972

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Terryhung
Copy link
Contributor

@Terryhung Terryhung commented Nov 8, 2024

Tracking issue

Closes #4891

Why are the changes needed?

The changes are needed to handle the situation where flytectl panics when an incorrect configuration path is provided. Currently, passing an invalid or incorrect config path causes flytectl to crash unexpectedly, leading to poor user experience and making debugging difficult.

What changes were proposed in this pull request?

Return the error directly.

How was this patch tested?

unit test.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 37.00%. Comparing base (b5f23a6) to head (d3e1f7c).

Files with missing lines Patch % Lines
flytestdlib/config/viper/viper.go 50.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5972      +/-   ##
==========================================
+ Coverage   36.90%   37.00%   +0.10%     
==========================================
  Files        1310     1310              
  Lines      131372   131369       -3     
==========================================
+ Hits        48477    48610     +133     
+ Misses      78682    78526     -156     
- Partials     4213     4233      +20     
Flag Coverage Δ
unittests-datacatalog 51.58% <ø> (ø)
unittests-flyteadmin 54.03% <ø> (-0.03%) ⬇️
unittests-flytecopilot 22.23% <ø> (ø)
unittests-flytectl 62.39% <ø> (ø)
unittests-flyteidl 6.92% <ø> (ø)
unittests-flyteplugins 53.84% <ø> (ø)
unittests-flytepropeller 42.90% <ø> (ø)
unittests-flytestdlib 57.69% <50.00%> (+2.37%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Terryhung Terryhung changed the title [WIP] fix: return the config file not found error fix: return the config file not found error Nov 8, 2024
@Terryhung Terryhung marked this pull request as ready for review November 8, 2024 09:03
Copy link
Member

@pingsutw pingsutw left a comment

Choose a reason for hiding this comment

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

LGTM, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: PRs waiting to be merged
Status: In review
Development

Successfully merging this pull request may close these issues.

[BUG] flytectl panics when wrong config path is passed
2 participants