Comments (17)
Are you sure that the lint_result.txt
contains violations from the files that were changed in the pull request?
Are you sure they are of severity WARN
or ERROR
?
from violation-comments-to-stash-plugin.
Yes. Files mentioned in the lint_result.txt
is present in a PR. And yamllint
produce only error
and warning
severity.
Is it make sense absolute/relative path of files in a report?
from violation-comments-to-stash-plugin.
Yes relative paths msy be the problem.
See also: tomasbjerre/violations-lib#40
from violation-comments-to-stash-plugin.
Removed all relative path from the report, but this didn't help me.
Also I've checked what returned /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/diff
for my PR.
It returns
"diffs":[{"source":null,"destination":{"components":["molecule-default","create.yml"],"parent":"molecule-default","name":"create.yml","extension":"yml","toString":"molecule-default/create.yml"},"hunks":[{"sourceLine":0,"sourceSpan":0,"destinationLine":1,"destinationSpan":134,"segments":[{"type":"ADDED","lines":[{"source":0,"destination":1,"line":"---","truncated":false},{"source":0,"destination":2,"line":"- name: Create","truncated":false},...
I've looked quickly into your code and as I understand it means that file is changed and comment will be send. Am I correct?
And in my report file present this file:
molecule-default/create.yml:6:89: [error] line too long (116 > 88 characters) (line-length)
from violation-comments-to-stash-plugin.
Releasing 1.82 now. It should give you some helpful information in the build log.
from violation-comments-to-stash-plugin.
Thanks for this release, it's very useful output information. I found out that plugin doesn't see any changed files. Could you please describe how does plugin detect which files were already changed or in what parts of the code I need to look, to understand how it works?
from violation-comments-to-stash-plugin.
That would be here in getFiles()
: https://github.com/tomasbjerre/violation-comments-to-bitbucket-server-lib/blob/master/src/main/java/se/bjurr/violations/comments/bitbucketserver/lib/BitbucketServerCommentsProvider.java#L115
And that looks like this returns no files:
/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/changes?limit=999999
What does it return?
from violation-comments-to-stash-plugin.
It returns
{
"fromHash":"8d2fa6f0f6c5df46d3f63ef71df6f2a2af42ff55",
"toHash":"cb2cdb92cc349b930082c796202a2680422ee9b8",
"properties":{
"changeScope":"ALL"
},
"values":[
{
"contentId":"b1643800f179e7c28213b17f1bfc5b02ec96d13a",
"fromContentId":"0000000000000000000000000000000000000000",
"path":{
"components":[
"molecule-default",
"create.yml"
],
"parent":"molecule-default",
"name":"create.yml",
"extension":"yml",
"toString":"molecule-default/create.yml"
},
"executable":false,
"percentUnchanged":-1,
"type":"ADD",
"nodeType":"FILE",
"links":{
"self":[
null
]
},
"properties":{
"gitChangeType":"ADD"
}
},...
from violation-comments-to-stash-plugin.
I'm releasing 1.83 now with some more logging.
from violation-comments-to-stash-plugin.
Thank you. The problem was in that the plugin didn't get a proper response.
I recieved DNS error:
2018-09-19 08:54:34 <html><head><title>502 Bad Gateway</title></head>
2018-09-19 08:54:34 <body><h1>DNS error</h1>
2018-09-19 08:54:34 <p>DNS error (the host name of the page you are looking for does not exist)<br><br>Please check that the host name has been spelled correctly.<br></p>
And this is quite strange, because before executing this step I do a request to the same DNS name with HTTPrequest plugin and get proper response.
from violation-comments-to-stash-plugin.
Ok. What does the build log look like now? Is this problem obvious for anyone looking at the build log?
Do you still think this might be a problem with the plugin?
from violation-comments-to-stash-plugin.
Log looks awesome, currently it is really easier to investigate a problem. I think might be good for each request write to the log: request URL, headers, response code and response body. It's very useful info for debugging.
Unfortunately I think a problem might be in the plugin, because I used HTTP request in the same job and step to request the same URL, and got proper response.
from violation-comments-to-stash-plugin.
Are you using nodes? Or running everything on master node? And are you making that request on same node as the plugin is running on?
from violation-comments-to-stash-plugin.
I use separate build node, but all steps run on the same node
from violation-comments-to-stash-plugin.
One guess is that it could be that the plugin is using a proxy. If you have a proxy configured in Jenkins the plugin will pick it up and use it.
There is no logging saying that the proxy is used. But there is logging saying that is is not used. So if you don't see any Not using proxy
in the build log, the plugin is using a proxy.
from violation-comments-to-stash-plugin.
Yep, that was a problem! Thank you for your help!
Could you please add in the log information about proxy if it used.
from violation-comments-to-stash-plugin.
Yes adding that!
from violation-comments-to-stash-plugin.
Related Issues (20)
- "Outdated" comments not deleted HOT 27
- Credentials not found error HOT 17
- NPE since v1.76 HOT 1
- All violations related to one file in one comment HOT 7
- Recognition of changed lines seems to not work correclty HOT 15
- Escaped single quote characters in comments
- Allow INFO Files changed to include all scanned files HOT 1
- Violation plugin iterates over files not mentioned in report HOT 6
- NPE after deleting comments HOT 2
- Identify that detecting violations from console/stage output is not supported (directly) HOT 7
- To support Code Insights HOT 2
- INFO POST .../pull-requests/3/comments 400 HOT 5
- Add support for client certificate as credentials HOT 1
- Feature: ignore certain folders/paths/globs HOT 4
- Limit logging of files from Violations Lib HOT 5
- When files paths contains spaces in fails to report warnings HOT 1
- Jenkins agents becoming unresponsive during violations run HOT 3
- Report the "indent" level of an issue HOT 6
- warnings lost, or added as general comments HOT 1
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 violation-comments-to-stash-plugin.