Skip to content

Commit

Permalink
Only show mutations observed for the active segment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed Jan 18, 2024
1 parent b0763d2 commit 017d5c3
Show file tree
Hide file tree
Showing 5 changed files with 469 additions and 26 deletions.
115 changes: 110 additions & 5 deletions vscode/generated/src/modality-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ export interface paths {
};
"/v2/mutations": {
/**
* List mutations
* @description List mutations
* List all mutations
* @description List all mutations
*/
get: operations["list_mutations"];
};
"/v2/mutations/{workspace_version_id}/segments/{rule_name}/{segment_name}": {
/**
* List all mutations for the given segment
* @description List all mutations for the given segment
*/
get: operations["list_segment_mutations"];
};
"/v2/mutators": {
/**
* List mutators
Expand Down Expand Up @@ -334,7 +341,9 @@ export interface components {
Some: components["schemas"]["AttrVal"];
}]>;
Mutation: {
experiment_name?: string | null;
/** Format: int64 */
created_at_utc_seconds: number;
linked_experiment?: string | null;
mutation_id: components["schemas"]["MutationId"];
mutator_attributes: {
[key: string]: components["schemas"]["AttrVal"] | undefined;
Expand All @@ -343,11 +352,36 @@ export interface components {
params: {
[key: string]: components["schemas"]["AttrVal"] | undefined;
};
region_details_summary?: components["schemas"]["MutationRegionDetailsSummary"] | null;
};
/** Format: uuid */
MutationId: string;
MutationRegionDetails: {
/**
* @description Maps to the "modality.mutation.clear_communicated" event name,
* and the `modality.mutation.success` attribute on such an event
*/
clear_communicated_and_success?: ((components["schemas"]["EventCoordinate"] & (boolean | null))[]) | null;
/**
* @description Maps to the "modality.mutation.command_communicated" event name,
* and the `modality.mutation.success` attribute on such an event
*/
command_communicated_and_success?: ((components["schemas"]["EventCoordinate"] & (boolean | null))[]) | null;
/**
* @description Maps to the "modality.mutation.injected" event name,
* and the `modality.mutation.success` attribute on such an event
*/
inject_attempted_and_success?: ((components["schemas"]["EventCoordinate"] & (boolean | null))[]) | null;
};
MutationRegionDetailsSummary: {
overall: components["schemas"]["MutationRegionDetails"];
regions: ((components["schemas"]["RegionKind"] & components["schemas"]["MutationRegionDetails"])[])[];
};
/** @description Mutations operation errors */
MutationsError: OneOf<["InvalidMutatorId", {
/** @description Workspace not found */
WorkspaceNotFound: string;
}, "SegmentNotFound", {
/** @description Internal Server Error */
Internal: string;
}]>;
Expand All @@ -371,10 +405,20 @@ export interface components {
Internal: string;
}]>;
Nanoseconds: number;
RegionKind: OneOf<[{
WholeWorkspace: components["schemas"]["WholeWorkspaceRegionKind"];
}, {
Segment: components["schemas"]["SegmentRegionKind"];
}]>;
SegmentCoverage: {
coverage_aggregates: components["schemas"]["CoverageAggregates"];
spec_coverages: (components["schemas"]["SpecCoverage"])[];
};
SegmentRegionKind: {
id: components["schemas"]["WorkspaceSegmentId"];
timeline_filter?: components["schemas"]["UnstructuredTimelineFilter"] | null;
workspace_name: components["schemas"]["WorkspaceName"];
};
SegmentationRuleName: string;
SpecContent: {
metadata: components["schemas"]["SpecVersionMetadata"];
Expand Down Expand Up @@ -476,10 +520,21 @@ export interface components {
/** @description Internal Server Error */
Internal: string;
}]>;
/**
* @description Stringy representation of an unparsed, unstructured DSL for expressing how to filter timelines,
* likely through attribute evaluation.
*/
UnstructuredTimelineFilter: string;
WholeWorkspaceRegionKind: {
timeline_filter?: components["schemas"]["UnstructuredTimelineFilter"] | null;
workspace_name: components["schemas"]["WorkspaceName"];
workspace_version_id: components["schemas"]["WorkspaceVersionId"];
};
Workspace: {
name: string;
version_id: components["schemas"]["WorkspaceVersionId"];
};
WorkspaceName: string;
/** @description A specific segment of a workspace. */
WorkspaceSegmentId: {
rule_name: components["schemas"]["SegmentationRuleName"];
Expand Down Expand Up @@ -549,8 +604,8 @@ export interface operations {
};
};
/**
* List mutations
* @description List mutations
* List all mutations
* @description List all mutations
*/
list_mutations: {
parameters: {
Expand Down Expand Up @@ -584,6 +639,56 @@ export interface operations {
};
};
};
/**
* List all mutations for the given segment
* @description List all mutations for the given segment
*/
list_segment_mutations: {
parameters: {
query: {
/** @description Mutator ID */
mutator_id?: string | null;
/** @description Experiment name */
experiment?: string | null;
};
path: {
/** @description Workspace Version Id */
workspace_version_id: components["schemas"]["WorkspaceVersionId"];
/** @description Segmentation Rule Name */
rule_name: components["schemas"]["SegmentationRuleName"];
/** @description Segment Name */
segment_name: components["schemas"]["WorkspaceSegmentName"];
};
};
responses: {
/** @description List mutations successfully */
200: {
content: {
"application/json": (components["schemas"]["Mutation"])[];
};
};
/** @description Invalid workspace_version_id */
400: {
content: {
"application/json": components["schemas"]["MutationsError"];
};
};
/** @description Operation not authorized */
403: never;
/** @description Workspace or segment not found */
404: {
content: {
"application/json": components["schemas"]["MutationsError"];
};
};
/** @description Internal Server Error */
500: {
content: {
"application/json": components["schemas"]["MutationsError"];
};
};
};
};
/**
* List mutators
* @description List mutators
Expand Down
2 changes: 1 addition & 1 deletion vscode/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export async function activate(context: vscode.ExtensionContext) {
eventsTreeDataProvider.refresh();

mutatorsTreeDataProvider.refresh();
mutationsTreeDataProvider.refresh();
mutationsTreeDataProvider.setActiveSegmentIds(ev.activeSegmentIds);
});

workspacesTreeDataProvider.register(context);
Expand Down
Loading

0 comments on commit 017d5c3

Please sign in to comment.