Skip to content

Commit

Permalink
Handle multi-user deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
droctothorpe committed May 16, 2024
1 parent a4c69e9 commit 8675b4f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
14 changes: 13 additions & 1 deletion frontend/src/pages/RecurringRunList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,19 @@ class RecurringRunList extends React.PureComponent<RecurringRunListProps, Recurr
let experimentsResponse: V2beta1ListExperimentsResponse;
let experimentsGetError: string;
try {
experimentsResponse = await Apis.experimentServiceApiV2.listExperiments();
if (!this.props.namespaceMask) {
// Single-user mode.
experimentsResponse = await Apis.experimentServiceApiV2.listExperiments();
} else {
// Multi-user mode.
experimentsResponse = await Apis.experimentServiceApiV2.listExperiments(
undefined,
undefined,
undefined,
undefined,
this.props.namespaceMask,
);
}
} catch (error) {
experimentsGetError = 'Failed to get associated experiment: ' + (await errorToMessage(error));
}
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/pages/RunList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,19 @@ class RunList extends React.PureComponent<RunListProps, RunListState> {
let experimentsResponse: V2beta1ListExperimentsResponse;
let experimentsGetError: string;
try {
experimentsResponse = await Apis.experimentServiceApiV2.listExperiments();
if (!this.props.namespaceMask) {
// Single-user mode.
experimentsResponse = await Apis.experimentServiceApiV2.listExperiments();
} else {
// Multi-user mode.
experimentsResponse = await Apis.experimentServiceApiV2.listExperiments(
undefined,
undefined,
undefined,
undefined,
this.props.namespaceMask,
);
}
} catch (error) {
experimentsGetError = 'Failed to get associated experiment: ' + (await errorToMessage(error));
}
Expand Down

0 comments on commit 8675b4f

Please sign in to comment.