Skip to content
Merged
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
21 changes: 0 additions & 21 deletions src/providers/r2Provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as Sentry from '@sentry/cloudflare';
import { CACHE_HEADERS } from '../constants/cache';
import { R2_RETRY_LIMIT } from '../../lib/limits.mjs';
import CACHED_DIRECTORIES from '../constants/cachedDirectories.json' assert { type: 'json' };
Expand Down Expand Up @@ -140,26 +139,6 @@ export class R2Provider implements Provider {
result = await s3Provider.readDirectory(path);
}

// Temporary: compare S3/cached listing result to what the KV provider returns
Comment thread
flakey5 marked this conversation as resolved.
if (this.ctx.env.ENVIRONMENT !== 'e2e-tests') {
this.ctx.execution.waitUntil(
(async (): Promise<undefined> => {
try {
const kvResult = await kvProvider.readDirectory(path);

if (JSON.stringify(kvResult) !== JSON.stringify(result)) {
throw new Error('listing mismatch');
}
} catch (err) {
// Either an error when hitting KV or a mismatch between S3 & KV
Sentry.captureException(
new Error(`KvProvider error for path ${path}`, { cause: err })
);
}
})()
);
}

return result;
}
}
Expand Down
Loading