Comments (39)
Sorry, extension?
from ghprb-plugin.
Would you be able to run a rogue build? I have a thought for where it might be failing in the lookup.
from ghprb-plugin.
Totally! Just let me know what level of logging you need for me to dump.
from ghprb-plugin.
If you would please get the same log. The context shouldn't be (null).
from ghprb-plugin.
The null context is gone. This appeared:
Jul 02, 2015 2:37:44 AM SEVERE org.jenkinsci.plugins.ghprb.GhprbGitHubAuth getBuilder
Failed to look up credentials for context Koji Job Generator (PR) using id: 2c6f0a56-02f2-4082-88ca-143fa817b765
This wasn't there before and this job is definitely accessible (verified with Github web access for those credentials).
Still no comments on the PR being built.
from ghprb-plugin.
If you try testing it again from the main configuration page, does it connect successfully?
from ghprb-plugin.
From main config page all appears to be in order:
Test Credentials
Connect to API
Connected to https://api.github.com as
Repository owner/name
ServiceMesh/koji-jenkins-dsl
Check repo permissions
User has access to: Push, Pull
Test Credentials
Connect to API
Connected to https://api.github.com as
Repository owner/name
cschcs/kesem
Check repo permissions
User has access to: Admin, Push, Pull
Found this in startup logs though:
Jul 02, 2015 2:33:25 AM SEVERE org.jenkinsci.plugins.ghprb.GhprbRepository initGhRepository
Could not retrieve GitHub repository named ServiceMesh/koji-jenkins-dsl (Do you have properly set 'GitHub project' field in job configuration?)
java.io.FileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:494)
at org.kohsuke.github.Requester._to(Requester.java:245)
at org.kohsuke.github.Requester.to(Requester.java:191)
at org.kohsuke.github.GitHub.getRepository(GitHub.java:321)
at org.jenkinsci.plugins.ghprb.GhprbRepository.initGhRepository(GhprbRepository.java:78)
at org.jenkinsci.plugins.ghprb.GhprbRepository.init(GhprbRepository.java:51)
at org.jenkinsci.plugins.ghprb.Ghprb.init(Ghprb.java:105)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.start(GhprbTrigger.java:170)
at org.jenkinsci.plugins.ghprb.GhprbTrigger.start(GhprbTrigger.java:51)
at hudson.model.AbstractProject.onLoad(AbstractProject.java:326)
at hudson.model.Project.onLoad(Project.java:98)
at hudson.model.Items.load(Items.java:320)
at jenkins.model.Jenkins$17.run(Jenkins.java:2651)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:904)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/ServiceMesh/koji-jenkins-dsl
at sun.reflect.GeneratedConstructorAccessor54.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1889)
at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1884)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1883)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1456)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.kohsuke.github.Requester.parse(Requester.java:451)
at org.kohsuke.github.Requester._to(Requester.java:224)
... 19 more
Caused by: java.io.FileNotFoundException: https://api.github.com/repos/ServiceMesh/koji-jenkins-dsl
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1835)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
at org.kohsuke.github.Requester.parse(Requester.java:447)
... 20 more
from ghprb-plugin.
Maybe cranking up logging on commenting would help?
from ghprb-plugin.
What does the domain information for the credentials look like? Does it have the correct scheme, host, port, and path?
from ghprb-plugin.
It's "Global credentials (unrestricted)", "secret text", "Global Scope" with no domain information whatsoever. This is how new credential is registered when added from the main settings page.
from ghprb-plugin.
I can't get my setup to do it.
from ghprb-plugin.
Jenkins 1.609.1 ?
from ghprb-plugin.
Security enabled. Security via OAuth to GitHub
from ghprb-plugin.
the the logger, do you see the context text still?
from ghprb-plugin.
Nope, I don't see the context (null) anymore, but I see this:
Jul 02, 2015 2:37:44 AM SEVERE org.jenkinsci.plugins.ghprb.GhprbGitHubAuth getBuilder
Failed to look up credentials for context Koji Job Generator (PR) using id: 2c6f0a56-02f2-4082-88ca-143fa817b765
and on cschcs/kesem the comments are not posted in the PR request even though main settings specify those to be posted.
from ghprb-plugin.
I wonder if the plugin should just forget about context? Just use the jenkins instance.
from ghprb-plugin.
If the credential is specified as Global there should not be any context used I would think.
from ghprb-plugin.
Also could you add comments logging ad-nauseam, cause no comments are posted at all.
from ghprb-plugin.
Jul 02, 2015 3:56:46 AM FINEST org.jenkinsci.plugins.ghprb.GhprbGitHubAuth
Using OAuth token for context HCS - Kesem - (PR) - (Autogen)
Jul 02, 2015 3:56:46 AM INFO org.jenkinsci.plugins.ghprb.GhprbWebHook handleWebHook
Checking issue comment 'org.kohsuke.github.GHIssueComment@27f1ba1d' for repo cschcs/kesem
Jul 02, 2015 3:56:46 AM FINER org.jenkinsci.plugins.ghprb.GhprbRepository
Comment on issue #2 from User:arcivanov: test this please
Jul 02, 2015 3:56:46 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Retest phrase
Jul 02, 2015 3:56:46 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Admin User:arcivanov gave retest phrase
Jul 02, 2015 3:56:46 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2 was updated on cschcs/kesem at 7/2/15 3:56 AM by User:arcivanov
Jul 02, 2015 3:56:46 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2 was updated on repo cschcs/kesem but there aren't any new comments nor commits; that may mean that commit status was updated.
Jul 02, 2015 3:56:46 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Running the build
Jul 02, 2015 3:56:46 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
PR is not null, checking if mergable
Jul 02, 2015 3:56:46 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Running build...
from ghprb-plugin.
I just sent you another build with some more logging.
from ghprb-plugin.
trying it already
from ghprb-plugin.
seems like something didn't resolve in messages: "Looking up credentials for {0}, using context {1} for url {2}"
I'll wait for a fix
from ghprb-plugin.
single quotes I guess tell it not to replace the number. Redo
from ghprb-plugin.
It should look like this
Jul 02, 2015 12:20:11 AM FINE org.jenkinsci.plugins.ghprb.Ghprb
Looking up credentials for d9535634-c7b0-46dc-b2dc-c57576ad9744, using context Testing for url https://api.github.com
Jul 02, 2015 12:20:21 AM FINE org.jenkinsci.plugins.ghprb.Ghprb
Found 1 credentials
Jul 02, 2015 12:20:21 AM FINEST org.jenkinsci.plugins.ghprb.GhprbGitHubAuth
Using OAuth token for context Testing
from ghprb-plugin.
Ah, so one nailed down:
Jul 02, 2015 4:25:48 AM SEVERE org.jenkinsci.plugins.ghprb.GhprbGitHubAuth getBuilder
Failed to look up credentials for context Koji Job Generator (PR) using id: 2c6f0a56-02f2-4082-88ca-143fa817b765
Jul 02, 2015 4:25:48 AM SEVERE org.jenkinsci.plugins.ghprb.GhprbRepository initGhRepository
Could not retrieve GitHub repository named ServiceMesh/koji-jenkins-dsl (Do you have properly set 'GitHub project' field in job configuration?)
java.io.FileNotFoundException: {"message":"Not Found","documentation_url":"https://developer.github.com/v3"}
...
Stopping the ghprb trigger for project Koji Job Generator (PR)
Jul 02, 2015 4:44:40 AM INFO org.jenkinsci.plugins.ghprb.GhprbTrigger start
Starting the ghprb trigger for the Koji Job Generator (PR) job; newInstance is true
Jul 02, 2015 4:44:40 AM FINE org.jenkinsci.plugins.ghprb.Ghprb
Looking up credentials for 2d50728a-b29c-4b16-814b-0d6723e70beb, using context Koji Job Generator (PR) for url https://api.github.com
Jul 02, 2015 4:44:40 AM FINE org.jenkinsci.plugins.ghprb.Ghprb
Found 2 credentials
Jul 02, 2015 4:44:40 AM FINEST org.jenkinsci.plugins.ghprb.GhprbGitHubAuth
Using OAuth token for context Koji Job Generator (PR)
Jul 02, 2015 4:44:40 AM SEVERE org.jenkinsci.plugins.ghprb.GhprbRepository createHook
Couldn't create web hook for repository ServiceMesh/koji-jenkins-dsl. Does the user (from global configuration) have admin rights to the repository?
Somehow "Koji Job Generator (PR)" had a credential UUID that was not default: 2c6f0a56-02f2-4082-88ca-143fa817b765 vs 2d50728a-b29c-4b16-814b-0d6723e70beb.
Solved by reselecting "api.github.com: " in GHPRB section in the job.
Still no comments in PR being built:
Got payload event: issue_comment
Jul 02, 2015 4:49:43 AM FINE org.jenkinsci.plugins.ghprb.Ghprb
Looking up credentials for 2d50728a-b29c-4b16-814b-0d6723e70beb, using context HCS_-_Kesem_-_(PR)_-_(Autogen) for url https://api.github.com
Jul 02, 2015 4:49:43 AM FINE org.jenkinsci.plugins.ghprb.Ghprb
Found 2 credentials
Jul 02, 2015 4:49:43 AM FINEST org.jenkinsci.plugins.ghprb.GhprbGitHubAuth
Using OAuth token for context HCS - Kesem - (PR) - (Autogen)
Jul 02, 2015 4:49:43 AM INFO org.jenkinsci.plugins.ghprb.GhprbWebHook handleWebHook
Checking issue comment 'org.kohsuke.github.GHIssueComment@569e1b84' for repo cschcs/kesem
Jul 02, 2015 4:49:43 AM FINER org.jenkinsci.plugins.ghprb.GhprbRepository
Comment on issue #2 from User:arcivanov: test this please
Jul 02, 2015 4:49:43 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Retest phrase
Jul 02, 2015 4:49:43 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Admin User:arcivanov gave retest phrase
Jul 02, 2015 4:49:43 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2 was updated on cschcs/kesem at 7/2/15 4:49 AM by User:arcivanov
Jul 02, 2015 4:49:43 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest updatePR
Pull request #2 was updated on repo cschcs/kesem but there aren't any new comments nor commits; that may mean that commit status was updated.
Jul 02, 2015 4:49:43 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Running the build
Jul 02, 2015 4:49:43 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
PR is not null, checking if mergable
Jul 02, 2015 4:49:43 AM FINEST org.jenkinsci.plugins.ghprb.GhprbPullRequest
Running build...
from ghprb-plugin.
I have tried 1.24.5.
I have "Use comments to report intermediate phases: triggered et al" checked in Jenkins global config. No error messages appear in the Jenkins logs or in the build logs. No comments in the PR either.
from ghprb-plugin.
So that setting is a little deceiving, it only is called if the status update fails. It is shown easiest using version an earlier version.
https://github.com/jenkinsci/ghprb-plugin/blob/ghprb-1.20.1/src/main/java/org/jenkinsci/plugins/ghprb/GhprbRepository.java#L166
In the later versions if the status updates fail, then the comment logic is called
https://github.com/jenkinsci/ghprb-plugin/blob/ghprb-1.24.5/src/main/java/org/jenkinsci/plugins/ghprb/GhprbBuilds.java
https://github.com/jenkinsci/ghprb-plugin/blob/ghprb-1.24.5/src/main/java/org/jenkinsci/plugins/ghprb/GhprbRepository.java#L170
from ghprb-plugin.
What about default uncustomized build-success/build-failure comments? Same?
from ghprb-plugin.
The build messages were always configured per job, with a global default when creating a new job. The values that were there before should have been kept accross the update.
from ghprb-plugin.
Should the default SUCCESS/FAIL comments be posted by default like in 1.23? I can't get GHPRB to comment on anything.
from ghprb-plugin.
There is only a default if you add it.
from ghprb-plugin.
I have the latest running on my own branch, and I do get the comments that I add for SUCCESS/FAIL.
DavidTanner/Testing#12
from ghprb-plugin.
Sorry, I didn't understand your message. The default shouldn't be posted unless it is also on the job. There have been several issues opened about not having anything posted to the comments. The default appears if you select the option on the build.
from ghprb-plugin.
by build I mean the job configuration.
from ghprb-plugin.
I see. So that is a behavioral change from pre-1.24? Because there used to be default build success/failure comments and this change basically breaks automation that configures GHPRB.
There used to be defaults for Success and Failure comments with failures including last N lines of stdout logs. Now there is nothing apparently unless I configure.
Is there a reference for what variables expand in the messages?
from ghprb-plugin.
Any environment variables available when the step runs will be expanded in the build message. I can see adding a setting that will tell the plugin to use global values if local settings aren't present.
So yes, this does change default behavior.
from ghprb-plugin.
Is there any way to dump build console output lines in the comment?
from ghprb-plugin.
That is what the log lines except extension is for
from ghprb-plugin.
The extensions are in the drop down list at the end of the configuration section. Things like build messages, log lines, commit status, etc.
from ghprb-plugin.
Related Issues (20)
- Unable to connect to GitHub HOT 2
- Worker nodes aren't started when pipeline requests to run parallel parts on same node
- Log4j in ghprb? HOT 1
- Trigger based on directories HOT 1
- Pull request approval without fetch
- usage of org-list may incur github rate limit
- Publish multiple github-statuses from the same pipeline job HOT 1
- ${ghprbActualCommit} does not pick up current commit from hook if an additional branch is specified. HOT 2
- Create new pull request with a comments,but not be triggered. Comment a gain and reopen the pull request,then be triggered
- Restrict Specific branch for Pull request
- What kind of "actions" does the Pull request Webhook of the Github pull request builder support?
- What kind of "actions" does the Pull request Webhook of the Github pull request builder support? HOT 1
- Plug-in Question
- Changing the status context (name) in the config while a job is running leaves the old status in pending forever
- Changing(rotating) plugin credentials take no effect until Jenkins is restarted due to cached repo object
- Is this plugin is not maintained anymore? if so, is there any alternative plugin for it ? HOT 1
- Can Help WIth Plugin Upgrade
- Warning: The currently installed plugin version may not be safe to use. Please review the following security notices:
- Not able to trigger jenkins job by adding specific labels
- When A PR is not mergeable the Github status check does not get updated
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghprb-plugin.