-
Notifications
You must be signed in to change notification settings - Fork 79
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
The gitlab API merge request URL has an additional single quote #577
Comments
Something seems to be wrong with the origin of the request:
@ta0chen Do you have a proxy configured on your system or something intercepting your traffic? |
I think we're seeing something similar on gitlab.com but so far it only manifests in projects marked as a CI/CD Catalog. https://docs.gitlab.com/ee/ci/components/catalog.html https://docs.gitlab.com/ee/architecture/blueprints/ci_pipeline_components/ [6:47:13 PM] [semantic-release] [@semantic-release/gitlab] › ✘ An error occurred while making a request to the GitLab release API:
HTTPError: Response code 500 (Internal Server Error)
at Request.<anonymous> (file:///usr/local/share/.config/yarn/global/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/as-promise/index.js:86:42)
at Object.onceWrapper (node:events:629:26)
at Request.emit (node:events:526:35)
at Request._onResponseBase (file:///usr/local/share/.config/yarn/global/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/core/index.js:726:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Request._onResponse (file:///usr/local/share/.config/yarn/global/node_modules/@semantic-release/gitlab/node_modules/got/dist/source/core/index.js:768:13) {
input: undefined,
code: 'ERR_NON_2XX_3XX_RESPONSE',
timings: {
start: 1695581232782,
socket: 1695581232783,
lookup: 1695581232783,
connect: 1695581232783,
secureConnect: 1695581232783,
upload: 1695581232783,
response: 1695581233340,
end: 1695581233341,
error: undefined,
abort: undefined,
phases: {
wait: 1,
dns: 0,
tcp: 0,
tls: 0,
request: 0,
firstByte: 557,
download: 1,
total: 559
}
},
options: {
request: undefined,
agent: { http: undefined, https: undefined, http2: undefined },
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: undefined,
response: undefined,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: '',
body: '{"tag_name":"v1.1.2","description":"## [1.1.2](https://gitlab.com/SomeGroup/ci-catalog/docker/compare/v1.1.1...v1.1.2) (2023-09-24)\\n\\n","assets":{"links":[]}}',
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: true,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: '',
password: '',
http2: false,
allowGetBody: false,
headers: {
'user-agent': 'got (https://github.com/sindresorhus/got)',
'private-token': '[secure]',
'content-type': 'application/json',
'content-length': '163',
'accept-encoding': 'gzip, deflate, br'
},
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN'
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: 'POST',
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
https: {
alpnProtocols: undefined,
rejectUnauthorized: undefined,
checkServerIdentity: undefined,
certificateAuthority: undefined,
key: undefined,
certificate: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
honorCipherOrder: undefined,
minVersion: undefined,
maxVersion: undefined,
signatureAlgorithms: undefined,
tlsSessionLifetime: undefined,
dhparam: undefined,
ecdhCurve: undefined,
certificateRevocationLists: undefined
},
encoding: undefined,
resolveBodyOnly: false,
isStream: false,
responseType: 'text',
url: URL {
href: 'https://gitlab.com/api/v4/projects/SomeGroup%2Fci-catalog%2Fdocker/releases',
origin: 'https://gitlab.com',
protocol: 'https:',
username: '',
password: '',
host: 'gitlab.com',
hostname: 'gitlab.com',
port: '',
pathname: '/api/v4/projects/SomeGroup%2Fci-catalog%2Fdocker/releases',
search: '',
searchParams: URLSearchParams {},
hash: ''
},
pagination: {
transform: [Function: transform],
paginate: [Function: paginate],
filter: [Function: filter],
shouldContinue: [Function: shouldContinue],
countLimit: Infinity,
backoff: 0,
requestLimit: 10000,
stackAllItems: false
},
setHost: true,
maxHeaderSize: undefined,
signal: undefined,
enableUnixSockets: false
}
} |
Sorry @fgreinacher , since the security concern, IT team does not allow me to have the the proxy or network traffic interceptor. |
@ta0chen I did not mean that you should intercept it on your own. The question is whether your IT team directs your traffic through a proxy server or something else that might modify the request. |
@autotmp Not sure, the request shows HTTP status |
|
You are correct - went a bit too far down he rabbit hole on this one. There is definitely an issues when trying to generate a release in a project marked as a CI Component Catalog project but it's not an extra quote. I'll investigate a bit more and open a new issues if there's something concrete to report on the semantic-release side. I suspect it's on the GitLab side. |
@ta0chen I had a look at your log again and it looks like the requests are made towards the correct URL ( |
Current behavior
I recently implemented the semantic-release v21.0.7 into my project hoping it can help to automatically bump the release version. The version can be generated. But I found a serious problem in the semantic-release. The thing is the semantic-release was trying to post comments to related issues and merge requests. But it was using a wrong URL which contained an additional single quote at the end. Below is the console output from the pipeline for your reference. I asked my IT to double confirm this strange thing from the gitlab backend log. So, I believe it should be a defect in semantic-release side.
Expected behavior
The semantic-release should take care of the URL properly and make sure it does not contain some illegal characters. Take the URL for an example which I picked from the log, it really contains the single quote.
https://onecode.polycom-labs.com%27/
semantic-release
version21.0.7
CI environment
gitlab
Plugins used
@semantic-release/git @semantic-release/gitlab @semantic-release/gitlab-config @semantic-release/exec
semantic-release
configurationCI logs
The text was updated successfully, but these errors were encountered: