-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: Migration Guide #13849
base: main
Are you sure you want to change the base?
chore: Migration Guide #13849
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!--- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,32 @@ For example: | |
Deprecated methods will remain in the codebase for a period of 6 major versions or 6 months, whichever is longer, to provide users ample time to transition away from them. | ||
|
||
Please refer to [DataFusion releases](https://crates.io/crates/datafusion/versions) to plan ahead API migration | ||
|
||
## Migration Guidelines | ||
|
||
To ensure smooth upgrades and maintain application stability, the following guidelines must be followed for changes involving: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can also explicitly say here "it is preferrable not to make breaking API changes and instead add new APis and deprecate existing ones in which case no migration guide is needed" That would perhaps also subtley incentivize people to avoid breaking changes 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we covered it in https://datafusion.apache.org/library-user-guide/api-health.html#breaking-changes ? |
||
|
||
- Public API changes | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should say what consistutes a public api change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is good point. |
||
- Introducing deprecated methods | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not involve any additional migration guide. I.e. this is automatic (unless the deprecated method is no longer correct to call; in such case we should remove it instead of deprecating, or fix it) |
||
- Removal of obsolete methods | ||
Comment on lines
+78
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I personally don't think the last two items are worth documenting -- deprecated methods should have already been removed so there is no need for a contributor to try and document anything when removing them I would also like us to get more in the habit of deprecating rather than removing methods which will make the last item irrelevant. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecated functions are self explanatory if deprecation guidelines followed :) But one pros for documenting it in migration plan is the user is able to identify amount of migration work needed just by looking into the guide for a specific version. For example https://spark.apache.org/docs/3.5.3/core-migration-guide.html#upgrading-from-core-34-to-35 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
agreed
otoh it adds burden for development, and sets wrong incentives, discouraging from deprecating methods and removing old code If this is indeed useful, let's maybe automate pulling of new deprecations, rather than impose a new tax There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Automatic deprecation doc generation sounds good. We can think of it later. There would be always a balance between development work and migration support. From recent days we understood user migration is important for them |
||
|
||
Highlight all breaking changes, deprecated methods, and obsolete methods in the [migration guide](../../../MIGRATION_GUIDE.md). | ||
|
||
### Migration Document Requirements: | ||
|
||
For each upgrade, append a section in [migration guide](../../../MIGRATION_GUIDE.md) outlining the following: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will we have merge conflicts there often? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. of course, like any other file, but should we easily resolvable. |
||
|
||
#### Breaking Changes: | ||
|
||
- Describe all changes that break backward compatibility. | ||
- Provide detailed steps to migrate from old to new APIs. | ||
|
||
#### Deprecations: | ||
|
||
- List all deprecated methods and expected removal timelines. | ||
- Provide alternative methods or workarounds. | ||
|
||
#### Removals: | ||
|
||
- List all methods or APIs that are removed in the current release. | ||
- Suggest migration paths for impacted functionalities | ||
Comment on lines
+94
to
+100
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ouch, unless automated, we won't deprecate any code and won't remove and obsolete stuff. |
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.
Stylistically I would prefer to say this more gently "the following guidelines should be followeed" rather than must. Mostly because there is no way for us to enforce this policy other than pull request reviews
However, I think that may just be a cultural hangup I have as I come from the US and the distinction may not be relevant for other contributors
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.
fixed