Skip to content
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

Docs: add recommendations on how to deprecate code #16433

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

jeherve
Copy link
Member

@jeherve jeherve commented Jul 8, 2020

Changes proposed in this Pull Request:

  • Let's be more clear on code deprecation in the plugin, to avoid breaking things on update, or leave things around forever.

cc'ing @dereksmart on this, since you've often been our champion for removing deprecated code. Previous art on the topic:

Note: I also took the opportunity to update wording in another document, moving from Master issue to Primary issue (see #16099).

Jetpack product discussion

  • N/A

Does this pull request change what data or activity we track or use?

  • N/A

Testing instructions:

  • Check for typos

Proposed changelog entry for your changes:

  • N/A

@jeherve jeherve added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it Docs [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jul 8, 2020
@jeherve jeherve requested a review from dereksmart July 8, 2020 10:01
@jeherve jeherve self-assigned this Jul 8, 2020
@jetpackbot
Copy link

jetpackbot commented Jul 8, 2020

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16433

Scheduled Jetpack release: August 4, 2020.
Scheduled code freeze: July 28, 2020

Generated by 🚫 dangerJS against cd7a0a0

@dereksmart
Copy link
Member

Thanks! Nice addition.

Is there some timeline where we are comfortable removing deprecated code? Like after X months? If we have this rule set, we could push for deprecation notices to include a message about when this will be fully removed.

Though we technically only support the last 2 versions of Jetpack, we know in practice that it often takes people longer than that to modify their code. I think a 6 month deprecation would be pretty generous, and reasonable.

Then if we have that rule, we could set up a parser to check for them periodically.

Thoughts?

dereksmart
dereksmart previously approved these changes Jul 8, 2020
Copy link
Member

@dereksmart dereksmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed the bullet point about the 6 months!

@kraftbj kraftbj merged commit dd3e512 into master Jul 8, 2020
@kraftbj kraftbj deleted the update/deprecation-guide branch July 8, 2020 22:30
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jul 8, 2020
@github-actions github-actions bot added this to the 8.8 milestone Jul 8, 2020
jeherve added a commit that referenced this pull request Jul 9, 2020
In #16433, we determined that we would remove deprecated files and functions 6 months after they've been deprecated.

Let's communicate this to site owners as well, by outputting additional details in the error logs when a deprecation notice is issued.
@jeherve
Copy link
Member Author

jeherve commented Jul 9, 2020

If we have this rule set, we could push for deprecation notices to include a message about when this will be fully removed.

Took a stab at this in #16444.

@jeherve
Copy link
Member Author

jeherve commented Jul 9, 2020

we could set up a parser to check for them periodically.

I like that idea. I am not sure how to best go about it though. I suppose we could make it a habit for the release lead at the beginning of each release cycle?

jeherve added a commit that referenced this pull request Jul 10, 2020
Following #16433, let's remove all code that was deprecated more than 6 months ago.
jeherve added a commit that referenced this pull request Dec 3, 2020
Following #16433, let's remove all code that was deprecated more than 6 months ago.
jeherve added a commit that referenced this pull request Jun 25, 2021
Following #16433, let's remove all code that was deprecated more than 6 months ago.
This commit also standardizes some of the version numbers so they can start getting the proper notices, and we can then remove the deprecations in the future.

Note that "6 months" here refers to 6 months as of the last time this PR was updated, in December 2020.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants