Skip to content

Commit a829d44

Browse files
authored
src: don't compare kv results (#915)
Signed-off-by: flakey5 <[email protected]>
1 parent c751cbf commit a829d44

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

src/providers/r2Provider.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import * as Sentry from '@sentry/cloudflare';
21
import { CACHE_HEADERS } from '../constants/cache';
32
import { R2_RETRY_LIMIT } from '../../lib/limits.mjs';
43
import CACHED_DIRECTORIES from '../constants/cachedDirectories.json' assert { type: 'json' };
@@ -140,26 +139,6 @@ export class R2Provider implements Provider {
140139
result = await s3Provider.readDirectory(path);
141140
}
142141

143-
// Temporary: compare S3/cached listing result to what the KV provider returns
144-
if (this.ctx.env.ENVIRONMENT !== 'e2e-tests') {
145-
this.ctx.execution.waitUntil(
146-
(async (): Promise<undefined> => {
147-
try {
148-
const kvResult = await kvProvider.readDirectory(path);
149-
150-
if (JSON.stringify(kvResult) !== JSON.stringify(result)) {
151-
throw new Error('listing mismatch');
152-
}
153-
} catch (err) {
154-
// Either an error when hitting KV or a mismatch between S3 & KV
155-
Sentry.captureException(
156-
new Error(`KvProvider error for path ${path}`, { cause: err })
157-
);
158-
}
159-
})()
160-
);
161-
}
162-
163142
return result;
164143
}
165144
}

0 commit comments

Comments
 (0)