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

Retry dataset publication on awaiting indexing failure #45

Merged

Conversation

PaulBoon
Copy link
Contributor

@PaulBoon PaulBoon commented Sep 28, 2023

Fixes DD-1433

Description of changes

When a dataset publish is requested with the option to assure indexing, the result might be a failure 409 status code.
This PR will then try to publish again, with a delay and a maximum number of retries.
If another failure happens or the max retries is reached without success, the publish fails.

How to test

Related PRs

(Add links)

Notify

@DANS-KNAW/dataversedans

@codecov
Copy link

codecov bot commented Sep 28, 2023

Codecov Report

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

Comparison is base (fcd7c73) 36.47% compared to head (6093751) 35.55%.

❗ Current head 6093751 differs from pull request most recent head 8a96681. Consider uploading reports for the commit 8a96681 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #45      +/-   ##
============================================
- Coverage     36.47%   35.55%   -0.93%     
  Complexity      261      261              
============================================
  Files            80       80              
  Lines          1113     1142      +29     
  Branches         42       45       +3     
============================================
  Hits            406      406              
- Misses          699      728      +29     
  Partials          8        8              
Files Coverage Δ
...knaw/dans/lib/dataverse/DataverseClientConfig.java 0.00% <0.00%> (ø)
...in/java/nl/knaw/dans/lib/dataverse/DatasetApi.java 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@janvanmansum janvanmansum left a comment

Choose a reason for hiding this comment

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

Looks good. I am having a hard time reproducing the problem that this solves, though.

Copy link
Contributor

@janvanmansum janvanmansum left a comment

Choose a reason for hiding this comment

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

  • See comments
  • Test with remote debug + suspending indexing thread in Dataverse

@janvanmansum janvanmansum marked this pull request as ready for review October 2, 2023 14:26
@janvanmansum janvanmansum requested a review from a team as a code owner October 2, 2023 14:26
@janvanmansum
Copy link
Contributor

Reviewed and tested with Paul.

@janvanmansum janvanmansum merged commit 2da53fc into DANS-KNAW:master Oct 2, 2023
2 checks passed
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.

2 participants