treeverse / lakeFS

lakeFS - Data version control for your data lake | Git for data
https://docs.lakefs.io
Apache License 2.0
4.46k stars 359 forks source link

Support hidden branches feature #8355

Open N-o-Z opened 1 week ago

N-o-Z commented 1 week ago

In many scenarios, internal lakeFS flows requires creation of ephemeral branches. These branches should not be visible to the users to avoid confusion/friction or accidentally disrupting lakeFS flows (by user modification or deletion). The suggestion is to allow creation of hidden branches which will not show up when listing repository branches and minimize the exposure of these branches to the end user.

Introduce a new flag for branch creation:

    BranchCreation:
      type: object
      required:
        - name
        - source
      properties:
        name:
          type: string
        source:
          type: string
        force:
          type: boolean
          default: false
        hidden:
          type: boolean
          description: when true, branch will not show in list branches by default
          default: false

Add hidden property to branch which will be defaulted to false if not exists (backwards compatible):

message BranchData {
  string id = 1;
  string commit_id = 2;
  string staging_token = 3;
  repeated string sealed_tokens = 4;
  bool hidden = 5;
}

These branches will not show up when listing repository branches by default. Introduce a new query param to ListBranches command:

        - in: query
          name: show_hidden
          schema:
            type: boolean
            default: false
            description: list all branches including hidden branches