test-day-71

Today’s Task

  • investigate on releaseMe backend time issue
  • ReleaseMe Added more output in web console
  • change image tag pattern
  • onebox vmip

Additional Task

  • ask for review on Attendance Table

Comment

grafana 上 stg 挂了一大片

这情景要是放飞机上就该立即跳伞的

直接进去看 log 也没看出什么原因

问了 dev,才知道是 MySQL 挂了

他们解决了

test-day-70

Today’s Task

  • fix ReleaseMe Rerun Button
  • check all-in-one page columns
  • change nucleus jenkins job default param option
  • fix ChangeHosts
  • onebox-setup vmip

Additional Task

  • Change image tag for all containers

Comment

Kotlin 看起来很有趣

也许可以花点时间看一看

另外,leetcode 还是得刷

保持手感

组会的时候看不清屏幕

要去配新的眼镜了

test-day-69

Today’s Task

  • Check nucleus STG status
  • Check ReleaseMe local Time Zone
  • Add vmip to onebox-setup

Additional Task

  • Fix Mi TV

Comment

1
2
3
4
多喝热水
不行就分
来都来了
重启试试

几乎昏迷了一整天

test-day-68

Today’s Task

  • Release Support
  • ReleaseMe button style change
  • Add vmip to onebox-setup
  • Check the reason why LB-int failed 78/139

Additional Task

  • Deploy STG on AWS MANUALLY
  • Check liquibase Status on IAD2 MANUALLY

Comment

manully messed around with STG image version

check twice when delete something

pods and sts are completely different

1
2
3
4
5
kubectl get sts -A

kubectl edit sts -n stg-xxx stgxxx-use1a

kubeclt delete pod -n stg-xxx

要做一些对个人成长更有帮助的事情

(比如说多撸代码

test-day-67

Today’s Task

  • test ReleaseMe feature
  • fix fast-liquibase pipeline
  • push US sign off
  • Add vmip to onebox-setup
  • Check the reason why LB-int failed 78/139

Comments

我觉得我也可以自己整理一个 daily task todo list

逐渐找回了一点完成目标的动力

积攒一点多巴胺和内啡肽

1
2
3
4
Even if you're gonna lose,
suck with confidence

- C. W. Lemoine

不小心写了个死循环,跑了两个小时才发现

test-day-66

cut build 还算是比较顺利

上 STG 手动刷了下 liquibase,

修改了 component audit v4 的输出格式

下次 cm 应该就可以用起来了

ReleaseMe 的 feature 改代码只花了 20 分钟

但为了让它跑起来,花了一整周的时间去搭环境

新的 linux 物理机,全新的 docker

以及用 idea 配置一个 spring boot 项目的 run configuration

插测试flow,用 postman 朝 backend webhook api 发一个 post

给 idea 换了个 terminal

1
C:\cygwin64\bin\bash.exe -ilc "cd ${OLDPWD-.}; bash"

powershell 我还是不喜欢

fast-liquibase-manual

get artifactory token from IAD2_Utility at /root/token/artifactory.token

ssh into IAD2_Jump_Tools_PCI

ssh into stgk8smaster-pci-01 or stgk8smaster-nonpci-01

1
sudo kubectl exec -it -n ${namespace} ${podname} -- bash

fetch target file url from artifactory

version is liquibase version on the CM table

url is inside script test-infra-jenkins/liquibase-deploy/mysql-deploy.sh

1
2
3
4
5
6
7
8
v="551.0.xxxxx"
t="artifactory_token"
tarfile="liquibase.data-${v}.tar.gz"
urlPrefix="https://artifactory.citools.ea.com/artifactory/releases/com/ea"
urlSuffix="liquibase.data/${v}/${tarfile}"
url="${urlPrefix}/nucleus/${urlSuffix}"

curl -v -H "Authorization: Bearer ${t}" "${url}" -o ${tarfile}
1
2
mkdir -p liquibase.data
tar -zxf xxx.tar.gz -C liquibase.data
1
./my-liquibase.py ${component} staging status 551

Check db.conf inside each repo to confirm which db it uses.

Repo Version
Citadel 551
Venice 550
Code-Redeption 546
Paragon 551
nucleusConfig 2021

version is at liquibase.data/changelogs/${repo}

repo names are at liquibase.data/conf/${repo}

transfer-lockbox-jobs-tips

TLDR

33.125 上先跑一次 CP_Docker

然后 slave1 上,根据 CP_Docker 的参数 ChangeHosts

再发起 RL_CP_OneCase 确认

之后就可以跑 RL_CP_BVT 了

在迁移 Jenkins Job 上碰到的坑

1. Build Lockbox.Birdwing 的时候 没有找到 LB.api 和 LB.qa

1
[ERROR] Failed to execute goal on project Lockbox.Birdwing: Could not resolve dependencies for project com.ea.eadp.lb.test:Lockbox.Birdwing:jar:490.0-SNAPSHOT: The following artifacts could not be resolved: com.ea.lb:lb.api:jar:5.0.0-SNAPSHOT, com.ea.lb:lb.qa:jar:5.0.0-SNAPSHOT: Failure to find com.ea.lb:lb.api:jar:5.0.0-SNAPSHOT in https://artifactory.citools.ea.com/artifactory/ea-snapshots was cached in the local repository, resolution will not be reattempted until the update interval of nucleus.snapshots has elapsed or updates are forced -> [Help 1]

需要 build lockbox-sloth 和 build lockbox-qa

于是迁移了这两个 job 到 Testinfra Master 上

同时,root 和 shdev 两个用户的 maven repository 目录不同

2. RL-Customer-Portal-BVT Compilation error

1
2
3
4
5
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/shdev/local/lockbox-cp/cp-integration/src/test/java/com/ea/eadp/test/ui/customerportal/dataProvider/dataProviders/TestDataProviderHelper.java:[1213,38] error: cannot find symbol
symbol: method setSteamNameDiscoverable(String)
location: variable pidPrivacySettingsType of type PidPrivacySettingsType

3. Build Sloth 找不到 POM

1
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/shdev/pct/jenkins/workspace/Build_Sloth). Please verify you invoked Maven from the correct directory. -> [Help 1]

通过 -f 手动指定 pom

4. RL-Customer-Portal-BVT NullPointerException

1
2
3
4
INFO  2021-11-03 02:57:15 - db.mysql.password.encrypted: *****
java.lang.NullPointerException
at com.ea.nova.test.client.SystemPropertiesHelper.loadTestProperties(SystemPropertiesHelper.java:173)
at com.ea.nova.test.client.SystemPropertiesHelper.init(SystemPropertiesHelper.java:90)

需要在 /usr/bin/config.key 里写个密钥

5. BVT test 会用 Win 下的 ChromeDriver

-Dwebdriver.chrome.driver=\${path}

手动指定 chrome driver 的目录

6. linux 下 ChromeDriver 不能用 root 执行

1
2
3
4
5
6
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'jenkinsmaster', ip: 'Unknown', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1062.1.2.el7.x86_64', java.version: '1.8.0_252'
Driver info: driver.version: ChromeDriver

导致了 139 个 case 执行两次,每个 case 各失败一次,跳过一次

需要用普通用户执行,而不是 root

因此需要从 master 搬到 slave1 上,那里的 Jenkins 用的不是 root

7. chmod 权限问题

1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (default) on project lb.app: Failed to create assembly: Error creating assembly archive assembly-copy: chmod exit code was: 1 -> [Help 1]
1
[WARNING] chmod: changing permissions of '/home/shdev/local/lockbox-sloth/lb.app/target/lb.app/conf/lb.configuration.data-5.0.0-SNAPSHOT.jar': Operation not permitted

Master 上 git clone 用的是 root 用户,所以对应的目录用户组也是 root

需要 chown -R

8. Chrome 无法启动

1
2
3
4
5
6
INFO  2021-11-04 04:59:19 - ***Test Skipped*** [CaseName:com.ea.eadp.lb.test.cases.lockbox5.origin.ui.checkout.payments.creditCard.BasicTest#newCreditCardCheckout] [Priority:BVT] [Duration:10] [Status:Enable] [BugNumber:] [Release:Default] [Features:(Origin X) checkout - origin x ui toolkit integration and UX updates] [FailedMessage:]
Tests run: 2, Failures: 1, Errors: 0, Skipped: 1, Time elapsed: 11.652 sec <<< FAILURE!
beforeMethod(com.ea.eadp.lb.test.cases.lockbox5.origin.ui.checkout.payments.creditCard.BasicTest) Time elapsed: 10.372 sec <<< FAILURE!
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

ssh 上去是不行的,没有 GUI 的环境

需要 vnc 上去作为 shdev 手动执行命令

9. LB.pin and LB.api compilation error

1
2
3
4
5
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/shdev/local/lockbox-sloth/lb.pin/src/main/java/com/ea/eadp/lb/pin/dal/ConfigurablePinClientApi.java:[3,35] package com.ea.eadp.dodo.client.pin does not exist
[ERROR] /home/shdev/local/lockbox-sloth/lb.pin/src/main/java/com/ea/eadp/lb/pin/dal/ConfigurablePinClientApi.java:[8,47] cannot find symbol
symbol: class PinClientApi
1
[ERROR] Error resolving version for plugin 'com.ea.eadp.lb:dodo.swagger.util' from the repositories [local (/home/shdev/.m2/repository), central (https://artifactory.citools.ea.com/artifactory/ea-releases), snapshots (https://artifactory.citools.ea.com/artifactory/ea-snapshots)]: Plugin not found in any plugin repository -> [Help 1]

需要确认 maven settings.xml 的 repository 配置

直接用了 master 上的 settings.xml

并且通过 -s 指定这个 xml

10. Post script syntax

remember to double check the correct path to JenkinsFiles folder

11. Upgrading Jenkins

When upgrading Jenkins from 2.150.2 to 2.303.3,

I changed jenkins.war to a new one.

1
2
java.lang.IllegalStateException: An attempt to save the global configuration
was made before it was loaded

Added -Dio.jenkins.plugins.casc.ConfigurationAsCode.initialDelay=20000 to ./start_https_jenkins.sh

Then I copied the entire plugin folder from testinfra-master‘s jenkins

And use the jenkins.war of version 2.222.4

Comments

int 的话,是不用填 nucleus 和 lockbox 的 ip 的

只有在本地跑的时候需要

本地跑的时候,需要 CP 铺好了

也就是跑过一边 CP_Docker 这个 job,

在 10.86.33.125 上执行就 ok

这个 job 会触发 BVT 和 INTBVT 之类的 job,

对应的参数照道理来讲会自动传过去

但因为 linux 的 Jenkins 没有 trigger other jobs

所以需要手动发起 ChangeHost

ip 也必须一样

ChangeHost 在 slave 1 上依然没法 sudo,用奇妙的办法绕过去了

CP_One_Case 可以用来确认 nucleusIP 那台机器是不是还活着