Skip to content

[APM-CI] force pull weblogic image from CI - #561

Merged
kuisathaverat merged 1 commit into
elastic:masterfrom
kuisathaverat:pull-weblogic-image
Apr 8, 2019
Merged

kuisathaverat merged 1 commit into
elastic:masterfrom
kuisathaverat:pull-weblogic-image

Conversation

@kuisathaverat

Copy link
Copy Markdown
Contributor

testcontainers it is failing to pull the image so I guess it needs the image pulled before to use it, so until we could have that Docker image pre-pulled on VMs, we can force to pull it.

related to #555

@kuisathaverat kuisathaverat added the automation Tests & automation that help build & maintain the project label Apr 5, 2019
@kuisathaverat kuisathaverat self-assigned this Apr 5, 2019
@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #561 into master will decrease coverage by 1.49%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #561     +/-   ##
===========================================
- Coverage     64.61%   63.11%   -1.5%     
  Complexity       68       68             
===========================================
  Files           185      180      -5     
  Lines          7570     6815    -755     
  Branches        948      780    -168     
===========================================
- Hits           4891     4301    -590     
+ Misses         2409     2249    -160     
+ Partials        270      265      -5
Impacted Files Coverage Δ Complexity Δ
.../apm/agent/report/serialize/DslJsonSerializer.java 81.84% <0%> (-6.41%) 0% <0%> (ø)
...va/co/elastic/apm/agent/impl/transaction/Span.java 63.76% <0%> (-5.68%) 0% <0%> (ø)
...pm/agent/report/IntakeV2ReportingEventHandler.java 76.23% <0%> (-4.79%) 0% <0%> (ø)
...astic/apm/agent/bci/ElasticApmInstrumentation.java 72.72% <0%> (-3.47%) 0% <0%> (ø)
...ic/apm/agent/servlet/ServletTransactionHelper.java 76.97% <0%> (-3.13%) 0% <0%> (ø)
...tic/apm/agent/configuration/CoreConfiguration.java 96.12% <0%> (-2.14%) 0% <0%> (ø)
...a/co/elastic/apm/agent/report/ReporterFactory.java 78.26% <0%> (-0.91%) 0% <0%> (ø)
...java/co/elastic/apm/agent/bci/ElasticApmAgent.java 75.62% <0%> (-0.55%) 0% <0%> (ø)
...astic/apm/agent/configuration/ServiceNameUtil.java 80.95% <0%> (-0.18%) 0% <0%> (ø)
...lastic/apm/agent/http/client/HttpClientHelper.java 0% <0%> (ø) 0% <0%> (ø) ⬇️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 49e9624...462e2b3. Read the comment docs.

@felixbarny

Copy link
Copy Markdown
Member

Maybe there is also a way to docker login with Testcontainers. That way, we wouldn't have to hard-code the containers we need to login for.

@felixbarny

Copy link
Copy Markdown
Member

Hm, on my local machine Testcontainers was able to fetch the image which logged in.

Maybe the login didn't quite work yet. See this part of the logs:

[2019-04-05T11:43:52.896Z] [main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with Environment variables, system properties and defaults. Resolved: 
[2019-04-05T11:43:52.896Z]     dockerHost=unix:///var/run/docker.sock
[2019-04-05T11:43:52.896Z]     apiVersion='{UNKNOWN_VERSION}'
[2019-04-05T11:43:52.896Z]     registryUrl='https://index.docker.io/v1/'
[2019-04-05T11:43:52.896Z]     registryUsername='jenkins'
[2019-04-05T11:43:52.896Z]     registryPassword='null'
[2019-04-05T11:43:52.896Z]     registryEmail='null'
[2019-04-05T11:43:52.896Z]     dockerConfig='DefaultDockerClientConfig[dockerHost=unix:///var/run/docker.sock,registryUsername=jenkins,registryPassword=<null>,registryEmail=<null>,registryUrl=https://index.docker.io/v1/,dockerConfigPath=/var/lib/jenkins/.docker,sslConfig=<null>,apiVersion={UNKNOWN_VERSION},dockerConfig=<null>]'

It says registryUsername='jenkins'. This is not the username which is stored in the secret/apm-team/ci/elastic-observability-dockerhub vault secret.

@felixbarny

Copy link
Copy Markdown
Member

The docker login also seems to cause some build failures due to timeouts: https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-java%2Fapm-agent-java-mbp/detail/PR-562/3/pipeline/89#step-136-log-3

@kuisathaverat

Copy link
Copy Markdown
Contributor Author

the docker login works, if it doesn't work you could not make docker pull with the docker CLI, and you can

Screenshot 2019-04-08 at 12 35 36

The thing is that the docker configuration file is in the WORKSPACE of the build and this is the same that the HOME environment variable points, it is not the real user HOME, I mean it is not the same that it is in the /etc/passwd file, I guess testcontainers is ignoring the value of the HOME environment variable and get the configuration in another way, I saw that there is a way to force testcontainers to grab a docker config fileDOCKER_CONFIG_FILE=/some/location/config.json

https://www.testcontainers.org/modules/docker_compose/

@kuisathaverat

Copy link
Copy Markdown
Contributor Author

The docker login also seems to cause some build failures due to timeouts: https://apm-ci.elastic.co/blue/organizations/jenkins/apm-agent-java%2Fapm-agent-java-mbp/detail/PR-562/3/pipeline/89#step-136-log-3

it is not related to our changes, this would happen always we have infra issues, because of that, we should include the image in the local cache as we've made with the other images. We've to confirm first that testcontainers don't pull the image if it is pulled locally.

@kuisathaverat

Copy link
Copy Markdown
Contributor Author

also seems more people has problems wit authenticated registries see the comments here testcontainers/testcontainers-java#968 and testcontainers/testcontainers-java#1007

@kuisathaverat
kuisathaverat merged commit ea28a35 into elastic:master Apr 8, 2019
@kuisathaverat
kuisathaverat deleted the pull-weblogic-image branch April 8, 2019 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Tests & automation that help build & maintain the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants