-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: set max_retries in CommitProperties #2826
chore: set max_retries in CommitProperties #2826
Conversation
ACTION NEEDED delta-rs follows the Conventional Commits specification for release automation. The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
cd47e2e
to
8328f34
Compare
This needs to be exposed for python users as well |
7c2c324
to
3f5be93
Compare
Not super familiar with how Python binding works. Made an attempt to expose the |
@helanto Hmm perhaps we can introduce a CommitProperties class, where you have custom_metadata and commit_retries as variables, this would be a breaking change, so we need to warn users that custom_metadata should be passed into CommitProperties |
0fb6fb6
to
adf96ec
Compare
I believe I made the change. How do we warn users @ion-elgreco ? |
You can check in other places of the code base, where we show a warn when a parameter is passed that is deprecated |
This means that we keep both parameters around. Do you have something in mind along the following lines? def operation(
....,
custom_metadata: Optional[Dict[str, str]] = None, # We keep this around for compatibility reasons.
commit_properties: OptionalCommit[Properties] = None,
):
if custom_metadata is not None:
warn("Please provide custom_metadata as part of commit_properties").
... |
Yess, and then custom_metadata can be dropped in later versions |
adf96ec
to
ecd2a08
Compare
@helanto do you have time to make that change? Because then we can merge : ) |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2826 +/- ##
==========================================
- Coverage 72.67% 72.66% -0.02%
==========================================
Files 131 131
Lines 39957 39962 +5
Branches 39957 39962 +5
==========================================
- Hits 29040 29037 -3
- Misses 9059 9064 +5
- Partials 1858 1861 +3 ☔ View full report in Codecov by Sentry. |
Yes I will work on it today! |
1110cb5
to
640a0c6
Compare
I believe I made the changes if you can take a look @ion-elgreco |
@helanto just one more thing, commit_metadata in the pyo3 functions can be removed, and in Python if custom metadata is still passed, you can wrap it into CommitPropeti e |
640a0c6
to
956fd54
Compare
I look at pyo3 function definitions and they don't have any #[pyo3(signature = ...)]
pub fn some_function(
...,
custom_metadata: Option<HashMap<String, String>>,
max_commit_retries: Option<usize>,
) I can create a pyo3 class that wraps |
Yeah I meant custom_metadata. We need a rust struct which has a derive indeed |
5ef3095
to
b4fd5cf
Compare
Now it should be good! Let me know what you think @ion-elgreco |
b4fd5cf
to
ab30ac0
Compare
ab30ac0
to
39093c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thankss!!
39093c7
to
e99e64f
Compare
Description
Adds a
with_max_retries
inCommitProperties
. Allow for clients to control the maximum number of times a commit will be retried before failing.Related Issue(s)
Documentation