SQL queries for dashboard data#249
Conversation
Crola1702
left a comment
There was a problem hiding this comment.
Can you add example runs of each of the queries?
There was a problem hiding this comment.
I think these changes are due to an sqlite3 version difference, right? Which version are you testing with?
There was a problem hiding this comment.
Yes, Ubuntu's 24.04 sqlite3 version is 3.45.1 in which already has a warning of not using double quotes for table columns, jajaj for some reasons I tried to run this command with version 3.53.2 and in this version is fully prohibited using double quotes for this type of calls. I don't know if we have the same problem with other sql scripts, but I found that one
Crola1702
left a comment
There was a problem hiding this comment.
Okay, some comments to start:
- The queries are really big, and they can be pretty complex and also really hard to maintain.
- We want to prioritize database size (we don't want to grow the database a lot), and maintainability of the queries.
My suggestion is to reuse Common table expressions into Views, so we can have stored queries there
Let's create a active_failures view, which identifies persistently broken tests across the buildfarms.
Let's see if there are other suggestions to extra views we can leverage.
Also, please fill the PR description with the intended usage and purpose of each of the queries, as well as real examples of their usage (in the PR comments is okay)
| WHEN tf.job_name LIKE '%-jammy-%' OR tf.job_name LIKE '%_jammy_%' THEN 'jammy' | ||
| WHEN tf.job_name LIKE '%-noble-%' OR tf.job_name LIKE '%_noble_%' THEN 'noble' | ||
| WHEN tf.job_name LIKE '%-focal-%' OR tf.job_name LIKE '%_focal_%' THEN 'focal' | ||
| WHEN tf.job_name LIKE '%-homebrew-%' OR tf.job_name LIKE '%_homebrew_%' THEN 'homebrew' | ||
| WHEN tf.job_name LIKE '%linux%' THEN 'linux' | ||
| WHEN tf.job_name LIKE '%osx%' THEN 'osx' | ||
| WHEN tf.job_name LIKE '%win%' OR tf.job_name LIKE '%clwin%' OR tf.job_name LIKE '%clowin%' THEN 'windows' | ||
| ELSE 'unknown' | ||
| END AS os, | ||
| CASE | ||
| WHEN tf.job_name LIKE '%-aarch64%' OR tf.job_name LIKE '%_aarch64%' THEN 'aarch64' | ||
| WHEN tf.job_name LIKE '%-arm64%' OR tf.job_name LIKE '%_arm64%' THEN 'arm64' | ||
| WHEN tf.job_name LIKE '%-amd64%' OR tf.job_name LIKE '%_amd64%' THEN 'amd64' | ||
| ELSE 'unknown' |
There was a problem hiding this comment.
Oookay, I think this might be a bottleneck of our tooling right now.
I suggest adding (and updating) these rules to the server_status table. Which already contains some of this information:
nightly_linux_debug | Active | x86_64_Ubuntu | x86_64_Ubuntu | ROS | https://ci.ros2.org
nightly_linux_release | Active | x86_64_Ubuntu | x86_64_Ubuntu | ROS | https://ci.ros2.org
nightly_linux_repeated | Active | x86_64_Ubuntu | x86_64_Ubuntu | ROS | https://ci.ros2.org
packaging_linux | Active | x86_64_Ubuntu | x86_64_Ubuntu | ROS | https://ci.ros2.org
nightly_linux-aarch64_debug | Active | aarch64_Ubuntu | aarch64_Ubuntu | ROS | https://ci.ros2.org
nightly_linux-aarch64_release | Active | aarch64_Ubuntu | aarch64_Ubuntu | ROS | https://ci.ros2.org
nightly_linux-aarch64_repeated | Active | aarch64_Ubuntu | aarch64_Ubuntu | ROS | https://ci.ros2.org
packaging_linux-aarch64 | Active | aarch64_Ubuntu | aarch64_Ubuntu | ROS | https://ci.ros2.org
nightly_linux-rhel_debug | Active | linux-rhel | linux-rhel | ROS | https://ci.ros2.org
nightly_linux-rhel_release | Active | linux-rhel | linux-rhel | ROS | https://ci.ros2.org
gz_cmake-ci-main-homebrew-arm64 | Active | rotary | Brew Arm64 | GAZEBO | https://build.osrfoundation.org
gz_cmake-ci-main-noble-amd64 | Active | rotary | Linux Noble | GAZEBO | https://build.osrfoundation.org
gz_cmake-ci-main-resolute-amd64 | Active | rotary | Linux | GAZEBO | https://build.osrfoundation.org
gz_cmake-main-cnlwin | Active | rotary | Windows | GAZEBO | https://build.osrfoundation.org
gz_common-ci-main-homebrew-amd64 | Active | rotary | Brew Amd64 | GAZEBO | https://build.osrfoundation.org
gz_common-ci-main-homebrew-arm64 | Active | rotary | Brew Arm64 | GAZEBO | https://build.osrfoundation.org
This implies a change to the database schema and a updates to databaseFetcher.p. Please do that in a different PR.
There was a problem hiding this comment.
The query is pretty big. Not a bad comment, but it might be less understandable. If you can add some extra comments of what every part is doing, I think it would increase the maintainability
There was a problem hiding this comment.
Ready, added comments to queries
Dashboard SQL queries: purpose, usage and examplesSummaryThis PR adds SQL queries used by the dashboard generator and documents intended usage and real examples for each query. All examples use the project's wrapper script located at active_test_regressions
cd database/scripts
./sql_run.sh active_test_regressions.sql
flaky_tests
cd database/scripts
./sql_run.sh flaky_tests.sql
single_test_history
cd database/scripts
./sql_run.sh single_test_history.sql "topic_monitor.topic_monitor.test.test_mypy.test_mypy"
known_issues_summary
cd database/scripts
./sql_run.sh known_issues_summary.sql
Operational notes
|
Ready, added views. Please check if that was what you meant. The check of the OS is still pending, I'm checking that |
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
1c97a9e to
616610f
Compare
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
|
Made the respective migration, but found an "error" This are the available platforms
And as we can see there are 15 in unknown, these are
There are no rule for debbuilder, they are homebrew? or should I create a new category? |
Debbuilders should be ubuntu (may be resolute or noble, that's hard to handle actually, so we can keep them as |
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Signed-off-by: miguelgonrod <miguelgonrod2004@gmail.com>
Part of https://github.com/osrf/buildfarm-tools-private/issues/90