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

#126: Monitoring for ide-urls #160

Closed
wants to merge 12 commits into from

Conversation

alfeilex
Copy link
Member

@alfeilex alfeilex commented Dec 20, 2023

Fixes: #126

@coveralls
Copy link
Collaborator

coveralls commented Dec 20, 2023

Pull Request Test Coverage Report for Build 10613389805

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 65 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.5%) to 64.303%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/url/UpdateInitiator.java 10 0.0%
com/devonfw/tools/ide/url/updater/AbstractUrlUpdater.java 55 70.56%
Totals Coverage Status
Change from base Build 10610910357: -0.5%
Covered Lines: 5728
Relevant Lines: 8593

💛 - Coveralls

@@ -441,6 +446,9 @@ private void doUpdateStatusJson(boolean success, int statusCode, UrlVersion urlV

logger.info("For tool {} and version {} the download verification succeeded with status code {} for URL {}.", tool,
version, code, url);

urlErrorState.updateVerifications(true);
Copy link
Member Author

Choose a reason for hiding this comment

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

We need probably another place for this function. Currently, I have commented out updateExistingVersions in the update function. If not, the number of verification is doubled, because doUpdateStatusJson is called twice.

@jan-vcapgemini jan-vcapgemini marked this pull request as ready for review August 7, 2024 12:43
@hohwille hohwille added this to the release:2024.09.001 milestone Aug 13, 2024
Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

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

Looks good, I've added some small CR's.


private static final UrlErrorReport instance = new UrlErrorReport();

private static UrlErrorReport getInstance() {
Copy link
Member

Choose a reason for hiding this comment

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

why do we need to make all this static?
Couldn't the UpdateInitiator create the errorReport and pass it to every UrlUpdater via UpdateManager?
In general static without final can be evil and if it can be avoided that is always good to do.

Comment on lines +30 to +32
mvn -B -ntp -Dstyle.color=always exec:java -Dexec.mainClass="com.devonfw.tools.ide.url.UpdateInitiator" -Dexec.args="../ide-urls PT5H30M" | tee log.txt
sed -n '/ERROR REPORT FROM/,/ERROR REPORT ENDS/p' log.txt > error_report.txt
cat error_report.txt
Copy link
Member

@hohwille hohwille Aug 26, 2024

Choose a reason for hiding this comment

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

If we have Java to collect all the errorReport, then why can't this directly print the report at the endinstead of writing all logs to disc and then do sed magic filtering the error report out of the log that we have produced ourselves in Java in a structured way and print it via cat?

@alfeilex
Copy link
Member Author

alfeilex commented Sep 4, 2024

Branch is outdated. The new PR is #584

@alfeilex alfeilex closed this Sep 4, 2024
@alfeilex alfeilex deleted the url-updater-error-state branch September 10, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Add monitoring and check to ide-urls
4 participants