Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

fix NPE issue with http HEAD #1809

Merged
merged 6 commits into from
Apr 27, 2022
Merged

fix NPE issue with http HEAD #1809

merged 6 commits into from
Apr 27, 2022

Conversation

hilmarf
Copy link
Member

@hilmarf hilmarf commented Apr 26, 2022

when ETag is fetched, feign is failing with NullPointerException, because the response body is empty/null :-(

also moved the DB truncation away from 'retention' into the 'assembly' to have one single transaction - in case of failures, we'll be at least consistent then ;-)

@hilmarf hilmarf added this to the 2.22 milestone Apr 26, 2022
@hilmarf hilmarf marked this pull request as ready for review April 27, 2022 07:24
@hilmarf hilmarf requested review from a team, T-Bendrath, AliceBilc and ioangut April 27, 2022 07:24
@hilmarf hilmarf enabled auto-merge (squash) April 27, 2022 08:48
@sonarcloud
Copy link

sonarcloud bot commented Apr 27, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

96.3% 96.3% Coverage
0.0% 0.0% Duplication

@hilmarf hilmarf merged commit 086e3dc into release/2.22 Apr 27, 2022
@hilmarf hilmarf deleted the fix/DCC_ETag_issues branch April 27, 2022 09:31
hilmarf added a commit that referenced this pull request Apr 27, 2022
* release 2.22

* Merge/main into 2.22 (#1808)

* Bump spring-boot.version from 2.6.6 to 2.6.7 (#1804)

Bumps `spring-boot.version` from 2.6.6 to 2.6.7.

Updates `spring-boot-dependencies` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter-log4j2` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter-web` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter-test` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-maven-plugin` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-dependencies
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-log4j2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

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

* Bump protobuf.version from 3.20.0 to 3.20.1 (#1805)

Bumps `protobuf.version` from 3.20.0 to 3.20.1.

Updates `protobuf-java` from 3.20.0 to 3.20.1
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

Updates `protobuf-java-util` from 3.20.0 to 3.20.1
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protobuf-java-util
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

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

* Bump checkstyle from 10.1 to 10.2 (#1807)

Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 10.1 to 10.2.
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](checkstyle/checkstyle@checkstyle-10.1...checkstyle-10.2)

---
updated-dependencies:
- dependency-name: com.puppycrawl.tools:checkstyle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

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

* Feature/revocation etag (#1806)

* rename package

* fetch etag via http HEAD

* code coverage

* update docs

* add ETag repository + service

* add ConstructorWithParams

* abort further processing if DCC etag exists already

* store DCC etag when revocation list was fetched

* keep latest DCC etag in memory to be able to store it after successful payload storage

* fix link to Zenko CloudServer

* test cover DccRevocationListService

* RetentionPolicyTestRevocation

* package private makes it easier to test

* more code coverage

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

* Payload Signature verification (#1811)

* fix NPE issue with http HEAD (#1809)

* feign can't handle empty/null reponse body :-(

* move DB truncation into the same transaction as the insert, otherwise we might run into inconsistency!

* RetentionPolicyDccRevocationTest

* add DccRevocationClientDelegatorTest

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ioangut <67064882+ioangut@users.noreply.github.com>
hilmarf added a commit that referenced this pull request May 4, 2022
* release 2.22

* Merge/main into 2.22 (#1808)

* Bump spring-boot.version from 2.6.6 to 2.6.7 (#1804)

Bumps `spring-boot.version` from 2.6.6 to 2.6.7.

Updates `spring-boot-dependencies` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter-log4j2` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter-web` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-starter-test` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

Updates `spring-boot-maven-plugin` from 2.6.6 to 2.6.7
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-dependencies
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-log4j2
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-web
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-starter-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.springframework.boot:spring-boot-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

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

* Bump protobuf.version from 3.20.0 to 3.20.1 (#1805)

Bumps `protobuf.version` from 3.20.0 to 3.20.1.

Updates `protobuf-java` from 3.20.0 to 3.20.1
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

Updates `protobuf-java-util` from 3.20.0 to 3.20.1
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protobuf-java-util
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

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

* Bump checkstyle from 10.1 to 10.2 (#1807)

Bumps [checkstyle](https://github.com/checkstyle/checkstyle) from 10.1 to 10.2.
- [Release notes](https://github.com/checkstyle/checkstyle/releases)
- [Commits](checkstyle/checkstyle@checkstyle-10.1...checkstyle-10.2)

---
updated-dependencies:
- dependency-name: com.puppycrawl.tools:checkstyle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

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

* Feature/revocation etag (#1806)

* rename package

* fetch etag via http HEAD

* code coverage

* update docs

* add ETag repository + service

* add ConstructorWithParams

* abort further processing if DCC etag exists already

* store DCC etag when revocation list was fetched

* keep latest DCC etag in memory to be able to store it after successful payload storage

* fix link to Zenko CloudServer

* test cover DccRevocationListService

* RetentionPolicyTestRevocation

* package private makes it easier to test

* more code coverage

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

* Payload Signature verification (#1811)

* fix NPE issue with http HEAD (#1809)

* feign can't handle empty/null reponse body :-(

* move DB truncation into the same transaction as the insert, otherwise we might run into inconsistency!

* RetentionPolicyDccRevocationTest

* add DccRevocationClientDelegatorTest

* Add handling of FetchDccListException in Retention runner (#1818)

* ensure content-type zip for all *dcc-rl* entries

* switch from s3 ListObjectsV2 to ListObjects (#1821)

* switch from s3 ListObjectsV2 to ListObjects

* Update tests accordingly with the approach used

* introduce 'delimiter' on s3 ListObjectsRequest

* fix javadoc

Co-authored-by: Gut Ioan <ioan.gut@sap.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ioangut <67064882+ioangut@users.noreply.github.com>
Co-authored-by: Gut Ioan <ioan.gut@sap.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants