Skip to content

Commit

Permalink
TC-2174 OSV Python ecosystem management (review fixes)
Browse files Browse the repository at this point in the history
Signed-off-by: mrizzi <[email protected]>
  • Loading branch information
mrizzi committed Jan 29, 2025
1 parent ec29b52 commit c350d71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
14 changes: 7 additions & 7 deletions migration/src/m0000850_python_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ impl MigrationTrait for Migration {
async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
let db = manager.get_connection();

db.execute_unprepared(
&Query::update()
.table(VersionScheme::Table)
.value(VersionScheme::Id, "python")
.and_where(Expr::col(VersionScheme::Id).eq("pypi"))
.to_owned()
.to_string(PostgresQueryBuilder),
db.execute(
db.get_database_backend().build(
Query::update()
.table(VersionScheme::Table)
.value(VersionScheme::Id, "python")
.and_where(Expr::col(VersionScheme::Id).eq("pypi")),
),
)
.await?;

Expand Down
12 changes: 1 addition & 11 deletions modules/ingestor/src/service/advisory/osv/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,7 @@ impl<'g> OsvLoader<'g> {
)
.await?;
}
(RangeType::Ecosystem, Ecosystem::PyPI) => {
create_package_status(
&advisory_vuln,
&purl,
range,
&VersionScheme::Python,
&tx,
)
.await?;
}
(RangeType::Ecosystem, Ecosystem::Python) => {
(RangeType::Ecosystem, Ecosystem::PyPI | Ecosystem::Python) => {
create_package_status(
&advisory_vuln,
&purl,
Expand Down

1 comment on commit c350d71

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: c350d71 Previous: f54d171 Ratio
Ingest DS3 1 s 0 s +∞

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.