Skip to content

Addition of a causes link type #139

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

Closed
wants to merge 13 commits into from
Closed

Conversation

calnan
Copy link
Contributor

@calnan calnan commented Dec 3, 2024

There is a proposal for the addition of a causes/caused by link type. Tied into that there is now a separate section which covers the main link types that we use


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/guide.git pull/139/head:pull/139
$ git checkout pull/139

Update a local copy of the PR:
$ git checkout pull/139
$ git pull https://git.openjdk.org/guide.git pull/139/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 139

View PR using the GUI difftool:
$ git pr show -t 139

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/guide/pull/139.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 3, 2024

👋 Welcome back calnan! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Dec 3, 2024

@calnan This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

Addition of a causes link type

Reviewed-by: jwilhelm

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the master branch:

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@JesperIRL) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the rfr label Dec 3, 2024
@mlbridge
Copy link

mlbridge bot commented Dec 3, 2024

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

NIce to see such a section being added - and I've missed a "caused-by" link for many years (why did we not have it from day one?). A few suggestions however.

Thanks

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Thanks for updates.

… by link, moving most of the text into other relevant sections of the guide
@openjdk openjdk bot removed the rfr label Jan 14, 2025
@magicus
Copy link
Member

magicus commented Jan 20, 2025

How should the causes/caused by link be used when a fix is backed out, and then redone? Since this is a bit of a tricky albeit somewhat common situation, maybe we should clarify it in the guide?

@openjdk openjdk bot added the rfr label Jan 21, 2025
@calnan
Copy link
Contributor Author

calnan commented Jan 21, 2025

I don't think the fact that fix 'A' is backed out changes the 'A causes B' link itself, although B would be closed once the back-out happens but the link would remain.
Lets see if David/Jesper have some suggestions

@JesperIRL
Copy link
Member

I don't think the fact that fix 'A' is backed out changes the 'A causes B' link itself, although B would be closed once the back-out happens but the link would remain. Lets see if David/Jesper have some suggestions

I agree. This would be alternative 2 in step 3 of https://openjdk.org/guide/#backing-out-a-change - backing out the change is fixing the regression. We don't remove the links when issues are fixed.

@magicus
Copy link
Member

magicus commented Jan 21, 2025

So if I have an old checkin A that caused a regression in e.g. a prior release that was not noticed at the time, and make a fix for it in B, but it is broken and is backed out in C, and then redone in D.

A causes B, B causes C, and A causes D?

@dholmes-ora
Copy link
Member

B causes C

I don't think it makes sense to have a backout issue be marked as "caused by" the original issue. I don't think that is the sense of "cause" this was intended to capture.

@magicus
Copy link
Member

magicus commented Jan 22, 2025

Why not? I assume that one thing you want to capture is when backporting. So if B is broken, you definitely would want to know that it caused undesired behavior that was fixed by C. Or am I mistaken?

@aivanov-jdk
Copy link
Member

Why not? I assume that one thing you want to capture is when backporting. So if B is broken, you definitely would want to know that it caused undesired behavior that was fixed by C. Or am I mistaken?

I agree. The reason for backout is that the fix was broken, so C was caused by B.

When backporting, B and C can be skipped, therefore a ‘causes’ link from A to D makes sense to me.

@magicus
Copy link
Member

magicus commented Jan 22, 2025

When backporting, B and C can be skipped, therefore a ‘causes’ link from A to D makes sense to me.

But that only makes sense once D is created. When creating B, the author genuinely believes that it fixes A. It is just that later on, B was found to be broken. Should we at that point go and remove the causes link for A?

I'm not saying I have the right answer here, but I definitely think that whatever we come up with should be documented in the guide, since this is indeed a tricky scenario.

@aivanov-jdk
Copy link
Member

When backporting, B and C can be skipped, therefore a ‘causes’ link from A to D makes sense to me.

But that only makes sense once D is created. When creating B, the author genuinely believes that it fixes A. It is just that later on, B was found to be broken. Should we at that point go and remove the causes link for A?

I don't think we should. The relationship between A and B remains even after C is created, and after it's integrated, too.

Additional comments could be added to clarify the relationships. However, the fact that B causes C and that C is a backout highlights that B isn't actually fixed. For this reason, D should be created as soon as it's clear B will be backed out — at the same time when C is created.

I'm not saying I have the right answer here, but I definitely think that whatever we come up with should be documented in the guide, since this is indeed a tricky scenario.

I don't know the right answer either.

Yet I think A should have the ‘causes’ link to both B and D, possibly a ‘relates to’ link to C too.

@JesperIRL
Copy link
Member

I don't see any scenario where we would delete a causes link unless it's added by mistake or some analysis later shows that the indicated bug isn't the cause. As always one must use common sense and do what's best in any edge case situation. To me it's clear that A causes B and D and I think it's preferred to keep the text short and readable over trying to explain every edge case out there.

@magicus
Copy link
Member

magicus commented Jan 23, 2025

... and B causes C, right?

I don't think we need to explain every edge case, but I think the specific case of a backout could be served by being explicit in what to do in that situation.

@dholmes-ora
Copy link
Member

Why not? I assume that one thing you want to capture is when backporting. So if B is broken, you definitely would want to know that it caused undesired behavior that was fixed by C. Or am I mistaken?

First off if B is broken it should be Verified as Fix Failed and that is what tells backporters there is an issue. It then has a link to C (the backout) and a link to a REDO issue (potentially). These links are evident regardless of how the link is described.

If we say that the Backout issue is caused by B then that would imply the REDO issue is also caused by B - they are both only necessary because B was broken. Are you proposing that as well? If so the Backout section of the guide also needs to reflect this.

I understand that without B being broken there is no need for a Backout issue but that relationship is to me more specific than simply causal. Maybe we need a backed-out-by kind of link.

@calnan
Copy link
Contributor Author

calnan commented Jan 23, 2025

I'm not seeing that the last set of comments warrant any changes to the text
Jesper handing over to you to review

@calnan
Copy link
Contributor Author

calnan commented Jan 23, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Jan 23, 2025

@calnan This pull request has not yet been marked as ready for integration.

@openjdk
Copy link

openjdk bot commented Jan 24, 2025

⚠️ @calnan the full name on your profile does not match the author name in this pull requests' HEAD commit. If this pull request gets integrated then the author name from this pull requests' HEAD commit will be used for the resulting commit. If you wish to push a new commit with a different author name, then please run the following commands in a local repository of your personal fork:

$ git checkout causesLink
$ git commit --author='Preferred Full Name <you@example.com>' --allow-empty -m 'Update full name'
$ git push

@openjdk openjdk bot added the ready label Jan 24, 2025
calnan and others added 4 commits January 27, 2025 08:22
Co-authored-by: Alexey Ivanov <alexey.ivanov@oracle.com>
Co-authored-by: Alexey Ivanov <alexey.ivanov@oracle.com>
@calnan
Copy link
Contributor Author

calnan commented Jan 27, 2025

Jesper, as discussed I moved the order of the paragraphs in "Backporting multiple related changes"

@calnan
Copy link
Contributor Author

calnan commented Jan 28, 2025

/integrate

@openjdk openjdk bot added the sponsor label Jan 28, 2025
@openjdk
Copy link

openjdk bot commented Jan 28, 2025

@calnan
Your change (at version fa5f66c) is now ready to be sponsored by a Committer.

@JesperIRL
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jan 28, 2025

Going to push as commit 5ce900f.
Since your change was applied there have been 2 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk
Copy link

openjdk bot commented Jan 28, 2025

@JesperIRL @calnan Pushed as commit 5ce900f.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@calnan calnan deleted the causesLink branch February 26, 2025 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

6 participants