spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
704 stars 694 forks source link

Workaround to keep exception from disappearing during Pub/Sub processing #2617

Closed elefeint closed 3 years ago

elefeint commented 3 years ago

I've filed spring-projects/spring-integration#3450 in Spring Integration for the root cause, but in the meantime this will keep the problem from affecting Pub/Sub binder. The workaround will force the exception in MessageProducerSupport to bubble up without trying to go through message infrastructure, in the scenario where context shutdown is detected.

Fixes #2615.

sonarcloud[bot] commented 3 years ago

SonarCloud Quality Gate failed.

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

60.0% 60.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (1.8.0_151) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 11. Read more here

codecov[bot] commented 3 years ago

Codecov Report

Merging #2617 (7f35707) into master (d9ae0b3) will decrease coverage by 7.36%. The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2617      +/-   ##
============================================
- Coverage     81.31%   73.95%   -7.37%     
+ Complexity     2398     2169     -229     
============================================
  Files           267      267              
  Lines          7810     7813       +3     
  Branches        809      809              
============================================
- Hits           6351     5778     -573     
- Misses         1113     1655     +542     
- Partials        346      380      +34     
Flag Coverage Δ Complexity Δ
integration ? ?
unittests 73.95% <33.33%> (-0.05%) 0.00 <1.00> (ø)

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

Impacted Files Coverage Δ Complexity Δ
...tegration/inbound/PubSubInboundChannelAdapter.java 63.63% <33.33%> (-1.75%) 10.00 <1.00> (+1.00) :arrow_down:
...ringframework/cloud/gcp/data/firestore/AutoId.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...gcp/secretmanager/SecretManagerPropertySource.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-4.00%)
...a/spanner/repository/query/SpannerQueryMethod.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-6.00%)
...retmanager/SecretManagerPropertySourceLocator.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...figure/config/GcpConfigBootstrapConfiguration.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-2.00%)
...epository/config/SpannerRepositoriesRegistrar.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...ository/config/DatastoreRepositoriesRegistrar.java 0.00% <0.00%> (-100.00%) 0.00% <0.00%> (-3.00%)
...e/spanner/GcpSpannerEmulatorAutoConfiguration.java 0.00% <0.00%> (-90.91%) 0.00% <0.00%> (-2.00%)
...restore/GcpFirestoreEmulatorAutoConfiguration.java 0.00% <0.00%> (-84.85%) 0.00% <0.00%> (-4.00%)
... and 56 more

Continue to review full report at Codecov.

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

meltsufin commented 3 years ago

Will need to port to 2.x too?

elefeint commented 3 years ago

Yep, definitely.