Skip to content
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

DNM: Combine ceph-pull-requests and API jobs #1657

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

djgalloway
Copy link

@djgalloway djgalloway commented Sep 15, 2020

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"

Copy link
Member

@epuertat epuertat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this quick PR, @djgalloway ! Looks perfect to me. Just added a few observations, but nothing blocking.

shallow-clone: true
wipe-workspace: true

## TODO: (maybe) I'm sure there's a cleaner/prettier way to do this. Maybe doing an actual Jenkins pipeline.
Copy link
Member

@epuertat epuertat Sep 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a great improvement in terms of resource usage, and Jenkins pipelines will definitely improve also the reporting of the different stages. If you need any help for a next PR, I'll gladly volunteer for helping bring pipelines into Ceph.

ceph-pr-combined/config/definitions/ceph-pr-combined.yml Outdated Show resolved Hide resolved
- job:
name: ceph-pr-combined
description: 'make check and ceph API tests combined'
project-type: freestyle
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this would imply much change to everything else, but we might keep the Jenkins Job Builder YAML syntax while introducing project-type: pipeline...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm sure in the future we can streamline this job by making pipeline. The two troubles I had with that were

  1. Ensuring all steps run on the same machine
  2. Having two separate "checks" in GitHub and having them get updated accordingly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

David Galloway added 2 commits September 15, 2020 15:30
This will run `make check` and then the Ceph API tests against the built binaries instead of us running `make` twice per PR then running API tests against one of those runs.

Signed-off-by: David Galloway <[email protected]>
Replaced by ceph-pr-combined

Signed-off-by: David Galloway <[email protected]>
Copy link
Member

@callithea callithea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks a lot, @djgalloway!

@epuertat
Copy link
Member

@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!

@djgalloway
Copy link
Author

@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
Copy link
Author

@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.

@epuertat
Copy link
Member

@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?

@djgalloway
Copy link
Author

@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 ?

@jdurgin
Copy link
Member

jdurgin commented Sep 17, 2020

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.

@neha-ojha
Copy link
Member

@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.

@djgalloway
Copy link
Author

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

@epuertat
Copy link
Member

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

@djgalloway
Copy link
Author

djgalloway commented Sep 22, 2020

@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?

@epuertat
Copy link
Member

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...

@djgalloway
Copy link
Author

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

@epuertat
Copy link
Member

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.

@djgalloway djgalloway changed the title Combine ceph-pull-requests and API jobs DNM: Combine ceph-pull-requests and API jobs May 20, 2021
@djgalloway
Copy link
Author

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

@djgalloway
Copy link
Author

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

@epuertat
Copy link
Member

epuertat commented Apr 4, 2022

@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?

@djgalloway
Copy link
Author

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

Good call. Will test today.

@djgalloway djgalloway changed the base branch from master to main May 25, 2022 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants