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

Improve UX for async edge cases #218

Closed
radeksimko opened this issue Jul 8, 2020 · 2 comments · Fixed by #229
Closed

Improve UX for async edge cases #218

radeksimko opened this issue Jul 8, 2020 · 2 comments · Fixed by #229
Milestone

Comments

@radeksimko
Copy link
Member

radeksimko commented Jul 8, 2020

Once #195 & #219 is resolved it's likely that a number of edge cases will emerge.

Error messages may not be as helpful as we'd like them to be and the UX overall may need some enhancements, but it's not clear yet how to best address all these edge cases, so I'm creating this issue to track it and brain dump some known unknowns.

When we add a new root module, we always discover module manifest and plugin lock file locations, just so they can be tracked by the watcher.

There is however a number of operations which run asynchronously after adding the module roughly in the following order

  1. parsing module manifest
  2. discovering terraform executor
  3. obtaining terraform version
  4. finding compatible language parser (there's just one for now, but it's gated on 0.12+)
  5. obtaining schema (to be gated on version too as per Support provider aliases and 0.13 identities #164)

Any of the above can either be in progress of loading - i.e. not done yet when the user is e.g.

  • requesting completion
  • requesting formatting

or any of these can fail, which makes any functionality depending on it to error out, e.g.

  • unreadable module manifest
  • no terraform found in $PATH
  • no terraform version found (e.g. because of tfenv unparseable output, or binary being un-executable)
  • no compatible parser found (e.g. because of too old TF version)
  • no compatible schema storage found (e.g. because of TF 0.11 and older)
  • failed to obtain schema (e.g. because of missing backend auth, invalid config or other reasons)

The question is how should these edge cases be communicated, if at all to the user and when.

There was an attempt to surface some of this in #187 but surfacing TF errors will generally require some better handling. Also we should aim to keep the messaging relevant in time or per event (see #212)

@radeksimko
Copy link
Member Author

As discussed with @paultyng we can just silently log most of these errors for now, as opposed to showing any notifications.

The easiest way to do this would probably be just logging a summary of errors after finishing the load of each module here:

return errs.ErrorOrNil()

@ghost
Copy link

ghost commented Aug 13, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Aug 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant