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

[PYTHON] Add a tag parameter to the Transaction #8200

Open mickaellcr opened 2 months ago

mickaellcr commented 2 months ago

Hello Everyone!

The Transaction feature is excellent :) I'm wondering if we could add a TAG option to the lakefs python lib on the Transaction class?

Currently, we have

def __init__(self, repository_id: str, branch_id: str, commit_message: str = "",
                 commit_metadata: Optional[Dict] = None, delete_branch_on_error: bool = True, client: Client = None):

For some transactions, I would like to add a tag, unfortunately it's not possible to retrieve the SHA commit right away. I need, after the transaction, to get the head, make sure it's the right commit (thanks to the commit message), and then I can tag it.

I think it would be nice to have it inside the transaction too!

Have an excellent day!