README
¶
Kron
Kron is the partial rewrite of the suite scheduler cron scheduler before we fully re-imagine the service. This service will offer just the core services of SuiteScheduler and not implement pipelines such as android build, firmware builds, nor multi-dut builds.
More information can be found at: go/suitescheduler-v15
Current State: WIP
The current project is capable of fetching the configuration files, ingesting them into memory, and building CTP requests.
As the project stands, it can fetch builds from the release pipeline but it does not yet have the ability to store the information long term. Once the architecture designed in go/sv15-storage-addendum is built, we will then be able to store the build images.
To interact with the current project use the CLI explained in the below section.
Installation
CIPD
If you have CIPD set up you can fetch the package from there using:
cipd install chromiumos/infra/suite_scheduler/linux-amd64 latest
If not you will need to set up CIPD:
# Create a directory for the CIPD root
mkdir ~/cipd
cd ~/cipd/
# Initialize the CIPD root for package installation
cipd init -force
# Add the export command to your .bashrc
echo "export PATH=\$PATH:$(pwd)" >> ~/.bashrc && source ~/.bashrc
# Install the package
cipd install chromiumos/infra/suite_scheduler/linux-amd64 latest
Once installed use the command by calling:
kron help
Local
The provided makefile has build instructions for the program. To build the files locally just run:
make build
This will install the package at the project root and you can run the program using:
./kron -help
CLI
SuiteScheduler v1.5 is made as a CLI application. To run the program use one of the below commands to access the project.
Commands
Configs
kron configs <flags>
The configs
command is used to search through the SuiteScheduler configs. The
command will take in the user input and will output the configs which match the
criteria. To see all flags, and information about their usage, enter:
kron help configs
Filters
When ingesting and searching for configs the application defines two types of filters, top and bottom level filters.
Top-level
filters define the set of filters that largely define the config
trigger mechanism, e.g. NEW_BUILD
or DAILY
. These filters do not care about
the contents of the configs but rather are reducing the domain of configs that
will be sent to the bottom-level
filters.
Bottom-level
filters work on the inner contents of the configs, E.g. name
or
board
. The bottom level filters will receive its working set from the
top-level filters. This reduces the amount of expensive filtering that is
performed making the CLI run faster when working through large amounts of
configurations.
Testing
Currently the main function has some integration tests that can be validated by reading the output. To confirm the correctness of the CTP Requests. The output given was tossed into a LED test (with the build image information copied over from a valid CTP run) and verified.
Example run:
https://chromeos-swarming.appspot.com/task?id=65bf847779131c10
Original Run:
Documentation
¶
There is no documentation for this package.
Directories
¶
Path | Synopsis |
---|---|
Package buildbucket implements the interface required to schedule builder requests on the LUCI BuildBucket architecture.
|
Package buildbucket implements the interface required to schedule builder requests on the LUCI BuildBucket architecture. |
Package builds fetches and handles the build image information from the release team.
|
Package builds fetches and handles the build image information from the release team. |
Package cloudsql implements the interface to interact with the Cloud SQL API.
|
Package cloudsql implements the interface to interact with the Cloud SQL API. |
Package common has utilities that are not context specific and can be used by all packages.
|
Package common has utilities that are not context specific and can be used by all packages. |
Package configparser implements logic to handle SuiteScheduler configuration files.
|
Package configparser implements logic to handle SuiteScheduler configuration files. |
Package ctprequest will build and return a CTP request to be handled by the CTP BuildBucket builder.
|
Package ctprequest will build and return a CTP request to be handled by the CTP BuildBucket builder. |
Package metrics holds all the schemas and utilities to handle metrics for Kron.
|
Package metrics holds all the schemas and utilities to handle metrics for Kron. |
Package pubsub wraps all the pubsub API interactions that will be required by SuiteScheduler.
|
Package pubsub wraps all the pubsub API interactions that will be required by SuiteScheduler. |
Package run holds all of the internal logic for the execution steps of a SuiteScheduler run.
|
Package run holds all of the internal logic for the execution steps of a SuiteScheduler run. |
Package secretmanager creates an interface for working with the GCP SecretManager API.
|
Package secretmanager creates an interface for working with the GCP SecretManager API. |
Package subcommands includes subcommand logic that will be used for the CLI front end.
|
Package subcommands includes subcommand logic that will be used for the CLI front end. |
Package totmanager encapsulates all the required functions for ensuring tot mapping rules are followed.
|
Package totmanager encapsulates all the required functions for ensuring tot mapping rules are followed. |