Просмотр исходного кода

ref(replays): Make sure the Replay type matches the data the server responds with (#47330)

Ryan Albrecht 1 год назад
Родитель
Сommit
e1dece7c76

+ 1 - 0
fixtures/js-stubs/replayList.ts

@@ -19,6 +19,7 @@ export function ReplayList(
       duration: duration(30000),
       finished_at: new Date('2022-09-15T06:54:00+00:00'),
       id: '346789a703f6454384f1de473b8b9fcc',
+      is_archived: false,
       os: {
         name: 'sentry.javascript.react',
         version: '7.42.0',

+ 1 - 2
fixtures/js-stubs/replayRecord.ts

@@ -24,7 +24,7 @@ export function ReplayRecord(replayRecord: Partial<TReplayRecord> = {}): TReplay
     error_ids: ['5c83aaccfffb4a708ae893bad9be3a1c'],
     finished_at: new Date('Sep 22, 2022 5:00:03 PM UTC'),
     id: '761104e184c64d439ee1014b72b4d83b',
-    longest_transaction: 0,
+    is_archived: false,
     os: {
       name: 'Other',
       version: '',
@@ -37,7 +37,6 @@ export function ReplayRecord(replayRecord: Partial<TReplayRecord> = {}): TReplay
       version: '7.1.1',
     },
     started_at: new Date('Sep 22, 2022 4:58:39 PM UTC'),
-
     trace_ids: [],
     urls: ['http://localhost:3000/'],
     user: {

+ 1 - 0
static/app/views/issueDetails/groupReplays/groupReplays.spec.tsx

@@ -124,6 +124,7 @@ describe('GroupReplays', () => {
                 'duration',
                 'finished_at',
                 'id',
+                'is_archived',
                 'os',
                 'project_id',
                 'started_at',

+ 6 - 2
static/app/views/replays/types.tsx

@@ -48,9 +48,11 @@ export type ReplayRecord = {
    */
   id: string;
   /**
-   * The longest transaction associated with the replay measured in milliseconds.
+   * Whether the replay was deleted.
+   * When deleted the rrweb data & attachments are removed from blob storage,
+   * but the record of the replay is not removed.
    */
-  longest_transaction: number;
+  is_archived: boolean;
   os: {
     name: null | string;
     version: null | string;
@@ -109,6 +111,7 @@ export type ReplayListRecord = Pick<
   | 'duration'
   | 'finished_at'
   | 'id'
+  | 'is_archived'
   | 'project_id'
   | 'started_at'
   | 'user'
@@ -125,6 +128,7 @@ export const REPLAY_LIST_FIELDS: ReplayRecordNestedFieldName[] = [
   'duration',
   'finished_at',
   'id',
+  'is_archived',
   'os.name',
   'os.version',
   'project_id',