Fix tests for tag removal and version behavior
- Fix upload response to return actual version (not requested version) when artifact already has a version in the package - Update ref_count tests to use multiple packages (one version per artifact per package design constraint) - Remove allow_public_internet references from upstream caching tests - Update consistency check test to not assert global system health - Add versions field to artifact schemas - Fix dependencies resolution to handle removed tag constraint
This commit is contained in:
@@ -210,10 +210,10 @@ class ArtifactProvenanceResponse(BaseModel):
|
||||
# Usage statistics
|
||||
upload_count: int
|
||||
# References
|
||||
packages: List[Dict[str, Any]] # List of {project_name, package_name, tag_names}
|
||||
tags: List[
|
||||
packages: List[Dict[str, Any]] # List of {project_name, package_name, versions}
|
||||
versions: List[
|
||||
Dict[str, Any]
|
||||
] # List of {project_name, package_name, tag_name, created_at}
|
||||
] # List of {project_name, package_name, version, created_at}
|
||||
# Upload history
|
||||
uploads: List[Dict[str, Any]] # List of upload events
|
||||
|
||||
@@ -236,6 +236,7 @@ class ArtifactDetailResponse(BaseModel):
|
||||
created_by: str
|
||||
ref_count: int
|
||||
format_metadata: Optional[Dict[str, Any]] = None
|
||||
versions: List[Dict[str, Any]] = [] # List of {version, package_name, project_name}
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
@@ -566,6 +567,7 @@ class ProjectStatsResponse(BaseModel):
|
||||
project_id: str
|
||||
project_name: str
|
||||
package_count: int
|
||||
version_count: int
|
||||
artifact_count: int
|
||||
total_size_bytes: int
|
||||
upload_count: int
|
||||
@@ -580,6 +582,7 @@ class PackageStatsResponse(BaseModel):
|
||||
package_id: str
|
||||
package_name: str
|
||||
project_name: str
|
||||
version_count: int
|
||||
artifact_count: int
|
||||
total_size_bytes: int
|
||||
upload_count: int
|
||||
@@ -598,6 +601,7 @@ class ArtifactStatsResponse(BaseModel):
|
||||
storage_savings: int # (ref_count - 1) * size
|
||||
projects: List[str] # Projects using this artifact
|
||||
packages: List[str] # Packages using this artifact
|
||||
versions: List[Dict[str, Any]] = [] # List of {version, package_name, project_name}
|
||||
first_uploaded: Optional[datetime] = None
|
||||
last_referenced: Optional[datetime] = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user