elixir-cloud-aai / tesk-api

GA4GH TES API Service that translates tasks into Kubernetes Batch API calls
Apache License 2.0
7 stars 18 forks source link

Upgrade to org.springframework.boot to v2.6.1 #29

Closed lvarin closed 1 year ago

aniewielska commented 2 years ago

Hi @lvarin - unfortunately not so easy. TESK API still has JUnit4 tests. They stop running silently in your version and give a false impression that all is good. When you add this:

<dependency>
    <groupId>org.junit.vintage</groupId>
    <artifactId>junit-vintage-engine</artifactId>
    <scope>test</scope>
    <exclusions>
        <exclusion>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>

to dependencies (reference here, although I expected compilation failures and not silent pass!), some tests start to fail. Another question was specific version of Hibernate Validator necessary? Always good to go with the one managed by Spring Boot, than choose your own one. The release notes look quite extensive. Not such an easy upgrade as I hoped for.

lvarin commented 2 years ago

Well, it was too good to be true. I will add the fix to the Junit and see if I can fix the errors.

The reason to add the hibernate dep is that otherwise the build was failing.

aniewielska commented 2 years ago

According to this this would be a better option:

  <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>

It will pull the Validator compatible with this Spring Boot (not sure of exact differences between the packaging of org.hibernate and org.hibernate.validator. I think it resolves some test errors (but not all).

aniewielska commented 2 years ago

Hi again - my last one before I switch off for a couple of weeks:

Brico87 commented 2 years ago

Hey ! I allow myself jumping into that PR. Regarding the incompatibility between Springfox and boot versions, you can find a solution here: https://stackoverflow.com/questions/70036953/springboot-2-6-0-spring-fox-3-failed-to-start-bean-documentationpluginsboot/70037507#70037507.

Just do not forget to add that:

spring.mvc.pathmatch.matching-strategy=ant_path_matcher

to the application.properties file. Then you can keep version 2.6.1 of boot and use 3.0.0 of Springfox

Cheers !

lvarin commented 2 years ago

Thanks to both for the help. Now the tests pass, this time hope for real :)

lvarin commented 1 year ago

Thanks, I applied all suggestions

codecov[bot] commented 1 year ago

Codecov Report

Base: 55.52% // Head: 55.23% // Decreases project coverage by -0.28% :warning:

Coverage data is based on head (29dad18) compared to base (27a1323). Patch coverage: 46.15% of modified lines in pull request are covered.

:exclamation: Current head 29dad18 differs from pull request most recent head b1f1963. Consider uploading reports for the commit b1f1963 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #29 +/- ## ========================================== - Coverage 55.52% 55.23% -0.29% ========================================== Files 64 64 Lines 2064 2091 +27 Branches 217 223 +6 ========================================== + Hits 1146 1155 +9 - Misses 787 803 +16 - Partials 131 133 +2 ``` | [Impacted Files](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai) | Coverage Δ | | |---|---|---| | [...ain/java/uk/ac/ebi/tsc/tesk/config/GsonConfig.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svY29uZmlnL0dzb25Db25maWcuamF2YQ==) | `100.00% <ø> (ø)` | | | [...sc/tesk/config/swagger/OAuth2ClientProperties.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svY29uZmlnL3N3YWdnZXIvT0F1dGgyQ2xpZW50UHJvcGVydGllcy5qYXZh) | `88.88% <ø> (ø)` | | | [...bi/tsc/tesk/k8s/config/KubernetesClientConfig.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbmZpZy9LdWJlcm5ldGVzQ2xpZW50Q29uZmlnLmphdmE=) | `92.85% <ø> (ø)` | | | [.../uk/ac/ebi/tsc/tesk/k8s/constant/K8sConstants.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbnN0YW50L0s4c0NvbnN0YW50cy5qYXZh) | `85.71% <ø> (ø)` | | | [...i/tsc/tesk/k8s/convert/ExecutorCommandWrapper.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbnZlcnQvRXhlY3V0b3JDb21tYW5kV3JhcHBlci5qYXZh) | `100.00% <ø> (ø)` | | | [...sc/tesk/k8s/convert/KubernetesObjectsSupplier.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbnZlcnQvS3ViZXJuZXRlc09iamVjdHNTdXBwbGllci5qYXZh) | `96.61% <ø> (ø)` | | | [.../tsc/tesk/k8s/convert/TaskmasterEnvProperties.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbnZlcnQvVGFza21hc3RlckVudlByb3BlcnRpZXMuamF2YQ==) | `91.66% <ø> (ø)` | | | [.../java/uk/ac/ebi/tsc/tesk/k8s/convert/data/Job.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbnZlcnQvZGF0YS9Kb2IuamF2YQ==) | `88.88% <ø> (ø)` | | | [.../tsc/tesk/k8s/convert/data/SingleTaskStrategy.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbnZlcnQvZGF0YS9TaW5nbGVUYXNrU3RyYXRlZ3kuamF2YQ==) | `90.90% <ø> (ø)` | | | [...java/uk/ac/ebi/tsc/tesk/k8s/convert/data/Task.java](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai#diff-c3JjL21haW4vamF2YS91ay9hYy9lYmkvdHNjL3Rlc2svazhzL2NvbnZlcnQvZGF0YS9UYXNrLmphdmE=) | `93.54% <ø> (ø)` | | | ... and [8 more](https://codecov.io/gh/elixir-cloud-aai/tesk-api/pull/29?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=elixir-cloud-aai)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.