Skip to content

Commit

Permalink
feat: add progress support, backed by the database
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Aug 27, 2024
1 parent 6f0a558 commit bf0a017
Show file tree
Hide file tree
Showing 18 changed files with 443 additions and 177 deletions.
176 changes: 59 additions & 117 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ clap = "4"
concat-idents = "1"
cpe = "0.1.3"
csaf = { version = "0.5.0", default-features = false }
csaf-walker = { version = "0.8.0", default-features = false }
csaf-walker = { version = "0.9.0", default-features = false }
cve = "0.3.1"
cyclonedx-bom = "0.6.1"
cyclonedx-bom = "0.7.0"
env_logger = "0.11.0"
futures = "0.3.30"
futures-util = "0.3"
Expand Down Expand Up @@ -94,7 +94,7 @@ reqwest = "0.12"
ring = "0.17.8"
rstest = "0.22"
rust-s3 = "0.34"
sbom-walker = { version = "0.8.6", default-features = false, features = ["crypto-openssl", "cyclonedx-bom", "spdx-rs"] }
sbom-walker = { version = "0.9.0", default-features = false, features = ["crypto-openssl", "cyclonedx-bom", "spdx-rs"] }
schemars = "0.8"
sea-orm = "~1.0" # See https://www.sea-ql.org/blog/2024-08-04-sea-orm-1.0/#release-planning
sea-orm-migration = "~1.0"
Expand Down Expand Up @@ -130,8 +130,8 @@ utoipa-redoc = { version = "4.0.0", features = ["actix-web"] }
utoipa-swagger-ui = "7.1.0"
uuid = "1.7.0"
walkdir = "2.5"
walker-common = "0.8.0"
walker-extras = "0.8.0"
walker-common = "0.9.0"
walker-extras = "0.9.0"

trustify-auth = { path = "common/auth", features = ["actix", "swagger"] }
trustify-common = { path = "common" }
Expand Down
3 changes: 3 additions & 0 deletions entity/src/importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub struct Model {
pub last_run: Option<time::OffsetDateTime>,
pub last_error: Option<String>,

pub progress_current: Option<i32>,
pub progress_total: Option<i32>,

/// an importer specific continuation token
pub continuation: Option<serde_json::Value>,

Expand Down
2 changes: 2 additions & 0 deletions migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ mod m0000545_create_purl_license_assertion;
mod m0000550_create_cpe_license_assertion;
mod m0000560_alter_vulnerability_cwe_column;
mod m0000565_alter_advisory_vulnerability_cwe_column;
mod m0000570_add_import_progress;

pub struct Migrator;

Expand Down Expand Up @@ -144,6 +145,7 @@ impl MigratorTrait for Migrator {
Box::new(m0000550_create_cpe_license_assertion::Migration),
Box::new(m0000560_alter_vulnerability_cwe_column::Migration),
Box::new(m0000565_alter_advisory_vulnerability_cwe_column::Migration),
Box::new(m0000570_add_import_progress::Migration),
]
}
}
Expand Down
Loading

0 comments on commit bf0a017

Please sign in to comment.