This onboarding is written in the form of Tasks that you you can complete to get acquainted with the KernelCI Dashboard project.
The KernCI Dashboard is composed by two main parts
-
The KernelCI Dashboard API This API is responsible for querying the KernelCI database and returning the data to the KernelCI Dashboard frontend. Here are made calculations and data processing to return the data in a way that the frontend can understand. This API is written in Python and uses the Django Rest Framework.
-
The KernelCI Dashboard Frontend This is the user interface that will be used to interact with the KernelCI Dashboard API. Here the user can see the data returned by the API in a more user-friendly way and request diferents forms of visualization. This frontend is written in TypeScript and uses the React library.
Note: The Dashboard is live in the following link: KernelCI Dashboard
Note: In case you don't have access to the backend, feel free to use the staging api to run the Frontend Code and send PRs. https://staging.dashboard.kernelci.org:9000 You can also ask for access in the #webdashboard channel in the KernelCI Slack.
Remember: Always try to look to the production dashboard between tasks to see if you can assimilate the code to the project
- Check for the Proxy access in your e-mail, follow the instructions there to run proxy.
- Check for database access in your e-mail, follow the instructions, try to connect to the database via CLI and see if it is working.
Definition of Done: You have access to the KernelCI Dashboard backend and database.
- Clone the KernelCI Dashboard repository from the following link: https://github.com/kernelci/dashboard
- Read the main README.md file to understand the project structure and how to run the project. Don't forget to communicate if there is something that you don't understand and feel free to send a PR with improvements.
- Go to the
backend
directory, see the README.md from the backend and try running the project locally.
You can use this script to run the backend with environment variables:
export DEBUG_SQL_QUERY=False # SQL Queries are very verbose, so it's better to keep this variable as False unless needed
export DEBUG=True
#\"NAME\": \"${DB_DEFAULT_NAME:=playground_kcidb}\",
export DB_DEFAULT="{
\"ENGINE\": \"${DB_DEFAULT_ENGINE:=django.db.backends.postgresql}\",
\"NAME\": \"kcidb\",
\"USER\": \"${DB_DEFAULT_USER:=<your-email-here>}\",
\"PASSWORD\": \"<your-password-here-don't-forget-to-scape-special-characters>\",
\"HOST\": \"${DB_DEFAULT_HOST:=127.0.0.1}\",
\"PORT\": \"${DB_DEFAULT_PORT:=5432}\",
\"CONN_MAX_AGE\": ${DB_DEFAULT_CONN_MAX_AGE:=null},
\"OPTIONS\": {
\"connect_timeout\": ${DB_DEFAULT_TIMEOUT:=2}
}
}"
poetry run python3 manage.py runserver
Note: It is possible to have authentication issues when escaping special characters. In some cases, it is necessary to add more than one backslash, while in others, no addition is needed. To assist with this, when
DEBUG
is set toTrue
, the default database info will be printed in the terminal, allowing you to determine if the characters got escaped as intended.
Definition of Done: You have the KernelCI Dashboard backend running locally.
- Install httpie
- Check the folder
backend/requests
and see that there are multiple bash scripts file, those are httpie requests, try to run some of those. (If one of those requests is not working, it is a good opportunity to created a ticket or fix in a PR). - Try to see in the KernelCI Dashboard to see if you can view where those calls are being made.
- Try to see how the endpoints you can see where the URLs lead to in the
backend/kernelCI_app/urls.py
file.
Definition of Done: You have run some requests to the KernelCI Dashboard API and try to have a high level understanding of at least one endpoint from the dashboard to the database.
- Install a Database management software like DBeaver or pgAdmin
- Connect to the KernelCI Database and try to see the tables and the data that is stored there.
- Read this docs to understand the database: Database Knowledge
- Try to make some SQL queries to see what you can do, feel free to look at the Backend code.
Definition of Done: Run a SQL query that gets all the tests from a specific Tree. (Feel free to choose any), you can post the query Result in the Github Issue.
- Go to the
dashboard
directory, see the README.md from the frontend and try running the project locally. - Look at the folder
api
and see how the requests are made, copy and search for where those requests are being used and see if you can relate with the production dashboard. - Try to mess with the code, change some colors, add some logs, try to understand the code structure, if there is a library that you don't know, read the documentation on that.
Definition of Done: You have the KernelCI Dashboard frontend running locally.
- Go to https://github.com/kernelci/dashboard/issues and search for issues with the label
good first issue
. - Pick any of those and assign to yourself.
- Put in the Current Sprint in the Github project if it is not there already.
- Submit a PR (Don't forget to use conventional commits)
- Address the feedback that you receive
- Get the PR merged
Definition of Done: Get a Task done and merged in the KernelCI Dashboard project.