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

Devtool fixes and optim #37

Merged
merged 17 commits into from
Jan 2, 2024

Conversation

deribaucourt
Copy link
Member

No description provided.

With kas-container or custom docker mount-points, the
devtool-open-workspace command would fail to try to open the container's
workspace path on the host system.

Add the required logic to resolve the path to the host system. It's a
bit tricky if the container's mount points are different between the
sources and the build workspaces. We only support trivial cases for now
which work with kas-container.
When using the devtool-update-recipe command in a container, the
paths have to be resolved between host and container.
Settings change will provoke a rescan command. If it hasn't been called
since the last sanity check, it doesn't need to be checked again.

This noticeably speeds up the on save parsing and devtool modify
command.
Some tests only bother with providing recipes. Consider a scanResult
to be valid if it contains either layers or recipes.
If bitbake sanity tests or parsing is stuck for some reason
(buggy commandWrapper, filesystem issues, CPU load...), the extension
freatures would get frozen.
Define the general timeout for running a bitbake parsing command as a
constant. This will allow us to change the timeout in a single place.

Note that this is not for regular bitbake builds which can take hours.
Sending bitbake when a terminal is closed may not be enough to kill it
as it may take minutes before started tasks finish. Sending a second
and third signal after a timeout ensures bitbake is stopped before a
minute.

Note that this does not work for docker containers yet:
https://stackoverflow.com/a/50034061/20690788
New eslint extension updated it's settings.
@deribaucourt deribaucourt marked this pull request as ready for review December 27, 2023 13:37
Bitbake requires multiple SIGINT signals to fully stop when stuck.
Additionally, docker container processes are not properly killed by
calling child.kill() on the shell process. We instead find the
process PID and kill it directly.
The user will want to see the results of devtool modify/reset in the
devtool workspaces view as soon as the command completes.
Add a brief rescan of the devtool workspaces to the command handlers.
Fixes the following bugs:
 - Starting multiple bitbake processes at the same time would not open new terminals
 - Stopping a bitbake process that has not started yet would let it execute
If multiple commands where started at the same time, and we closed a
terminal that was still waiting for the bitbake lock, it could have
been reused.
Copy link
Contributor

@WilsonZiweiWang WilsonZiweiWang left a comment

Choose a reason for hiding this comment

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

LGTM

@deribaucourt deribaucourt merged commit c323d1d into yoctoproject:staging-next Jan 2, 2024
1 check passed
@deribaucourt deribaucourt deleted the devtool-next branch January 2, 2024 16:18
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.

3 participants