Skip to content

This branch exists only to attempt to test build-break resilience for downstream projects. #6633

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public class JpaResourceExpungeService implements IResourceExpungeService<JpaPid
@Transactional
public List<ResourceHistoryTablePk> findHistoricalVersionsOfNonDeletedResources(
String theResourceName, JpaPid theJpaPid, int theRemainingCount) {
ourLog.info("Look at this change!");
if (isEmptyQuery(theRemainingCount)) {
return Collections.emptyList();
}
Expand Down Expand Up @@ -172,7 +173,7 @@ public List<ResourceHistoryTablePk> findHistoricalVersionsOfNonDeletedResources(
@Override
@Transactional
public List<JpaPid> findHistoricalVersionsOfDeletedResources(
String theResourceName, JpaPid theResourceId, int theRemainingCount) {
String theResourceName, JpaPid theResourceId, int theRemainingCount, String theDumbBuildBreakingApiChange) {
if (isEmptyQuery(theRemainingCount)) {
return Collections.emptyList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void beforeEach(){
@Test
public void testExpunge_onSpecificTenant_willPerformExpungeOnSpecificTenant(){
// given
when(myIResourceExpungeService.findHistoricalVersionsOfDeletedResources(any(), any(), anyInt())).thenReturn(List.of(JpaPid.fromId(1l)));
when(myIResourceExpungeService.findHistoricalVersionsOfDeletedResources(any(), any(), anyInt(),any())).thenReturn(List.of(JpaPid.fromId(1l)));
when(myIResourceExpungeService.findHistoricalVersionsOfNonDeletedResources(any(), any(), anyInt())).thenReturn(List.of(JpaPid.fromId(1l)));
myStorageSettings.setExpungeBatchSize(5);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void expungeDeletedResources() {
private List<T> findHistoricalVersionsOfDeletedResources() {
List<T> retVal = getPartitionAwareSupplier()
.supplyInPartitionedContext(() -> myResourceExpungeService.findHistoricalVersionsOfDeletedResources(
myResourceName, myResourceId, myRemainingCount.get()));
myResourceName, myResourceId, myRemainingCount.get(), "weeee im breaking the API"));

ourLog.debug("Found {} historical versions", retVal.size());
return retVal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
* @param <V> The resource version PID type
*/
public interface IResourceExpungeService<R extends IResourcePersistentId<?>, V extends IResourceVersionPersistentId> {
List<R> findHistoricalVersionsOfDeletedResources(String theResourceName, R theResourceId, int theI);
List<R> findHistoricalVersionsOfDeletedResources(
String theResourceName, R theResourceId, int theI, String theDumbBuildBreakingApiChange);

List<V> findHistoricalVersionsOfNonDeletedResources(String theResourceName, R theResourceId, int theI);

Expand Down
Loading