-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: logs to have same current model and extracted model #11118
Conversation
…signoff Signed-off-by: Jougan-0 <prasantmishra2018@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #11118 +/- ##
==========================================
- Coverage 9.15% 9.14% -0.01%
==========================================
Files 146 146
Lines 19243 19247 +4
==========================================
Hits 1761 1761
- Misses 17180 17184 +4
Partials 302 302
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -19,7 +19,7 @@ func ErrUpdateRegistry(err error, path string) error { | |||
} | |||
|
|||
func ErrGenerateModel(err error, modelName string) error { | |||
return errors.New(ErrGenerateModelCode, errors.Alert, []string{fmt.Sprintf("error generating model: %s", modelName)}, []string{err.Error()}, []string{"Registrant used for the model is not supported", "Verify the model's source URL.", "Failed to create a local directory in the filesystem for this model."}, []string{"Ensure that each kind of registrant used is a supported kind.", "Ensure correct model source URL is provided and properly formatted.", "Ensure sufficient permissions to allow creation of model directory."}) | |||
return errors.New(ErrGenerateModelCode, errors.Alert, []string{fmt.Sprintf("error generating model: %s", modelName)}, []string{fmt.Sprintf("Error generating model: %s\n %s", modelName, err.Error())}, []string{"Registrant used for the model is not supported", "Verify the model's source URL.", "Failed to create a local directory in the filesystem for this model."}, []string{"Ensure that each kind of registrant used is a supported kind.", "Ensure correct model source URL is provided and properly formatted.", "Ensure sufficient permissions to allow creation of model directory."}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt.Sprintf("Error generating model: %s\n %s")
This is being repeated, it is already present in short description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the logging done in the RegistryGenerate file it writes only the longDescription so either we can use it to write short + long or we can just put in long and remove from short.
Thoughts?
Notes for Reviewers
This PR fixes #11117
The model name for a model whose components were failing were missing and the error couldn't be located for which model it happened so whenever error happens while generating components log the component name before the error.
Signed commits