几个月来,我遇到了gitlab-runner随机失败的问题,日志如下:
Running with gitlab-runner 13.7.0 (943fc252)
on <gitlab-runner-name> <gitlab-runner-id>
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on <hostname>...
Getting source from Git repository
00:00
Fetching changes...
Reinitialized existing Git repository in /var/gitlab-runner/builds/<gitlab-runner-id>/0/<gtlab-group>/<gitlab-project>/.git/
fatal: unable to access 'https://gitlab-ci-token:[MASKED]@<hostname>/<gtlab-group>/<gitlab-project>.git/': Problem with the SSL CA cert (path? access rights?)
ERROR: Job failed: exit status 1
Run Code Online (Sandbox Code Playgroud)
这一行是关键的一行:
fatal: unable to access 'https://gitlab-ci-token:[MASKED]@<hostname>/<gtlab-group>/<gitlab-project>.git/': Problem with the SSL CA cert (path? access rights?)
Run Code Online (Sandbox Code Playgroud)
我尝试取消注册跑步者并注册一个新跑步者。一段时间后,它也因相同的错误而失败(第一次运行通常运行良好)。
此外,其他机器上的运行程序也可以正常工作,并且不会因上述错误消息而失败。
我认为该问题是由CI_SERVER_TLS_CA_FILE以下位置的文件丢失引起的:
/var/gitlab-runner/builds/<gitlab-runner-id>/0/<gtlab-group>/<gitlab-project>.tmp/CI_SERVER_TLS_CA_FILE …Run Code Online (Sandbox Code Playgroud) 我正在尝试遵循Airbnb定义的 JS 代码风格。
函数调用参数尾随逗号的规则指出:
7.15 具有多行签名或调用的函数应像本指南中的所有其他多行列表一样缩进:每个项目单独占一行,最后一个项目后面带有逗号。
但是当我执行以下操作时:
/* THREE.js constructor for PerspectiveCamera */
const camera = new THREE.PerspectiveCamera(
75,
window.innerWidth / window.innerHeight,
0.1,
1000,
);
Run Code Online (Sandbox Code Playgroud)
Google Chrome 抱怨以下错误:
app.js:11 未捕获的语法错误:意外的标记)
当我删除尾随逗号时,一切正常。这段代码在 Firefox 中运行良好,我相当确定从今天(2017 年 4 月 11 日)开始,它在一周前在 Chrome 中也运行良好 - 因为从那时起我就没有更改过我的代码,并且我正在向其展示我正在开发的应用程序我的同事。
请注意,数组中的尾随逗号仍然可以正常工作:
testArray = [
'one',
'two',
'three',
];
Run Code Online (Sandbox Code Playgroud)
有人可以解释这种行为或指出我可以在哪里查找更多信息吗?
在 Ubuntu 16.04 上使用 Google Chrome(版本 57.0.2987.133(64 位))。