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: Fix the table population problem when the skip outliers switch is activated/deactivated #16037

Merged
merged 5 commits into from
Dec 28, 2023

Conversation

d-bernat
Copy link
Contributor

@d-bernat d-bernat added the run-api-analytics-tests Enables analytics e2e tests label Dec 28, 2023
Copy link

codecov bot commented Dec 28, 2023

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (19e1ff2) 66.37% compared to head (a346b29) 66.37%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #16037      +/-   ##
============================================
- Coverage     66.37%   66.37%   -0.01%     
- Complexity    31522    31524       +2     
============================================
  Files          3507     3507              
  Lines        130574   130594      +20     
  Branches      15234    15238       +4     
============================================
+ Hits          86674    86678       +4     
- Misses        36828    36847      +19     
+ Partials       7072     7069       -3     
Flag Coverage Δ
integration 50.30% <13.04%> (-0.01%) ⬇️
integration-h2 32.36% <4.34%> (-0.01%) ⬇️
unit 30.34% <17.39%> (-0.01%) ⬇️

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

Files Coverage Δ
...rc/main/java/org/hisp/dhis/feedback/ErrorCode.java 100.00% <100.00%> (ø)
...his/analytics/table/JdbcAnalyticsTableManager.java 70.79% <100.00%> (ø)
...ytics/outlier/service/AnalyticsOutlierService.java 1.04% <0.00%> (-0.05%) ⬇️
...detection/AnalyticsOutlierDetectionController.java 0.00% <0.00%> (ø)
.../table/scheduling/ContinuousAnalyticsTableJob.java 4.08% <0.00%> (-0.80%) ⬇️

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 19e1ff2...a346b29. Read the comment docs.

Copy link
Contributor

@maikelarabori maikelarabori left a comment

Choose a reason for hiding this comment

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

Hi @d-bernat, the fix looks good. I added two comments that would be nice to address.

Cheers

@@ -144,4 +156,11 @@ private OutlierRequest getFromQuery(OutlierQueryParams queryParams, boolean anal

return request;
}

private void checkAnalyticsTableForOutliers() {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method should be moved to the class AnalyticsOutlierService, with a proper Javadoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -144,4 +156,11 @@ private OutlierRequest getFromQuery(OutlierQueryParams queryParams, boolean anal

return request;
}

private void checkAnalyticsTableForOutliers() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to have a e2e to test this error. Please see the class NoAnalyticsTablesErrorsScenariosTest. You can add a new test there to simulate this exception and assert the response/error.

Copy link
Contributor Author

@d-bernat d-bernat Dec 28, 2023

Choose a reason for hiding this comment

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

e2e is coming, there are no e2e for outliers at all now

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, if you prefer to add it as part of all others e2e for Outliers is fine. Just please add a TODO in the class NoAnalyticsTablesErrorsScenariosTest, so we do not forget this scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@maikelarabori
Copy link
Contributor

Hi @d-bernat, please do not forget to update the PR description with a proper one. Thanks.

@d-bernat d-bernat enabled auto-merge (squash) December 28, 2023 11:31
Copy link

sonarcloud bot commented Dec 28, 2023

@d-bernat d-bernat merged commit 64c54cf into master Dec 28, 2023
14 of 15 checks passed
@d-bernat d-bernat deleted the 2.41-DHIS2-16375 branch December 28, 2023 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-api-analytics-tests Enables analytics e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants