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

[OCG] fix: Scheduler reliably remove jobs from schedule #75

Open
wants to merge 4,614 commits into
base: master
Choose a base branch
from

Conversation

tokland
Copy link

@tokland tokland commented Jan 21, 2025

Required by: https://app.clickup.com/t/8696q5hym

This is just a cherry-pick from upstream fix (applied to 2.37.10)

dhis2#12815

For more details: https://app.clickup.com/t/8696q5hym?comment=90120096087640

jbee and others added 30 commits November 15, 2021 16:07
…reations [DHIS2-11752] (2.37) (dhis2#8734)

Co-authored-by: Stian Sandvold <[email protected]>
Co-authored-by: Gintare Vilkelyte <[email protected]>
* fix: OuMode validation in event query

* fix: OuMode validation
* fix: fixes ImportConflict NPE [DHIS2-12162]

* fix: added a test case [DHIS2-12162]

* fix: more NPE fixed [DHIS2-12162]
….37) (dhis2#9318)

* fix: data value import - delete with zero or no value [DHIS2-11624] (dhis2#8610)

Takes care of three cases:
* delete by updating to zero should work
* delete by using strategy DELETE with no value or the old value should work
* delete by using strategy DELETE with new value different to the old one should work (did work before but now is tested as well)

* fix: check if OU is in user hierarchy when moving OUs [DHIS2-2162] (dhis2#8874)

* fix: check if OU is in user hierarchy when moving OUs [DHIS2-2162]

* fix: expectations in unit tests using same changed tests data [DHIS2-2162]
…11589] (2.37) (dhis2#9317)

* fix: data value import - delete with zero or no value [DHIS2-11624] (dhis2#8610)

Takes care of three cases:
* delete by updating to zero should work
* delete by using strategy DELETE with no value or the old value should work
* delete by using strategy DELETE with new value different to the old one should work (did work before but now is tested as well)

* fix: only remind users about account disable on specific days [DHIS2-11589] (dhis2#8846)

Co-authored-by: Morten Hansen <[email protected]>
…erly [DHIS2-11281] [DHIS2-DHIS2-11301] (dhis2#9319)

(cherry picked from commit e2415a2)
…842] (dhis2#9313)

* fix: Grid Caching is not properly used in analytics [2.37-DHIS2-TECH-842]

* QA issue (sonar qube)

* QA issue (sonar qube)

Co-authored-by: Lars Helge Øverland <[email protected]>
… (2.37) (dhis2#9326)

* fix: OrgUnitIdScheme not working when adding enrollment [DHIS2-12181] (2.37)

* Remove unnecessary check line
…s2#9331)

* chore: provide meaningful error message DHIS2-12123

the failed event import in NTI is due to a missing reference from a
program stage to a program. this should not happen but it does
occasionally, due to the way the metadata import is implemented.

provide an error message guiding the user to a solution for this edge
case, until the root cause is fixed.

* fix: add programs without registration to preheat DHIS2-12123

https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/new-tracker.html\#events
states that program is not required. In this case the program and then
program instance are not in the preheat. This leads to an error in
the SQL insert statement as program instance needs to be specified
on the program stage instance. Since programs without registration
are expected/estimated to be in the order of a dozen we are fetching
all of them
) (dhis2#9360)

instead of throwing a more detailed exception.

* EventProgramPreProcessor
* EventWithoutRegistrationPreProcessor

are 2 pre-processors where we discovered an NPE due to a missing
reference in the DB from program stage to program. This is an edge case
due to how the metadata import is currently implemented.

Since pre-processing is done before validation we opted for returning
before an NPE occurs. Validation will then find that a reference to a
program is missing in the DB and create an error report.

Note that the program field is not a mandatory field in the payload
according to our NTI API documentation. I therefore needed an extra
error code and return before adding E1123 which would only confuse the
user.
…2#9415) (dhis2#9433)

quoting the userId parameter leads to an OR clause like

OR sharing->'users'->'''ILK8ARxOS1V'''->>'access' LIKE '__r%'

in the ACL query which does not contribute any results to the overall
query
…9431) (dhis2#9440)

Bumps log4j-core from 2.14.1 to 2.15.0.

---
updated-dependencies:
- dependency-name: org.apache.logging.log4j:log4j-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

(cherry picked from commit d68ea62)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
zubaira and others added 29 commits August 3, 2022 14:56
…his2#11481)

* fix: NoEntityFound exception for userService.getDisplayName()

* Update UserServiceTest.java
* fix: Fix enrollment error message [DHIS2-11410]

* fix: Fix enrollment error message [DHIS2-11410]

make test methods public
We did not run all tests on Jenkins since our default profile which we
activate by default only runs unit tests (excludes tests tagged with
integration).

by excluding the default profile with -default surefire will pick up all
tests no matter what group/tag they belong to.

Note that we are then running without any profile, which you can check using

mvn help:active-profiles -P -default -f dhis-2/pom.xml

Adapted pipelines to use the pom.xml instead of the pom-full.xml since having
2 has the risk of them diverging as they have. pom-full.xml only being used on
Jenkins and pom.xml locally and on GitHub.
dhis2#11547 fixed potential issues
that could cause the count of tests running on Jenkins/GitHub to divert.
The actual root cause for version 2.37 is that we were using an old
version of surefire

org.apache.maven.plugins:maven-surefire-plugin:2.12.4

which you can see by running the tests without default or integration
profile. So with only jdk8 or jdk11.

When profiles default or integration are used like they are on GitHub
where unit and integration tests run in parallel we actually use

org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5

The newer plugin has support for JUnit 5 as described in https://maven.apache.org/surefire/maven-surefire-plugin/examples/junit-platform.html

which is why you also see the build log

Using the provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider

when running the build with -X in a module that has a JUnit 5
dependency.

Ultimately, the test count differed by the number of JUnit 5 tests which
did not run using maven-surefire-plugin 2.12.4
…-13429] [2.37] (dhis2#11669)

* fix: Use inheritance instead of partitions in analytics export [DHIS2-13429]

* fix: Sonar issues [DHIS2-13429]

* fix: Add back final for injections [DHIS2-13429]
Merges latest security advisories 2.37.8.1
* CVE-2022-41948 
* CVE-2022-41947
* CVE-2022-41949
fix: getSystemSetting causes performance issue
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.