Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions database/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,21 @@ bors_sha pr parent_sha complete requested include exclude runs commi

### error

Records a compilation or runtime error for an artifact and a benchmark.
Records an error within the application namely a;
- compilation
- runtime
- error contextual to a benchmark job

```
sqlite> select * from error limit 1;
aid benchmark error
---------- --- -----
1 syn-1.0.89 Failed to compile...
```
Columns:

* **id** (`BIGINT` / `SERIAL`): Primary key identifier for the job row;
auto increments with each new job.
* **aid** (`INTERGER`): References the artifact id column.
* **context** (`TEXT NOT NULL`): A little message to be able to understand a
bit more about why or where the error occured.
* **message** (`TEXT NOT NULL`): The error message.
* **job_id** (`INTEGER`): A nullable job_id which, if it exists it will inform
us as to which job this error is part of.

## New benchmarking design
We are currently implementing a new design for dispatching benchmarks to collector(s) and storing
Expand Down
6 changes: 3 additions & 3 deletions database/src/pool/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ static MIGRATIONS: &[Migration] = &[
),
Migration::new(
r#"
CREATE TABLE IF NOT EXISTS error_new (
CREATE TABLE error_new (
id INTEGER PRIMARY KEY,
aid INTEGER NOT NULL,
aid INTEGER NOT NULL REFERENCES artifact(id) ON DELETE CASCADE ON UPDATE CASCADE,
message TEXT NOT NULL,
context TEXT NOT NULL,
job_id INTEGER
Expand All @@ -428,7 +428,7 @@ static MIGRATIONS: &[Migration] = &[
DROP TABLE error;
ALTER TABLE error_new RENAME TO error;

CREATE INDEX IF NOT EXISTS error_artifact_idx ON error(aid);
CREATE INDEX error_artifact_idx ON error(aid);
"#,
),
];
Expand Down
Loading