Giter VIP home page Giter VIP logo

Comments (28)

jlebon avatar jlebon commented on May 27, 2024 2

Same issue here. It seems like creating a job comes with its own all blanked out Trigger Setup. If you go in the job configuration, then click "Trigger Setup...", it will show all blank fields, which will cause the defaults to take action. If you then delete that Trigger Setup and add back a new one (Trigger Setup --> Add --> "Update commit status during build"), it will have the correct fields (coming from those in the Configure System page).

from ghprb-plugin.

samrocketman avatar samrocketman commented on May 27, 2024 1

To be clear: I replicated the behavior by not configuring the job config at all but instead only configuring the global config. I can't give you the config I used.

I fixed my own issues by configuring it in each job.

from ghprb-plugin.

csizmazia avatar csizmazia commented on May 27, 2024 1

Unfortunately, the described workaround (setting Context in each job) does not work for me.
To understand the problem, i did the following:

  • set "jenkins-global" as Context in the global jenkins config
  • set "jenkins-tests-only" and "jenkins-code-analysis" as Context in job-specific configurations (there are only those two jobs)

Now, all my pull requests show 4 checks: "default", "jenkins-global", "jenkins-tests-only", "jenkins-code-analysis" (see attached image)
jenkins

"jenkins-global" is never shown as finished, though. "default" seems to take the same state as one of my actual jobs (also the Url is the same then). It seems to be updated with every update of a job. The job finishing last threrefore determines the final state of the "default" check (it will have the same state as the last finishing job).

Leaving Context empty in global config reduces it to 3 checks: "default", "jenkins-tests-only", "jenkins-code-analysis". Still wrong, though...

I'm using version 1.35.0 of the plugin.

from ghprb-plugin.

benpatterson avatar benpatterson commented on May 27, 2024 1

@anton-unity Ahh thank you for the screenshots. The extra pixels on the bottom of the job screenshot helped me understand how you'd configured the job. I can now happily (?) report that I can reproduce the problem. In my set-up, I was setting the job-specific configuration in the Trigger Setup... section of the job.

FWIW as a temporary workaround, you could try setting the job-specific context in the Trigger Setup section. (Let me know if that helps?) I'll see if I can unwind what's going on in the particular use-case where I can reproduce the problem.

Screenshots below: (1) a screenshot just showing an example of where I set it up when I could not reproduce it. Then (2) a screenshot showing that I was able to reproduce it using your configuration.

image
image

from ghprb-plugin.

jlebon avatar jlebon commented on May 27, 2024

Seems like this bug has also been reported in JIRA:
https://issues.jenkins-ci.org/browse/JENKINS-29151

from ghprb-plugin.

DavidTanner avatar DavidTanner commented on May 27, 2024

This is cause by this line: https://github.com/jenkinsci/ghprb-plugin/blob/ghprb-1.27/src/main/java/org/jenkinsci/plugins/ghprb/GhprbTrigger.java#L94 I will have it fixed in the next release.

from ghprb-plugin.

jlebon avatar jlebon commented on May 27, 2024

@DavidTanner Awesome. Do you expect a release anytime soon?

Also, related to this, it seems like there's no way currently to not have a Commit Status URL. E.g. I don't want any "Details" link at all on the PR's webpage. I can get this to work if I specify a simple space " " in that field in the Configure System page, but then when I do the steps described in my previous comment on the job configuration page to get back those defaults, the space is not copied over (trimmed out probably), and thus, the default URL gets used.

Hopefully, these two bugs are related. I.e. once we no longer have to fiddle with specific job configurations and instead rely on the main system configuration, each individual job without a Trigger Setup created will just lookup those central values without trimming anything, so that even a single blank space is kept.

from ghprb-plugin.

DavidTanner avatar DavidTanner commented on May 27, 2024

How about if the url is set to --none-- then the url is set to ""?

from ghprb-plugin.

jlebon avatar jlebon commented on May 27, 2024

Actually, it seems like the issue is more grave than I thought. The Commit Status URL doesn't seem to be copied over at all when adding a Trigger Setup on the job configuration page. I had a assumed previously it was because I used a simple space. But even when using "--none--" now (or even a real URL), it seems like it doesn't get copied over.

from ghprb-plugin.

DavidTanner avatar DavidTanner commented on May 27, 2024

There is no --none-- currently. I am working on fixing the defaults.

from ghprb-plugin.

martin-brennan-csnet avatar martin-brennan-csnet commented on May 27, 2024

So this did not work globally for me but it did work when I put the settings in there for a specific job, so my issue is solved even though there may be a larger problem at play.

from ghprb-plugin.

pmorie avatar pmorie commented on May 27, 2024

I ran into a permutation of this today. I am able to set these values correctly via the Web UI, but when uploading generated configuration via the Jenkins Job Builder tool (which is just posting an XML file to the API), everything under SimpleStatus appears to be lost.

from ghprb-plugin.

pmorie avatar pmorie commented on May 27, 2024

Actually, I might be hitting a distinct issue

from ghprb-plugin.

jlebon avatar jlebon commented on May 27, 2024

This issue should be fixed in the latest release.

from ghprb-plugin.

samrocketman avatar samrocketman commented on May 27, 2024

I confirm this still is an issue with ghprb 1.30.1.

from ghprb-plugin.

DavidTanner avatar DavidTanner commented on May 27, 2024

@samrocketman can you post your job config and the global plugin config?

from ghprb-plugin.

hskrtich avatar hskrtich commented on May 27, 2024

This is still an issue as of ghprb-1.35.0

from ghprb-plugin.

benpatterson avatar benpatterson commented on May 27, 2024

@bskrtich is the issue similar to what's described: something you can work around if you override the default on each job?

from ghprb-plugin.

hskrtich avatar hskrtich commented on May 27, 2024

Yes the issue is very similar. If you change the Context in the global settings, it will be added to the PR at the start, but at some point durning the build it will send "default" as the Context. This all can be worked around by setting the Context in each job.

from ghprb-plugin.

antnsi avatar antnsi commented on May 27, 2024

Can confirm workaround does not work for me as well. 1.35.0

Looks like 'Commit Status Build Result' jenkins configuration is always using 'default', instead of value from 'Commit Status Context' (which is actually used only for build triggered status)

from ghprb-plugin.

antnsi avatar antnsi commented on May 27, 2024

@benpatterson sorry, but do you know is someone working on this? Just bringing some attention to the issue

from ghprb-plugin.

benpatterson avatar benpatterson commented on May 27, 2024

@anton-unity I am looking at it this morning and am unable to reproduce. :(

I wonder what version of the github plugin you're using, just out of curiosity? We upgraded that dependency with 1.35.

More details: I'm setting only the context in the global configuration (not the url or anything like that, in part to simplify), and I'm setting a specific context in a ghprb job. Only the specific job's context is appearing throughout the cycle (on trigger, on start, on complete). FWIW the job is configured to pass.

from ghprb-plugin.

benpatterson avatar benpatterson commented on May 27, 2024

Oh I should also point out that my dev environment is on a jenkins 2.x install

from ghprb-plugin.

antnsi avatar antnsi commented on May 27, 2024

I tried it once again now with such setup - plugin v1.35 and jenkins 2.19.x.
For global configuration only context context-global, for job only context context-job.

That's result after job completed:
screen shot 2017-03-31 at 17 45 04

Job configuration:
screen shot 2017-03-31 at 17 43 49

Global configuration:
screen shot 2017-03-31 at 17 43 25

from ghprb-plugin.

antnsi avatar antnsi commented on May 27, 2024

I will try fresh jenkins+plugin instance early next week (just to make sure there is no weird dependencies issue) and post results here.

from ghprb-plugin.

antnsi avatar antnsi commented on May 27, 2024

@benpatterson thank you for your reply! Indeed, I confirm Job -> Trigger Setup context work as expected and solved my problem with single job. Sorry, I was a bit confused by few concurrent options...

This is my result with configured trigger setup (and any global configuration):
screen shot 2017-04-01 at 12 13 11

from ghprb-plugin.

bjoernhaeuser avatar bjoernhaeuser commented on May 27, 2024

I am closing this, because this seems to work if properly configured.

If anyone wants to provide a documentation patch that would be much appreciated.

from ghprb-plugin.

heisian avatar heisian commented on May 27, 2024

I think this needs to be reopened, as setting the global config context still results in default.

from ghprb-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.