Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add progress support, backed by the database #712

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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