ceph-build icon indicating copy to clipboard operation
ceph-build copied to clipboard

DNM: Combine ceph-pull-requests and API jobs

Open djgalloway opened this issue 4 years ago • 17 comments

A couple notes:

  • I'm open to changing the job name (friendly name and otherwise)
  • I'm just disabling the existing/separate make check & API jobs for now. Will delete in the future if we're happy with the new "pipeline"

djgalloway avatar Sep 15 '20 13:09 djgalloway

@djgalloway as this is causing some fuss in other teams, for the soak testing period, can we just make it run for dashboard-labeled PRs? Thanks!

epuertat avatar Sep 16 '20 08:09 epuertat

@djgalloway as this is causing some fuss in other teams, for the soak testing period, can we just make it run for dashboard-labeled PRs? Thanks!

Or why don't we just merge as-is and tweak it after the fact?

djgalloway avatar Sep 16 '20 12:09 djgalloway

@jdurgin @neha-ojha are y'all okay with merging this PR?

This will disable the ceph-pull-requests and ceph-pr-api jobs in Jenkins. It will change the GitHub Check names to ceph PR - make check and ceph PR - API tests.

The API tests require running make before them so we were essentially running make twice for each PR wasting time and resources.

djgalloway avatar Sep 17 '20 12:09 djgalloway

@djgalloway something I just realized: and I don't wanna sound like a killjoy, but it'll 'slightly' increment the time taken to finish (10-15 min), as here make check unit tests and API tests are running sequentially. I guess there's no way to run jobs in parallel without saving artifacts?

epuertat avatar Sep 17 '20 17:09 epuertat

@djgalloway something I just realized: and I don't wanna sound like a killjoy, but it'll 'slightly' increment the time taken to finish (10-15 min), as here make check unit tests and API tests are running sequentially. I guess there's no way to run jobs in parallel without saving artifacts?

I'm sure there probably is. I'm guessing that's where the Pipeline would come in handy. So it'd be:

Phase 1: make Phase 2 and 3 (simultaneous): Unit Tests and API tests ?

djgalloway avatar Sep 17 '20 18:09 djgalloway

Sounds good to go to me. We can further improve in future PRs. Reducing the resources by nearly half seems worth merging sooner than later to me.

jdurgin avatar Sep 17 '20 21:09 jdurgin

@jdurgin @neha-ojha are y'all okay with merging this PR?

I have no objections.

This will disable the ceph-pull-requests and ceph-pr-api jobs in Jenkins. It will change the GitHub Check names to ceph PR - make check and ceph PR - API tests.

The API tests require running make before them so we were essentially running make twice for each PR wasting time and resources.

neha-ojha avatar Sep 17 '20 21:09 neha-ojha

Alright, well, I'm on PTO tomorrow so Monday I guess.

djgalloway avatar Sep 17 '20 22:09 djgalloway

@djgalloway just started to experiment with pipelines (https://github.com/ceph/ceph/pull/37265) and it seems it might not require too much rework...

epuertat avatar Sep 21 '20 08:09 epuertat

@djgalloway just started to experiment with pipelines (ceph/ceph#37265) and it seems it might not require too much rework...

Okay. Are we going that route instead, then?

djgalloway avatar Sep 22 '20 14:09 djgalloway

Okay. Are we going that route instead, then?

I guess the multibranch pipeline should be enable on ceph/ceph, and that configuration could still be a jenkins-job-builder YAML file, right? I personally hate the groovy-based syntax of the Jenkinsfile, but I've seen a couple of projects ([1], [2]) to bring YAML support to them.

What do you think?

BTW, I created a pipeline job (epuertat-test-ceph-pipeline), but was... somehow deleted...

epuertat avatar Sep 22 '20 20:09 epuertat

Okay. Are we going that route instead, then?

I guess the multibranch pipeline should be enable on ceph/ceph, and that configuration could still be a jenkins-job-builder YAML file, right? I personally hate the groovy-based syntax of the Jenkinsfile, but I've seen a couple of projects ([1], [2]) to bring YAML support to them.

What do you think?

My understanding is we'll need a small yaml file defining a pipeline job but that will pull in a groovy Jenkinsfile from ceph.git and ceph-ci.git. I'm fine with that if we can get it working. I didn't feel confident enough in my coding abilities to convert the ceph-pull-requests and ceph-api jobs into groovy so I did it this way.

BTW, I created a pipeline job (epuertat-test-ceph-pipeline), but was... somehow deleted...

Anytime something gets merged into https://github.com/ceph/ceph-build, a Jenkins job runs to update itself and deleted any jobs that aren't defined in this repo.

I would suggest logging in to Jenkins, getting an API key, and using jenkins-job-builder manually to test and upload your JJB YAMLs.

$ cat ~/.jenkins_jobs.jenkins.ceph.com.ini 
[jenkins]
user=GITHUB USERNAME
password=API KEY
url=https://jenkins.ceph.com

Here's the command I used to create/update/test/etc. the ceph-pr-combined job: jenkins-jobs --ignore-cache --conf ~/.jenkins_jobs.jenkins.ceph.com.ini update ceph-pr-combined/config/definitions/ceph-pr-combined.yml

djgalloway avatar Sep 22 '20 22:09 djgalloway

I would suggest logging in to Jenkins, getting an API key, and using jenkins-job-builder manually to test and upload your JJB YAMLs.

$ cat ~/.jenkins_jobs.jenkins.ceph.com.ini 
[jenkins]
user=GITHUB USERNAME
password=API KEY
url=https://jenkins.ceph.com

Thanks a lot @djgalloway ! Will try it and let you know.

epuertat avatar Sep 24 '20 08:09 epuertat

This can't be merged as-is anymore. Needs a rebase.

djgalloway avatar May 20 '21 19:05 djgalloway

@epuertat it pains me to still see us building Ceph binaries twice for every PR. What do you think about merging this next week?

djgalloway avatar Apr 01 '22 18:04 djgalloway

@epuertat it pains me to still see us building Ceph binaries twice for every PR. What do you think about merging this next week?

@djgalloway omd, completely forgot about this one! I'm totally supportive of this (as a later improvement, we should conditionally include the 'dashboard e2e' tests too). Do you have any recent run of this, to verify it works ok?

epuertat avatar Apr 04 '22 12:04 epuertat

Do you have any recent run of this, to verify it works ok?

Good call. Will test today.

djgalloway avatar Apr 04 '22 13:04 djgalloway