Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE-1952 Display limit check errors from instant launch actions #549

Merged

Conversation

psarando
Copy link
Member

This PR will update the InstantLaunchButtonWrapper to check for error codes related to VICE permission or limit errors, and to display the same related dialog as displayed from the AppName in the apps listing.

Since POST /analyses does not return limitChecks info in errors, I had to refactor the instantlyLaunch service facade to parse limitChecks info from the /quicklaunches/{id}/app-info call it already makes, and to reject the analysis submission if the canRun flag is set to false.

* Updated the `InstantLaunchButtonWrapper` to check for error codes
related to VICE permission or limit errors, and to display the same
related dialog as displayed from the `AppName` in the apps listing.

* Since `POST /analyses` does not return `limitChecks` info in errors,
refactored the `instantlyLaunch` service facade to parse `limitChecks`
info from the `/quicklaunches/{id}/app-info` call it already makes,
and to reject the call if the `canRun` flag is set to `false`.

* Removed `catch` from `instantlyLaunch` promises so that errors from
those endpoints can be properly displayed in the UI
(rather than causing undefined `ql` or `app` exceptions).

* Refactored `RunErrorDialog` from `AppName` into its own component.

* Removed duplicate `usageSummary*Response` mocks from data stories.

* Removed duplicate template args from data listing stories.

* Fixed a deprecated `rows` warning in `FormMultilineTextField`.

* Added missing and updated vice i18n namespaces to pages.
@psarando psarando requested review from slr71 and sboleyn October 14, 2023 01:39
@@ -358,14 +356,29 @@ export const instantlyLaunch = ({ instantLaunch, resource, output_dir }) => {
// Contains the Promises that resolve to the data needed to perform a job submission.
const promiseList = [
savedLaunchPromise,
getAppInfo({ launchId: savedLaunchId }).catch((e) => console.log(e)),
getAppInfo({ launchId: savedLaunchId }),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why the errors from these promises were getting caught and ignored, but I removed those catches so that errors from those endpoints can be properly displayed in the UI (rather than causing undefined ql or app exceptions below).

Copy link
Member

@slr71 slr71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 👍

Comment on lines +12 to +20
const SupportLink = (props) => (
<Link
variant="body1"
component="button"
onClick={intercomShow}
{...props}
/>
);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@psarando
Copy link
Member Author

Thanks for the review! 👍

@psarando psarando merged commit c52d672 into cyverse-de:master Oct 17, 2023
2 checks passed
@psarando psarando deleted the CORE-1952-instant-launch-errors branch October 17, 2023 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants