From bdcf023a83cf2ef53c787ecc65d7abf17e243f84 Mon Sep 17 00:00:00 2001 From: Nir Ozery Date: Thu, 21 Nov 2024 22:44:37 -0500 Subject: [PATCH] CR Fixes 2 --- api/swagger.yml | 2 +- clients/java-legacy/api/openapi.yaml | 2 +- clients/java-legacy/docs/BranchCreation.md | 2 +- .../io/lakefs/clients/api/model/BranchCreation.java | 4 ++-- clients/java/api/openapi.yaml | 2 +- clients/java/docs/BranchCreation.md | 2 +- .../io/lakefs/clients/sdk/model/BranchCreation.java | 2 +- clients/python-legacy/docs/BranchCreation.md | 2 +- .../lakefs_client/model/branch_creation.py | 4 ++-- clients/python/docs/BranchCreation.md | 2 +- clients/python/lakefs_sdk/models/branch_creation.py | 2 +- clients/rust/docs/BranchCreation.md | 2 +- clients/rust/src/models/branch_creation.rs | 2 +- docs/assets/js/swagger.yml | 2 +- pkg/api/controller_test.go | 10 ++++++---- 15 files changed, 22 insertions(+), 20 deletions(-) diff --git a/api/swagger.yml b/api/swagger.yml index f96389d2f1f..37f55b2ae8f 100644 --- a/api/swagger.yml +++ b/api/swagger.yml @@ -695,7 +695,7 @@ components: default: false hidden: type: boolean - description: *EXPERIMENTAL* When set, branch will not show up when listing branches by default. + description: When set, branch will not show up when listing branches by default. *EXPERIMENTAL* default: false TagCreation: diff --git a/clients/java-legacy/api/openapi.yaml b/clients/java-legacy/api/openapi.yaml index 308ff3d647a..9a8530fcf62 100644 --- a/clients/java-legacy/api/openapi.yaml +++ b/clients/java-legacy/api/openapi.yaml @@ -8272,7 +8272,7 @@ components: hidden: default: false description: When set, branch will not show up when listing branches by - default + default. *EXPERIMENTAL* type: boolean required: - name diff --git a/clients/java-legacy/docs/BranchCreation.md b/clients/java-legacy/docs/BranchCreation.md index df8885fd95c..9ca79a84cf8 100644 --- a/clients/java-legacy/docs/BranchCreation.md +++ b/clients/java-legacy/docs/BranchCreation.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **name** | **String** | | **source** | **String** | | **force** | **Boolean** | | [optional] -**hidden** | **Boolean** | When set, branch will not show up when listing branches by default | [optional] +**hidden** | **Boolean** | When set, branch will not show up when listing branches by default. *EXPERIMENTAL* | [optional] diff --git a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/BranchCreation.java b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/BranchCreation.java index bc5a6805908..8034b7cd36c 100644 --- a/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/BranchCreation.java +++ b/clients/java-legacy/src/main/java/io/lakefs/clients/api/model/BranchCreation.java @@ -122,11 +122,11 @@ public BranchCreation hidden(Boolean hidden) { } /** - * When set, branch will not show up when listing branches by default + * When set, branch will not show up when listing branches by default. *EXPERIMENTAL* * @return hidden **/ @javax.annotation.Nullable - @ApiModelProperty(value = "When set, branch will not show up when listing branches by default") + @ApiModelProperty(value = "When set, branch will not show up when listing branches by default. *EXPERIMENTAL*") public Boolean getHidden() { return hidden; diff --git a/clients/java/api/openapi.yaml b/clients/java/api/openapi.yaml index 690ac3f1692..cfe8a2a3452 100644 --- a/clients/java/api/openapi.yaml +++ b/clients/java/api/openapi.yaml @@ -8246,7 +8246,7 @@ components: hidden: default: false description: "When set, branch will not show up when listing branches by\ - \ default" + \ default. *EXPERIMENTAL*" type: boolean required: - name diff --git a/clients/java/docs/BranchCreation.md b/clients/java/docs/BranchCreation.md index 305cb2b84d1..f1b336dd9d2 100644 --- a/clients/java/docs/BranchCreation.md +++ b/clients/java/docs/BranchCreation.md @@ -10,7 +10,7 @@ |**name** | **String** | | | |**source** | **String** | | | |**force** | **Boolean** | | [optional] | -|**hidden** | **Boolean** | When set, branch will not show up when listing branches by default | [optional] | +|**hidden** | **Boolean** | When set, branch will not show up when listing branches by default. *EXPERIMENTAL* | [optional] | diff --git a/clients/java/src/main/java/io/lakefs/clients/sdk/model/BranchCreation.java b/clients/java/src/main/java/io/lakefs/clients/sdk/model/BranchCreation.java index 57f97626b02..954fe481d0f 100644 --- a/clients/java/src/main/java/io/lakefs/clients/sdk/model/BranchCreation.java +++ b/clients/java/src/main/java/io/lakefs/clients/sdk/model/BranchCreation.java @@ -141,7 +141,7 @@ public BranchCreation hidden(Boolean hidden) { } /** - * When set, branch will not show up when listing branches by default + * When set, branch will not show up when listing branches by default. *EXPERIMENTAL* * @return hidden **/ @javax.annotation.Nullable diff --git a/clients/python-legacy/docs/BranchCreation.md b/clients/python-legacy/docs/BranchCreation.md index d5dab1c5619..72a6025d161 100644 --- a/clients/python-legacy/docs/BranchCreation.md +++ b/clients/python-legacy/docs/BranchCreation.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **name** | **str** | | **source** | **str** | | **force** | **bool** | | [optional] if omitted the server will use the default value of False -**hidden** | **bool** | When set, branch will not show up when listing branches by default | [optional] if omitted the server will use the default value of False +**hidden** | **bool** | When set, branch will not show up when listing branches by default. *EXPERIMENTAL* | [optional] if omitted the server will use the default value of False **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/python-legacy/lakefs_client/model/branch_creation.py b/clients/python-legacy/lakefs_client/model/branch_creation.py index 51af3d1356f..65afc799e77 100644 --- a/clients/python-legacy/lakefs_client/model/branch_creation.py +++ b/clients/python-legacy/lakefs_client/model/branch_creation.py @@ -146,7 +146,7 @@ def _from_openapi_data(cls, name, source, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) force (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - hidden (bool): When set, branch will not show up when listing branches by default. [optional] if omitted the server will use the default value of False # noqa: E501 + hidden (bool): When set, branch will not show up when listing branches by default. *EXPERIMENTAL*. [optional] if omitted the server will use the default value of False # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -235,7 +235,7 @@ def __init__(self, name, source, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) force (bool): [optional] if omitted the server will use the default value of False # noqa: E501 - hidden (bool): When set, branch will not show up when listing branches by default. [optional] if omitted the server will use the default value of False # noqa: E501 + hidden (bool): When set, branch will not show up when listing branches by default. *EXPERIMENTAL*. [optional] if omitted the server will use the default value of False # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/clients/python/docs/BranchCreation.md b/clients/python/docs/BranchCreation.md index 6be9e382d83..13c9fc90535 100644 --- a/clients/python/docs/BranchCreation.md +++ b/clients/python/docs/BranchCreation.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **name** | **str** | | **source** | **str** | | **force** | **bool** | | [optional] [default to False] -**hidden** | **bool** | When set, branch will not show up when listing branches by default | [optional] [default to False] +**hidden** | **bool** | When set, branch will not show up when listing branches by default. *EXPERIMENTAL* | [optional] [default to False] ## Example diff --git a/clients/python/lakefs_sdk/models/branch_creation.py b/clients/python/lakefs_sdk/models/branch_creation.py index 679c2353274..d20faf88635 100644 --- a/clients/python/lakefs_sdk/models/branch_creation.py +++ b/clients/python/lakefs_sdk/models/branch_creation.py @@ -32,7 +32,7 @@ class BranchCreation(BaseModel): name: StrictStr = Field(...) source: StrictStr = Field(...) force: Optional[StrictBool] = False - hidden: Optional[StrictBool] = Field(False, description="When set, branch will not show up when listing branches by default") + hidden: Optional[StrictBool] = Field(False, description="When set, branch will not show up when listing branches by default. *EXPERIMENTAL*") __properties = ["name", "source", "force", "hidden"] class Config: diff --git a/clients/rust/docs/BranchCreation.md b/clients/rust/docs/BranchCreation.md index c08b639c9df..b06f9cf3920 100644 --- a/clients/rust/docs/BranchCreation.md +++ b/clients/rust/docs/BranchCreation.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **name** | **String** | | **source** | **String** | | **force** | Option<**bool**> | | [optional][default to false] -**hidden** | Option<**bool**> | When set, branch will not show up when listing branches by default | [optional][default to false] +**hidden** | Option<**bool**> | When set, branch will not show up when listing branches by default. *EXPERIMENTAL* | [optional][default to false] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/clients/rust/src/models/branch_creation.rs b/clients/rust/src/models/branch_creation.rs index 80942b00314..be0e71f887e 100644 --- a/clients/rust/src/models/branch_creation.rs +++ b/clients/rust/src/models/branch_creation.rs @@ -18,7 +18,7 @@ pub struct BranchCreation { pub source: String, #[serde(rename = "force", skip_serializing_if = "Option::is_none")] pub force: Option, - /// When set, branch will not show up when listing branches by default + /// When set, branch will not show up when listing branches by default. *EXPERIMENTAL* #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")] pub hidden: Option, } diff --git a/docs/assets/js/swagger.yml b/docs/assets/js/swagger.yml index 3c7810590a5..37f55b2ae8f 100644 --- a/docs/assets/js/swagger.yml +++ b/docs/assets/js/swagger.yml @@ -695,7 +695,7 @@ components: default: false hidden: type: boolean - description: When set, branch will not show up when listing branches by default + description: When set, branch will not show up when listing branches by default. *EXPERIMENTAL* default: false TagCreation: diff --git a/pkg/api/controller_test.go b/pkg/api/controller_test.go index b32a952c8aa..e70dac413c0 100644 --- a/pkg/api/controller_test.go +++ b/pkg/api/controller_test.go @@ -1502,8 +1502,9 @@ func TestController_ListBranchesHandler(t *testing.T) { if len(results) != 2 { t.Fatalf("expected 2 branches to return, got %d", len(results)) } - require.Equal(t, results[0].Id, "main3") - require.Equal(t, results[1].Id, "main5") + expectedRefs := []string{"main3", "main5"} + gotRefs := []string{results[0].Id, results[1].Id} + require.Equal(t, expectedRefs, gotRefs) // List all branches resp, err = clt.ListBranchesWithResponse(ctx, repo, &apigen.ListBranchesParams{ @@ -1516,8 +1517,9 @@ func TestController_ListBranchesHandler(t *testing.T) { if len(results) != 2 { t.Fatalf("expected 2 branches to return, got %d", len(results)) } - require.Equal(t, results[0].Id, "main2") - require.Equal(t, results[1].Id, "main3") + expectedRefs = []string{"main2", "main3"} + gotRefs = []string{results[0].Id, results[1].Id} + require.Equal(t, expectedRefs, gotRefs) }) t.Run("list branches repo doesnt exist", func(t *testing.T) {