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

minor log fix #485

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions THIRD-PARTY-LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Lists of 417 third-party dependencies.
(Apache License 2.0) Metrics Utility Jakarta Servlets (io.dropwizard.metrics:metrics-jakarta-servlets:4.2.19 - https://metrics.dropwizard.io/metrics-jakarta-servlets)
(The Apache Software License, Version 2.0) metrics3-statsd (com.readytalk:metrics3-statsd:4.2.0 - no url defined)
(Apache 2) metrics4-scala (nl.grons:metrics4-scala_2.13:4.2.8 - https://github.com/erikvanoosten/metrics-scala)
(GNU General Public License (GPLv3)) metricsaggregator (io.dockstore:metricsaggregator:1.15.0 - https://github.com/dockstore/dockstore-support)
(GNU General Public License (GPLv3)) metricsaggregator (io.dockstore:metricsaggregator:1.16.0-SNAPSHOT - https://github.com/dockstore/dockstore-support)
(Eclipse Distribution License - v 1.0) MIME streaming extension (org.jvnet.mimepull:mimepull:1.9.15 - https://github.com/eclipse-ee4j/metro-mimepull)
(The MIT License) mockito-core (org.mockito:mockito-core:3.12.4 - https://github.com/mockito/mockito)
(The MIT License) mockito-inline (org.mockito:mockito-inline:3.12.4 - https://github.com/mockito/mockito)
Expand Down Expand Up @@ -410,10 +410,10 @@ Lists of 417 third-party dependencies.
(Apache License 2.0) Throttling Appender (io.dropwizard.logback:logback-throttling-appender:1.4.0 - https://github.com/dropwizard/logback-throttling-appender/)
(Apache License, Version 2.0) tomcat-jdbc (org.apache.tomcat:tomcat-jdbc:10.1.13 - https://tomcat.apache.org/)
(Apache License, Version 2.0) tomcat-juli (org.apache.tomcat:tomcat-juli:10.1.13 - https://tomcat.apache.org/)
(GNU General Public License (GPLv3)) toolbackup (io.dockstore:toolbackup:1.15.0 - https://github.com/dockstore/dockstore-support)
(GNU General Public License (GPLv3)) tooltester (io.dockstore:tooltester:1.15.0 - https://github.com/dockstore/dockstore-support)
(GNU General Public License (GPLv3)) toolbackup (io.dockstore:toolbackup:1.16.0-SNAPSHOT - https://github.com/dockstore/dockstore-support)
(GNU General Public License (GPLv3)) tooltester (io.dockstore:tooltester:1.16.0-SNAPSHOT - https://github.com/dockstore/dockstore-support)
(Eclipse Distribution License - v 1.0) TXW2 Runtime (org.glassfish.jaxb:txw2:3.0.2 - https://eclipse-ee4j.github.io/jaxb-ri/)
(GNU General Public License (GPLv3)) utils (io.dockstore:utils:1.15.0 - https://github.com/dockstore/dockstore-support)
(GNU General Public License (GPLv3)) utils (io.dockstore:utils:1.16.0-SNAPSHOT - https://github.com/dockstore/dockstore-support)
(WDL License https://github.com/openwdl/wdl/blob/master/LICENSE) wdl-biscayne (org.broadinstitute:wdl-biscayne_2.13:85 - no url defined)
(WDL License https://github.com/openwdl/wdl/blob/master/LICENSE) wdl-draft2 (org.broadinstitute:wdl-draft2_2.13:85 - no url defined)
(WDL License https://github.com/openwdl/wdl/blob/master/LICENSE) wdl-draft3 (org.broadinstitute:wdl-draft3_2.13:85 - no url defined)
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@
try {
extendedGa4GhApi.executionMetricsPost(new ExecutionsRequestBody().runExecutions(workflowExecutionsToSubmit), Partner.TERRA.toString(), sourceUrlTrsInfo.trsId(),
sourceUrlTrsInfo.version(), description);
numberOfExecutionsSubmitted.addAndGet(workflowMetricRecords.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I would think this location would also only count it if there's no exception. I believe the problem is that we're logging the count of workflowMetricRecords which may not be the same as the workflow executions that are being submitted via workflowExecutionsToSubmit.

I think we should add the count of workflowExecutionsToSubmit instead of workflowMetricRecords because the former gets partitioned and contains the accurate count

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, totally missed this and makes sense

} catch (ApiException e) {
if (e.getCode() == HttpStatus.SC_REQUEST_TOO_LONG) {
// One execution is too large, not much that can be done, so log and skip it
Expand All @@ -225,7 +224,10 @@
String.format("Could not submit execution metrics to Dockstore for workflow %s: %s", sourceUrlTrsInfo,
e.getMessage()), skippedExecutionsCsvPrinter, false);
}
return;

Check warning on line 227 in metricsaggregator/src/main/java/io/dockstore/metricsaggregator/client/cli/TerraMetricsSubmitter.java

View check run for this annotation

Codecov / codecov/patch

metricsaggregator/src/main/java/io/dockstore/metricsaggregator/client/cli/TerraMetricsSubmitter.java#L227

Added line #L227 was not covered by tests
}
// only count if there was no exception
numberOfExecutionsSubmitted.addAndGet(workflowMetricRecords.size());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
-->
<properties>
<!-- the following properties set sane defaults when no revision properties are set from the command-line -->
<revision>1.15</revision>
<revision>1.16</revision>
<changelist>.0-SNAPSHOT</changelist>

<github.url>scm:git:git@github.com:dockstore/dockstore-support.git</github.url>
Expand Down