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

[FEATURE] NuttX Dashboard for Build Farm #14558

Open
1 task done
lupyuen opened this issue Oct 30, 2024 · 25 comments
Open
1 task done

[FEATURE] NuttX Dashboard for Build Farm #14558

lupyuen opened this issue Oct 30, 2024 · 25 comments
Assignees
Labels
Type: Enhancement New feature or request

Comments

@lupyuen
Copy link
Member

lupyuen commented Oct 30, 2024

Is your feature request related to a problem? Please describe.

We have the First Version of the NuttX Dashboard for our Build Farm!

Try it here: https://nuttx-dashboard.org

This Dashboard consolidates the Build Logs from all Linux Build Servers (Alin, mine, GitHub CI). So it's convenient to spot any Errors and Warnings in our builds.

The Highlights Section will turn red if there are errors. (Severity 0)

We can filter the builds by Arch / SubArch / Group / Board / Config:

If you're keen to add your own Ubuntu PC or Mac to our Build Farm, please follow the steps below and tell me your GitHub Gist ID:

Describe the solution you'd like

We created the Dashboard with open-source Grafana and Prometheus. Source Code is here

Describe alternatives you've considered

No response

Verification

  • I have verified before submitting the report.
@lupyuen lupyuen added the Type: Enhancement New feature or request label Oct 30, 2024
@lupyuen lupyuen self-assigned this Oct 30, 2024
@lupyuen lupyuen changed the title [FEATURE] Build Dashboard for NuttX Build Farm [FEATURE] NuttX Dashboard for Build Farm Oct 30, 2024
@lupyuen
Copy link
Member Author

lupyuen commented Nov 1, 2024

GitHub Actions CI Logs are now inside NuttX Dashboard

Our NuttX Dashboard now ingests the CI Build Logs from GitHub Actions! (Like an Amoeba)

  • That's why our Dashboard looks Red, because of errors in the CI Build (pic below)
  • When we click a Red Box, it jumps to the GitHub Actions Log (showing the error)

How It Happens:

What about ingesting macOS / msys2 / msvc Logs? Right now they show tooooo many ... warningses. We should probably fix the warnings before ingesting the logs into NuttX Dashboard.

Screenshot 2024-11-01 at 11 43 49 AM

@lupyuen
Copy link
Member Author

lupyuen commented Nov 2, 2024

NuttX Build History

If a Build Fails, how will we know what Broke the Build?

Browse to nuttx-dashboard.org, click "See the NuttX Build History".

Select the Board and Config. We'll see the History of Builds for the Board / Config.

With the Git Hash of NuttX Repo and NuttX Apps Repo, hopefully we can track down to the exact commit that failed.

🙏🙏🙏 Please join your Ubuntu PC to our Build Farm, tell me your Gist ID. So we can capture more builds, and track down quickly to the exact commit that failed! 🙏🙏🙏

Screenshot 2024-11-03 at 9 55 58 AM

@cederom
Copy link
Contributor

cederom commented Nov 3, 2024

Very cool congratz @lupyuen :-) And its already working :-) I need to buy a disk to a laptop that I can use to join The NuttX Farmers :D

@lupyuen
Copy link
Member Author

lupyuen commented Nov 3, 2024

Thanks @cederom! Yep hope to have your laptop in our NuttX Build Farm real soon :-)

@cederom
Copy link
Contributor

cederom commented Nov 3, 2024

What minimal disk is recommended 500GB or 1TB?

@lupyuen
Copy link
Member Author

lupyuen commented Nov 3, 2024

@cederom 500 GB should be more than sufficient. I'm using 51 GB right now :-)
https://gist.github.com/nuttxpr/34b8fa96537acdf7400b87d0e6794cf1#file-ci-arm-14-log-L905

@lvanasse
Copy link
Contributor

lvanasse commented Nov 5, 2024

@lupyuen by any chance, do you have a Dockerfile for the whole setup (I know, I've been talking about docker for a while (it'll be after the doc migration;)))

Reason why I'm asking, is that I have an Unraid server at home, which I host my media. And I was thinking maybe it would be possible to simply docker another docker on it.

@lupyuen
Copy link
Member Author

lupyuen commented Nov 5, 2024

@lvanasse Yep the Dockerfile is here: https://github.com/apache/nuttx/blob/master/tools/ci/docker/linux/Dockerfile

If you need the Docker Image, I can export it for you :-)

@simbit18
Copy link
Contributor

simbit18 commented Nov 6, 2024

Hi @lupyuen this PR #14654 removed the warnings now you can enter msys2 logs in NuttX Dashboard.

@lupyuen
Copy link
Member Author

lupyuen commented Nov 6, 2024

@simbit18 Awesome! Lemme work on it...

@lupyuen
Copy link
Member Author

lupyuen commented Nov 6, 2024

Hi @simbit18: msys2 Builds are now in nuttx-dashboard.org :-)

Screenshot 2024-11-07 at 7 41 02 AM

@lupyuen lupyuen closed this as completed Nov 7, 2024
@simbit18
Copy link
Contributor

simbit18 commented Nov 7, 2024

Thank you @lupyuen

@lvanasse
Copy link
Contributor

lvanasse commented Nov 9, 2024

@lupyuen I'm setting up a server to run the build and to potentially add it to the build farm :). I was wondering if you just put the run-ci.sh inside a cronjob to be able to periodically run the build?

Also, I think you'll need by Gist ID? It says in your article, that it's better to have another account for security? I'm not sure if I understand why you might need to do that.

And also, is there a target group that would be best for me to set the CI to run on?

Cheers :)

@lupyuen
Copy link
Member Author

lupyuen commented Nov 9, 2024

Thank you so much @lvanasse!

  • run-ci.sh inside a cronjob: Might work? Assuming that it can handle the sudo.
  • Originally I assumed the Build PC would be compiling NuttX 24 x 7 (because New PRs will be merged all the time), but it's perfectly OK to run it sometimes
  • Creating a GitHub Account: The NuttX Dashboard will be crawling all your Gists. If we're comfortable letting a bot crawl through your Gists, then it's OK :-)
  • Also the gh command will be authenticated using your GitHub Account, which means it has all repo access rights, and it might be too powerful. So it depends if you're comfortable with that :-)

@lupyuen
Copy link
Member Author

lupyuen commented Nov 9, 2024

@lvanasse As for Target Group: How about these, we can cut down later thanks :-)

    risc-v-01 risc-v-02 risc-v-03 \
    risc-v-04 risc-v-05 risc-v-06 \
    xtensa-01 xtensa-02 \
    arm64-01 x86_64-01 \
    sim-01 sim-02 sim-03 \
    other

I'm running these right now: https://github.com/lupyuen/nuttx-release/blob/main/run-ci.sh
Alin is running these: https://gist.github.com/jerpelea

@lvanasse
Copy link
Contributor

lvanasse commented Nov 9, 2024

Sounds good! Then if you are not running the script in a cronjob how are you automating the process?

@lupyuen
Copy link
Member Author

lupyuen commented Nov 9, 2024

@lvanasse It runs on my Ubuntu Desktop all day all night, I'm not using the PC for anything else :-)

@lvanasse
Copy link
Contributor

lvanasse commented Nov 9, 2024

@lupyuen, sorry just so I understand correctly, so you do launch the script manually each time it finished?

@lupyuen
Copy link
Member Author

lupyuen commented Nov 9, 2024

@lvanasse Oops sorry, please use this script, it will run all jobs forever:

https://lupyuen.github.io/articles/ci2#build-nuttx-for-all-target-groups

## Download the scripts
git clone https://github.com/lupyuen/nuttx-release
cd nuttx-release

## Login to GitHub in Headless Mode
sudo apt install gh
sudo gh auth login

## (1) What Account: "GitHub.com"
## (2) Preferred Protocol: "HTTPS"
## (3) Authenticate GitHub CLI: "Login with a web browser"
## (4) Copy the One-Time Code, press Enter
## (5) Press "q" to quit the Text Browser that appears
## (6) Switch to Firefox Browser and load https://github.com/login/device
## (7) Enter the One-Time Code. GitHub Login will proceed.
## See https://stackoverflow.com/questions/78890002/how-to-do-gh-auth-login-when-run-in-headless-mode

## Run the Build Job forever: arm-01 ... arm-14
sudo ./run-ci.sh

@lvanasse
Copy link
Contributor

lvanasse commented Nov 9, 2024

Ahh ok sorry, I didn't read the whole script properly, and didn't see the infinite loop.

Thank you for the clarification, I'm setting up the server at the moment and I'll let you know my Gist ID after everything is running smoothly :).

@lupyuen lupyuen reopened this Nov 9, 2024
@lvanasse
Copy link
Contributor

lvanasse commented Nov 9, 2024

Things seems to be running smoothly :): https://gist.github.com/lvanasse/74976165ac7605a7376a6c026ff020ee

If you want to add my ID to the Nuttx Build Farm, I would be honoured :)!

After it ran a first time through all the target groups, I might just stop it and set it up so I can forget about it and let it run on my server.

@lupyuen
Copy link
Member Author

lupyuen commented Nov 9, 2024

Super Awesome @lvanasse! Your PC is now in our NuttX Build Farm, thank you so much! :-)

https://nuttx-dashboard.org/d/fe2q876wubc3kc/nuttx-build-history?from=now-2d&to=now&timezone=browser&var-arch=$__all&var-subarch=$__all&var-board=$__all&var-config=$__all&var-group=$__all&var-Filters=user%7C%3D%7Clvanasse

Screenshot 2024-11-09 at 11 36 10 AM

Here's how I added your PC to our Build Farm. macOS will join us real soon :-)
lupyuen/ingest-nuttx-builds@4cbaf14

@lvanasse
Copy link
Contributor

lvanasse commented Nov 9, 2024

Awesome! Thank you for everything @lupyuen!

@lvanasse
Copy link
Contributor

lvanasse commented Nov 9, 2024

@lupyuen you might have seen some funniness in my gists. I had a couple of issue with my unraid VM, but things should be smooth from now on :).

@lupyuen
Copy link
Member Author

lupyuen commented Nov 9, 2024

@lvanasse haha cool no worries :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants