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

Merge result summary deprecation #5119

Merged
merged 2 commits into from
Jan 29, 2023
Merged

Conversation

nopcoder
Copy link
Contributor

Merge API change and deprecation waring - step before we can remove the summary fields from merge result.

This version will always return the summary field and define the field as optional.
It will enable users to switch to a version which will not break when the field is gone.

Related to #3978

Step before we depreate the merge summary result.
This version will always return the summary fields and define the field
as optional. It will enable users to switch to a version which will not
break when the field is gone.
@nopcoder nopcoder added area/API Improvements or additions to the API include-changelog PR description should be included in next release changelog labels Jan 27, 2023
@nopcoder nopcoder requested a review from arielshaqed January 27, 2023 17:47
@nopcoder nopcoder self-assigned this Jan 27, 2023
@github-actions
Copy link

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

@nopcoder nopcoder added the minor-change Used for PRs that don't require issue attached label Jan 29, 2023
@nopcoder nopcoder requested a review from a team January 29, 2023 08:07
Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

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

Thanks!

I prefer to deprecate the fields rather than the message, because one day we might want to return some value. At the same time, please also mark all these fields as "deprecated", which issues warnings on Python I think, and add a scary "description".

THANKS!

api/swagger.yml Outdated
@@ -176,28 +176,26 @@ components:
items:
$ref: "#/components/schemas/Repository"

MergeResultSummary:
description: "Deprecated: merge summary will be removed"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather only deprecate all the fields and keep a MergeSummary, even empty. That will prevent future backwards-compatibility failures -- otherwise when we will want to add a response type, that's another breaking change :-(

Comment on lines +183 to +184
added:
type: integer
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
added:
type: integer
added:
type: integer
deprecated: true
description: Deprecated; inaccurate and will be removed.

(Also on all other properties, of course.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@arielshaqed updated the PR with field level deprecation - note that I kept the summary as optional as I don't think we will set an empty structure if we keep it as required.

@nopcoder nopcoder requested a review from arielshaqed January 29, 2023 11:07
@nopcoder nopcoder merged commit 2acb5b8 into master Jan 29, 2023
@nopcoder nopcoder deleted the chore/merge-summary-api-dep branch January 29, 2023 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API Improvements or additions to the API include-changelog PR description should be included in next release changelog minor-change Used for PRs that don't require issue attached
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants