Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Restart discovery after re-initializing client. #1167

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

Merged
kittaakos merged 5 commits into main from restart-board-discovery
Jul 14, 2022

Conversation

Copy link
Contributor

@kittaakos kittaakos commented Jul 11, 2022
edited
Loading

Motivation

Before #1132 the core gRPC client was not re-initialized (InitRequest) after the indexes update. Hence; the CLI could not provide up-to-date core search results to the IDE2. Now, it is working in IDE2 but after the core gRPC re-initialization, the board discovery (BoardListWatchRequest) is non-functional. This PR fixes it by sending out an event after the core client re-initialization so that the board discovery can restart in IDE2.

From here:

The Rescan gRPC function has been removed completely in favour of Init.

UpdateIndex and UpdateLibrariesIndex gRPC functions now don't implicitly reload the indexes, it has to be done explicitly with the Init function.

How to test:

  • start IDE2,
  • make sure you have at least one 3rd party URL in the Settings,
  • after the indexes update progress notification, try to attach and detach boards, the IDE2 should show the attached boards. This is not working on the main with f4a68e7.

Change description

Other information

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)

Otherwise, board discovery stops working after indexes update.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jul 11, 2022
Copy link
Contributor Author

kittaakos commented Jul 11, 2022
edited
Loading

For reviewers:

I am optimistic this PR should fix the discovery issue. At least, the nightly (f4a68e7) is broken here, the build from the PR works. Here is another way to verify. Connect at least one board to the machine before starting the IDE2. IDE2 starts, it's up and running, and shows the attached board(s). Wait for the indexes update, then detach the boards. IDE2 does not show the board changes from the nightly build. It works from this PR.

Copy link
Contributor

@AlbyIanna AlbyIanna left a comment
edited
Loading

Choose a reason for hiding this comment

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

The code looks fine with me.
LGTM 🚀

Copy link
Contributor

per1234 commented Jul 11, 2022
edited
Loading

UPDATE: fixed when using the build for e9cd290

(削除) I don't have a proper report prepared yet, but wanted to give a quick status update: Unfortunately, this does not fix the discovery issue for me on my Windows machine (it does work on my Linux machine). I will investigate further and provide full details as soon as possible. (削除ここまで)
kittaakos reacted with thumbs up emoji

Copy link
Contributor Author

Unfortunately, this does not fix the discovery issue for me on my Windows machine

I can also see a defect on my Windows machine.

I will investigate further and provide full details as soon as possible.

Thank you! Do not spend too much time with it, the discovery also bogus on this slower Windows machine.

Copy link
Contributor Author

  • IDE2 starts,
  • Index update runs, finishes,
  • I plug in a MKR1000, and I see this in the logs:
daemon INFO {"level":"info","msg":"boards watcher interrupted by client","time":"2022-07-11T18:25:38+02:00"}

Nothing else happens. IDE2 does not recognize the board.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos changed the title (削除) Restart discovery after re-initializing client. (削除ここまで) (追記) [WIP]: Restart discovery after re-initializing client. (追記ここまで) Jul 12, 2022
@kittaakos kittaakos marked this pull request as draft July 13, 2022 07:16
Akos Kitta added 3 commits July 13, 2022 09:39
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos mentioned this pull request Jul 13, 2022
4 tasks
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.

I am able to reproduce the bug this PR addresses when using the latest build from the main branch (7fed8fe).

Using the build from this PR, the discovery works extremely reliably. I was able to reproduce the issue reported at #1181 (comment), but very rarely even though I was specifically producing the conditions it occurs under.

So I would be satisfied with this fix even without the addition of the change proposed in #1181

@kittaakos kittaakos marked this pull request as ready for review July 14, 2022 06:43
@kittaakos kittaakos changed the title (削除) [WIP]: Restart discovery after re-initializing client. (削除ここまで) (追記) Restart discovery after re-initializing client. (追記ここまで) Jul 14, 2022
Copy link
Contributor Author

As discussed, I am merging this PR and will open a follow-up described in #1181. Also, I'll put #1181 on hold.

per1234 and AlbyIanna reacted with thumbs up emoji

@kittaakos kittaakos merged commit a003831 into main Jul 14, 2022
@kittaakos kittaakos deleted the restart-board-discovery branch July 14, 2022 08:39
Reviewers

@per1234 per1234 per1234 approved these changes

+1 more reviewer

@AlbyIanna AlbyIanna AlbyIanna approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Teensy 4 turned on after I started IDE - No Port menu

AltStyle によって変換されたページ (->オリジナル) /