-
Notifications
You must be signed in to change notification settings - Fork 111
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
aws-test: Drop need for parameters, just use latest/ #312
aws-test: Drop need for parameters, just use latest/ #312
Conversation
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.
Do we care about the ability to rerun tests on an image, like when it fails due to flakes?
@@ -216,7 +216,7 @@ node(NODE) { | |||
string(credentialsId: params.AWS_CI_ACCOUNT, variable: 'AWS_CI_ACCOUNT'), | |||
]) { | |||
sh """ | |||
amijson=${dirpath}/aws-${AWS_REGION}-smoketested.json | |||
amijson=${dirpath}/aws-${AWS_REGION}.json |
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.
Hmm, we decided to add the smoketested
tag since we run rhcos.basic
tests in the cloud job before we generate the ami, thus the generated image should at least boot, can ssh, etc. I'm ok with changing it, but that's the original reasoning we had behind it.
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.
Since we don't upload it at all if it doesn't pass the smoketest, I think I'm OK with omitting it. Kinda bikeshed though, I'm fine keeping it if someone feels strongly about it.
currentBuild.description = "version=${version} ami=${ami_intermediate}" | ||
sh """ | ||
# Do testing with intermediate aws image passed in by cloud job | ||
if ! kola -b rhcos -p aws --aws-type ${aws_type} --tapfile rhcos-aws.tap --aws-ami ${ami_intermediate} --aws-region ${AWS_REGION} -j ${NUM_VMS} run; then | ||
if ! kola -b rhcos -p aws --aws-type t2.small --tapfile rhcos-aws.tap --aws-ami ${ami_intermediate} --aws-region ${AWS_REGION} -j ${NUM_VMS} run; then |
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 wanted to keep the configurable for potential future use, but again I'm ok with changing it to be hard defined to simplify things
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.
Ahh OK, in that case we can make it a proper parameter. Though until then, I'd rather not make define_properties()
more complex until we need it?
Hmm, not sure. If the test fails, we can just rerun it, right? Sure, the |
Jenkinsfile.aws-test
Outdated
try { | ||
utils.inside_assembler_container("-v /srv:/srv") { | ||
stage("Sync In") { | ||
withCredentials([ | ||
string(credentialsId: params.ARTIFACT_SERVER, variable: 'ARTIFACT_SERVER'), | ||
sshUserPrivateKey(credentialsId: params.ARTIFACT_SSH_CREDS_ID, keyFileVariable: 'KEY_FILE'), | ||
]) { | ||
dirpath = "${images}/cloud/latest" | ||
sh "mkdir -p ${dirpath}" | ||
utils.rsync_file_in(ARTIFACT_SERVER, KEY_FILE, "${dirpath}/meta.json") |
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.
Doing things like this is going to trigger the problems I was trying to solve with #211 right?
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 could adapt it when we adapt the rest of this script, no? E.g. we could just rsync
to the workspace instead of /srv
. Or I might be misunderstanding what you mean.
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.
This job wouldn't be too hard to rework without /srv
given that we're only syncing tiny JSON files. Let's do that in a follow-up patch?
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.
As is today it adds a risk that we'll clobber a meta.json
built by the cloud job right?
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're only rsync'ing out to one location though, right? (${images}/aws-${AWS_REGION}-tested.json
). And that file is owned by this job.
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're rsyncing in to the same path though.
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.
Ohh sigh, yes I see it now. OK, will take a look at it tomorrow.
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.
OK, whipped something up in ⬇️. The delta is now larger though... so I'll have to test this after all.
a4e3734
to
4901a51
Compare
Rebased to resolve conflicts! ⬆️ |
I like these changes 😄 LGTM |
/hold |
I found it misleading that the `cloud` job uploaded the AMI JSON metadata with `-smoketested.json` appended *before* it was even tested. Let's make this clearer by keeping that suffix off until it's actually true.
Get rid of the need to pass parameters to the `aws-test` job in preparations for turning on `keepUndefinedParameters=true` in the Jenkins instance. We only every run the `aws-test` job from the `cloud` job, so we know at that point that the latest output is in `latest/`. We can just resolve that back to a specific versioned dir before proceeding. This normalizes the `aws-test` job to take the exact same parameters as the others, and makes it easy to e.g. run the job manually like the others.
We shouldn't `rsync` to the shared `/srv` location. Just sync directly to our `WORKSPACE` to avoid races. See also openshift#211.
77a0490
to
a5a1f58
Compare
OK, rebased and tested, modulo the bits that actually push out to AWS/artifact server! |
OK let's give it a try! /lgtm |
Minor regression from openshift#312. We no longer copy this file in `/srv` now, we upload it directly from our workspace.
I had a question about this. We could instead add parameters to the test job, and if we wanted to retest, we'd use "rebuild last" instead of just "rebuild" which should pass the exact same parameters - right? |
I assume the key parameter is just the |
Yeah, basically this whole PR tried to solve the need for parameters by completely nixing them. We could've also made them explicit parameters only for the |
Get rid of the need to pass parameters to the
aws-test
job inpreparations for turning on
keepUndefinedParameters=true
(edit:false
, nottrue
!) in theJenkins instance.
We only every run the
aws-test
job from thecloud
job, so we know atthat point that the latest output is in
latest/
. We can just resolvethat back to a specific versioned dir before proceeding.
This normalizes the
aws-test
job to take the exact same parameters asthe others, and makes it easy to e.g. run the job manually like the
others.
See thread for context.
(Untested)