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

Investigate if Changes page on the job can be updated now we're part of the SCM #93

Open
buep opened this issue Dec 6, 2017 · 6 comments

Comments

@buep
Copy link
Contributor

buep commented Dec 6, 2017

Historically we haven't been able to write and update the page called Changes in the Jenkins job project page, because the plugin is in the build wrapper phase of the job and the Changes belongs to another phase we can't edit at that point.

But with latest major release 3.x we're not part of the Git SCM as an extension, so this probably gives us the possibility to add information to the Changes page.

Ideally I would like the Changes page to contain information of what is integration, so this would mean the changes that are being integrated from the ready branch and not the resulting changeset on the integration branch.

See #86 on details about the Changes page.

Deliveries

Research if the Changes pages object can be edited from the plugin. Maybe just a few lines of code adding something to the Changes page.

@RandomSort
Copy link

I agree with you Bue. If I understand correctly that we are aligned this would result in the output of something like git log origin/master..throwaway.

@buep
Copy link
Contributor Author

buep commented Dec 18, 2017

Almost... but I would track from the head of branch throwaway to the commit it comes from on master instead of latest HEAD of master.

I know this doesn't give me the "real" diff of what is going to be integrated, but it gives me as a developer the changes I plan to deliver is master-branch didn't move.

It is is not real clear what we want there, we might need some more concrete examples? We could come up with those, as soon as we know if we actually can edit the object (which is what this issue is about)

@RandomSort
Copy link

I'm biased. I tend to expect that I only to fast forwards of master, such that I'm interested in that log line. But you are obviously right. We should have some examples.
In the only fast forward world. git log origin/master..throwaway will be enough. In the other world not so much. But again if I'm delivering changes already on master, something very confusing is going on :). We should probably either hide or fail that :)

@buep
Copy link
Contributor Author

buep commented Dec 18, 2017

Right, as soon as we know we technically can contribute to the changes pages in Jenkins, we will discuss what content goes there. Maybe even some user-stories first ;-)

@MadsNielsen
Copy link
Member

MadsNielsen commented Jan 16, 2018

A couple of conclusions from my investigation.

The changelog contents are based on the computations in the changelog method in the git plugin:

https://github.com/jenkinsci/git-plugin/blob/7a2e2f126c6767ac488907288451545dc5ca8035/src/main/java/hudson/plugins/git/GitSCM.java#L1224-L1236

The computation of the changelog happens -after- our plugin has merged changes to the integration branch, which means that there are always no changes since we've already merged the triggered commit into the integration branch.

The method to calculate the change is private and cannot be extended.

The missing changes though, can be fixed , by adding the Calculate changelog against a specific branch git extension. If you include your integration branch here you'll get a better overview of your changes. As it will diff the result of the merge with the integration branch.

As far as the UI goes, you cannot contribute to the UI via extensions, these things needs to go directy in the git plugin, if we want to show additional stuff on this page, as there are no extensions that allow us to add custom data section and/or additional data.

@buep
Copy link
Contributor Author

buep commented Jan 16, 2018

@RandomSort here above is your conclusion from Mads.

Basically we can't fix it, but we could consider to ask the git plugin to help issuing a PR that make the method extensible.

But you should try to add Calculate changelog against a specific branch as proposed above, but it might not be precise in all situations (from squash to accumulated strategy, or fast-forward or real merges)

You can close this issue if you like the Calculate changelog against a specific branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants