-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Fix SamlAuthenticationIT flakyness #103867
Fix SamlAuthenticationIT flakyness #103867
Conversation
2cdc28e
to
97b9210
Compare
35ec975
to
07f55c3
Compare
bd1c264
to
a9a8809
Compare
@@ -181,7 +185,7 @@ public void execute() { | |||
} | |||
|
|||
final List<String> tags = parameters.getTags().get(); | |||
final boolean isCrossPlatform = parameters.getPlatform().get().equals(Architecture.current().dockerPlatform) == false; | |||
final boolean isCrossPlatform = isCrossPlatform(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tweaked this to allow reusing this task and supporting multi platform images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, neat. I didn't know you could pass multiple platforms at once.
@@ -203,18 +207,34 @@ public void execute() { | |||
tags.forEach(tag -> spec.args("--tag", tag)); | |||
|
|||
parameters.getBuildArgs().get().forEach((k, v) -> spec.args("--build-arg", k + "=" + v)); | |||
|
|||
if (parameters.getPush().getOrElse(false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow pushing directly from here. Makes it easier to push multiple images within a gradle build without the need of doing as part of a script after the build as we use to do for distribution images
This looks stable now: https://buildkite.com/elastic/elasticsearch-pull-request/builds/8265 |
718c987
to
15f4b83
Compare
unset DOCKER_REGISTRY_USERNAME DOCKER_REGISTRY_PASSWORD | ||
|
||
docker buildx create --use | ||
.ci/scripts/run-gradle.sh deployFixtureDockerImages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prep for setting up a ci pipeline for building and deploying docker based fixtures once per day https://github.com/elastic/elasticsearch-infra/pull/378
@@ -9,42 +9,14 @@ | |||
|
|||
default-init-method="initialize" | |||
default-destroy-method="destroy"> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While debugging I noticed some unused metrics are setup. removed more output noise than startup time though
|
||
tasks.register("deployFixtureDockerImages") { | ||
dependsOn tasks.withType(DockerBuildTask) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can move parts of this to an internal plugin once we do this fixture pre baking for more fixtures. We can evaluate existing fixtures in a later pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
@@ -181,7 +185,7 @@ public void execute() { | |||
} | |||
|
|||
final List<String> tags = parameters.getTags().get(); | |||
final boolean isCrossPlatform = parameters.getPlatform().get().equals(Architecture.current().dockerPlatform) == false; | |||
final boolean isCrossPlatform = isCrossPlatform(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unnecessary to have this field now that this logic lives in the isCrosPlatform()
method.
|
||
@Inject | ||
public DockerBuildTask(WorkerExecutor workerExecutor, ObjectFactory objectFactory, ProjectLayout projectLayout) { | ||
this.workerExecutor = workerExecutor; | ||
this.markerFile = objectFactory.fileProperty(); | ||
this.dockerContext = objectFactory.directoryProperty(); | ||
this.buildArgs = objectFactory.mapProperty(String.class, String.class); | ||
this.platform = objectFactory.property(String.class).convention(Architecture.current().dockerPlatform); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this change is going to have implications for the serverless build, we'll want to follow up with a fix there once this is merged.
|
||
tasks.register("deployFixtureDockerImages") { | ||
dependsOn tasks.withType(DockerBuildTask) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good.
x-pack/test/idp-fixture/build.gradle
Outdated
baseImages = ["openjdk:11.0.16-jre"] | ||
noCache = BuildParams.isCi | ||
tags = ["docker.elastic.co/elasticsearch-dev/idp-fixture:1.0"] | ||
getPush().set(BuildParams.isCi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be able to simplify this as push = BuildParams.isCI
// .expose(4443) | ||
.build() | ||
) | ||
new ImageFromDockerfile("es-idp-testfixture").withDockerfileFromBuilder(builder -> builder.from(DOCKER_BASE_IMAGE).build()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to use RemoteDockerImage
here instead. That should avoid building essentially an "empty" Dockerfile that just extends from the remote one.
|
||
.build() | ||
) | ||
new ImageFromDockerfile("es-openldap-testfixture").withDockerfileFromBuilder(builder -> builder.from(DOCKER_BASE_IMAGE).build()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before, we should use RemoteDockerImage
.
3511ae1
to
c6413b7
Compare
Pinging @elastic/es-delivery (Team:Delivery) |
No description provided.