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

workflow update to mail error log w/signoff #11156

Merged
merged 9 commits into from
Jun 17, 2024

Conversation

Jougan-0
Copy link
Contributor

@Jougan-0 Jougan-0 commented Jun 12, 2024

Notes for Reviewers

Update the workflow to send error logs whenever an error occurs while running mesheryctl registry generate. Additionally, create a new file to store only the errors.

Local run of the workflow.

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Jougan-0 <prasantmishra2018@gmail.com>
@github-actions github-actions bot added component/mesheryctl CLI for Meshery area/ci Continuous Integration labels Jun 12, 2024
@Jougan-0 Jougan-0 requested a review from MUzairS15 June 12, 2024 05:55
Copy link

github-actions bot commented Jun 12, 2024

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 27 lines in your changes missing coverage. Please review.

Project coverage is 9.19%. Comparing base (095d525) to head (fdda196).
Report is 69 commits behind head on master.

Files Patch % Lines
mesheryctl/internal/cli/root/registry/generate.go 0.00% 21 Missing ⚠️
mesheryctl/pkg/utils/formatter.go 0.00% 3 Missing ⚠️
mesheryctl/internal/cli/root/root.go 0.00% 2 Missing ⚠️
mesheryctl/pkg/utils/testing.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11156      +/-   ##
==========================================
- Coverage    9.20%    9.19%   -0.01%     
==========================================
  Files         145      145              
  Lines       19082    19091       +9     
==========================================
  Hits         1756     1756              
- Misses      17024    17033       +9     
  Partials      302      302              
Flag Coverage Δ
unittests 9.19% <0.00%> (-0.01%) ⬇️

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.

@@ -417,6 +425,16 @@ func logModelGenerationSummary(modelToCompGenerateTracker *store.GenerticThreadS
utils.Log.Info(fmt.Sprintf("-----------------------------\n-----------------------------\nGenerated %d models and %d components", totalAggregateModel, totalAggregateComponents))
}

func logError(err error, modelName string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

No need.
Use log instance, refer the existing approach which logs its output to registry log file.
Create a new log instance for errors logs when an error occurs use that log instance. As you initialize that instance set its log output to registry-generate-error.

Also make the directory structured, if you would.
logs/registry/1. log (contains logs of al severity except error logs) 2. error (contains only error logs)`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do so positively.

Jougan-0 and others added 4 commits June 13, 2024 16:22
Signed-off-by: Jougan-0 <prasantmishra2018@gmail.com>
Signed-off-by: Jougan-0 <prasantmishra2018@gmail.com>
Signed-off-by: Jougan-0 <prasantmishra2018@gmail.com>
@Jougan-0 Jougan-0 requested a review from MUzairS15 June 13, 2024 11:39
Copy link
Member

@leecalcote leecalcote left a comment

Choose a reason for hiding this comment

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

Does this new email replace the existing email for this workflow or will it be a duplicate?

@Jougan-0
Copy link
Contributor Author

Does this new email replace the existing email for this workflow or will it be a duplicate?

This will replace the component generator failure email in these scenarios:

  • If the component generator job fails, the old failure email will be used.
    
  • If the component generator is successful but the error log is not empty, a new email regarding the error logs will be sent, and the workflow will be marked as successful.
    

For the scenario if the generator works and updater fails.

  • We will have two emails: one for the failure of the updater and one for the error logs.

Copy link
Member

@leecalcote leecalcote left a comment

Choose a reason for hiding this comment

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

LGTM

@leecalcote leecalcote merged commit d1fad1e into meshery:master Jun 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Continuous Integration component/mesheryctl CLI for Meshery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants