Skip to content
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
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-api"
version = "2.3.3"
version = "2.3.4"
authors = ["Gaius <gaius.qi@gmail.com>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
341 changes: 178 additions & 163 deletions pkg/apis/common/v2/common.pb.go

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pkg/apis/common/v2/common.pb.validate.go

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

5 changes: 5 additions & 0 deletions pkg/apis/common/v2/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,11 @@ message Download {
bool metadata_only = 33;
// OpenCSG protocol information.
optional OpenCSG open_csg = 34;
// Need scheduling is the flag to indicate whether the download needs to be scheduled
// by the scheduler even if the content length is smaller than the minimum piece length,
// so that the peer announces the task to the scheduler and other peers can discover
// it as a parent.
bool need_scheduling = 35;

reserved 21;
reserved "load_to_cache";
Expand Down
5 changes: 5 additions & 0 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,11 @@ message Download {
bool metadata_only = 33;
// OpenCSG protocol information.
optional OpenCSG open_csg = 34;
// Need scheduling is the flag to indicate whether the download needs to be scheduled
// by the scheduler even if the content length is smaller than the minimum piece length,
// so that the peer announces the task to the scheduler and other peers can discover
// it as a parent.
bool need_scheduling = 35;

reserved 21;
reserved "load_to_cache";
Expand Down
48 changes: 24 additions & 24 deletions python/dragonfly_api/common_pb2.py

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions python/dragonfly_api/common_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ class Build(_message.Message):
def __init__(self, git_version: _Optional[str] = ..., git_commit: _Optional[str] = ..., go_version: _Optional[str] = ..., rust_version: _Optional[str] = ..., platform: _Optional[str] = ...) -> None: ...

class Download(_message.Message):
__slots__ = ("url", "digest", "range", "type", "tag", "application", "priority", "filtered_query_params", "request_header", "piece_length", "output_path", "timeout", "disable_back_to_source", "need_back_to_source", "certificate_chain", "prefetch", "object_storage", "hdfs", "is_prefetch", "need_piece_content", "force_hard_link", "content_for_calculating_task_id", "remote_ip", "concurrent_piece_count", "overwrite", "actual_piece_length", "actual_content_length", "actual_piece_count", "enable_task_id_based_blob_digest", "hugging_face", "model_scope", "metadata_only", "open_csg")
__slots__ = ("url", "digest", "range", "type", "tag", "application", "priority", "filtered_query_params", "request_header", "piece_length", "output_path", "timeout", "disable_back_to_source", "need_back_to_source", "certificate_chain", "prefetch", "object_storage", "hdfs", "is_prefetch", "need_piece_content", "force_hard_link", "content_for_calculating_task_id", "remote_ip", "concurrent_piece_count", "overwrite", "actual_piece_length", "actual_content_length", "actual_piece_count", "enable_task_id_based_blob_digest", "hugging_face", "model_scope", "metadata_only", "open_csg", "need_scheduling")
class RequestHeaderEntry(_message.Message):
__slots__ = ("key", "value")
KEY_FIELD_NUMBER: _ClassVar[int]
Expand Down Expand Up @@ -535,6 +535,7 @@ class Download(_message.Message):
MODEL_SCOPE_FIELD_NUMBER: _ClassVar[int]
METADATA_ONLY_FIELD_NUMBER: _ClassVar[int]
OPEN_CSG_FIELD_NUMBER: _ClassVar[int]
NEED_SCHEDULING_FIELD_NUMBER: _ClassVar[int]
url: str
digest: str
range: Range
Expand Down Expand Up @@ -568,7 +569,8 @@ class Download(_message.Message):
model_scope: ModelScope
metadata_only: bool
open_csg: OpenCSG
def __init__(self, url: _Optional[str] = ..., digest: _Optional[str] = ..., range: _Optional[_Union[Range, _Mapping]] = ..., type: _Optional[_Union[TaskType, str]] = ..., tag: _Optional[str] = ..., application: _Optional[str] = ..., priority: _Optional[_Union[Priority, str]] = ..., filtered_query_params: _Optional[_Iterable[str]] = ..., request_header: _Optional[_Mapping[str, str]] = ..., piece_length: _Optional[int] = ..., output_path: _Optional[str] = ..., timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., disable_back_to_source: bool = ..., need_back_to_source: bool = ..., certificate_chain: _Optional[_Iterable[bytes]] = ..., prefetch: bool = ..., object_storage: _Optional[_Union[ObjectStorage, _Mapping]] = ..., hdfs: _Optional[_Union[HDFS, _Mapping]] = ..., is_prefetch: bool = ..., need_piece_content: bool = ..., force_hard_link: bool = ..., content_for_calculating_task_id: _Optional[str] = ..., remote_ip: _Optional[str] = ..., concurrent_piece_count: _Optional[int] = ..., overwrite: bool = ..., actual_piece_length: _Optional[int] = ..., actual_content_length: _Optional[int] = ..., actual_piece_count: _Optional[int] = ..., enable_task_id_based_blob_digest: bool = ..., hugging_face: _Optional[_Union[HuggingFace, _Mapping]] = ..., model_scope: _Optional[_Union[ModelScope, _Mapping]] = ..., metadata_only: bool = ..., open_csg: _Optional[_Union[OpenCSG, _Mapping]] = ...) -> None: ...
need_scheduling: bool
def __init__(self, url: _Optional[str] = ..., digest: _Optional[str] = ..., range: _Optional[_Union[Range, _Mapping]] = ..., type: _Optional[_Union[TaskType, str]] = ..., tag: _Optional[str] = ..., application: _Optional[str] = ..., priority: _Optional[_Union[Priority, str]] = ..., filtered_query_params: _Optional[_Iterable[str]] = ..., request_header: _Optional[_Mapping[str, str]] = ..., piece_length: _Optional[int] = ..., output_path: _Optional[str] = ..., timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., disable_back_to_source: bool = ..., need_back_to_source: bool = ..., certificate_chain: _Optional[_Iterable[bytes]] = ..., prefetch: bool = ..., object_storage: _Optional[_Union[ObjectStorage, _Mapping]] = ..., hdfs: _Optional[_Union[HDFS, _Mapping]] = ..., is_prefetch: bool = ..., need_piece_content: bool = ..., force_hard_link: bool = ..., content_for_calculating_task_id: _Optional[str] = ..., remote_ip: _Optional[str] = ..., concurrent_piece_count: _Optional[int] = ..., overwrite: bool = ..., actual_piece_length: _Optional[int] = ..., actual_content_length: _Optional[int] = ..., actual_piece_count: _Optional[int] = ..., enable_task_id_based_blob_digest: bool = ..., hugging_face: _Optional[_Union[HuggingFace, _Mapping]] = ..., model_scope: _Optional[_Union[ModelScope, _Mapping]] = ..., metadata_only: bool = ..., open_csg: _Optional[_Union[OpenCSG, _Mapping]] = ..., need_scheduling: bool = ...) -> None: ...

class ObjectStorage(_message.Message):
__slots__ = ("region", "endpoint", "access_key_id", "access_key_secret", "session_token", "credential_path", "predefined_acl", "security_token", "insecure_skip_verify")
Expand Down
6 changes: 6 additions & 0 deletions src/common.v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,12 @@ pub struct Download {
/// OpenCSG protocol information.
#[prost(message, optional, tag = "34")]
pub open_csg: ::core::option::Option<OpenCsg>,
/// Need scheduling is the flag to indicate whether the download needs to be scheduled
/// by the scheduler even if the content length is smaller than the minimum piece length,
/// so that the peer announces the task to the scheduler and other peers can discover
/// it as a parent.
#[prost(bool, tag = "35")]
pub need_scheduling: bool,
}
/// Object Storage related information.
#[derive(serde::Serialize, serde::Deserialize)]
Expand Down
Binary file modified src/descriptor.bin
Binary file not shown.
Loading