Show missing dependencies in dependency graph instead of failing
When dependencies are not cached on the server (common since we removed proactive caching), the dependency graph now: - Continues resolving what it can find - Shows missing dependencies in a separate section with amber styling - Displays the constraint and which package required them - Updates the header stats to show "X cached • Y not cached" This provides a better user experience than showing an error when some dependencies haven't been downloaded yet.
This commit is contained in:
@@ -1033,10 +1033,19 @@ class ResolvedArtifact(BaseModel):
|
||||
download_url: str
|
||||
|
||||
|
||||
class MissingDependency(BaseModel):
|
||||
"""A dependency that could not be resolved (not cached on server)"""
|
||||
project: str
|
||||
package: str
|
||||
constraint: Optional[str] = None
|
||||
required_by: Optional[str] = None
|
||||
|
||||
|
||||
class DependencyResolutionResponse(BaseModel):
|
||||
"""Response from dependency resolution endpoint"""
|
||||
requested: Dict[str, str] # project, package, ref
|
||||
resolved: List[ResolvedArtifact]
|
||||
missing: List[MissingDependency] = []
|
||||
total_size: int
|
||||
artifact_count: int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user