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

#1036 Relaxed the error handling of the core client init #1045

Merged
merged 1 commit into from
Jun 13, 2022
Merged

Conversation

kittaakos
Copy link
Contributor

Motivation

PR To improve the resilience of the IDE2 startup. IDE2 should be able to start although there is a malformed custom board options problem with one of the installed cores.

Change description

This PR relaxes the handling of the received error status messages during the gRPC core client init:

  • the proposed change does not aggressively cancels the gRPC duplex when the first error status is received,
  • improves the logging

Other information

Closes #1036

How to verify:

  • IDE2 must be able to start and function when the directories#data location is empty or does not exists. (The directories#data is on ~/Library/Arduino15/). (Please rename this folder to /Arduino16 or similar. I deleted it for local checks.)
  • If the IDE2 starts and boards, cores, and libs can be searched, then the PR preserved the async core/lib index update at startup. This is good for performance.
  • Next, follow the steps from the original issue.
  • If the boards, cores, and libs search work but the following error is in the logs, the issues should be fixed:
root ERROR Detected an error response during the gRPC core client initialization: code: 9, message: Error loading hardware platform: loading platform release esp8266:[email protected]: loading boards: skipping loading of boards esp8266:esp8266:espduino: malformed custom board options

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jun 11, 2022
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

This fixes both #1036 and #1036 (comment) for me.

Thanks Akos!

For example, `malformed custom board options` was incorrectly detected
as loading JSON index file error.

Closes #1036

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos merged commit 7c2843f into main Jun 13, 2022
@kittaakos kittaakos deleted the #1036 branch June 13, 2022 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No boards available
3 participants