cms-git-tools icon indicating copy to clipboard operation
cms-git-tools copied to clipboard

Add bash completion for `git cms-addpkg`

Open fwyzard opened this issue 1 year ago • 2 comments

The completion is available for both git-cms-addpkg and git cms-addpkg.

fwyzard avatar Jun 22 '24 23:06 fwyzard

A new Pull Request was created by @fwyzard for branch master.

@cmsbuild, @iarspider, @smuzaffar, @aandvalenzuela can you please review it and eventually sign? Thanks. @sextonkennedy, @antoniovilela, @rappoccio you are the release manager for this. cms-bot commands are listed here

cmsbuild avatar Jun 22 '24 23:06 cmsbuild

cms-bot internal usage

cmsbuild avatar Jun 22 '24 23:06 cmsbuild

@fwyzard , sorry I missed this.

I have tested it locally and it works fine if I have already done it git cms-init and I am in src directory. As all git-cms tools are suppose to work under cmsenv so may be if one is not under src then first do a cd $CMSSW_BASE ?

smuzaffar avatar Sep 25 '24 07:09 smuzaffar

As all git-cms tools are suppose to work under cmsenv so may be if one is not under src then first do a cd $CMSSW_BASE ?

Good point.

fwyzard avatar Sep 25 '24 07:09 fwyzard

Also can you please move it under share/etc/profile.d/S99cms-git-tools-completion.sh . Then we can just rsync this share/etc/profile.d to /cvmfs/cms.cern.ch/share/etc/profile.d which contains the scripts automatically sources by cmsset_default.sh

smuzaffar avatar Sep 25 '24 07:09 smuzaffar

Just to double check, I should create a new directory share/etc/profile.d/ and move the file there, correct ?

fwyzard avatar Sep 25 '24 11:09 fwyzard

Pull request #127 was updated.

cmsbuild avatar Sep 25 '24 12:09 cmsbuild

Just to double check, I should create a new directory share/etc/profile.d/ and move the file there, correct ?

yes, that is correct. By the way, does this work for CentOs7 ? I get strange results when run under cc7 releases ( may be it is git or bash version issue)

smuzaffar avatar Sep 25 '24 12:09 smuzaffar

I've made three changes:

  • moved the script to share/etc/profile.d/S99cms-git-tools-completion.sh;
  • if $CMSSW_BASE is defined and $CMSSW_BASE/src/.git exists, take the list of packages from Git;
  • otherwise, if $CMSSW_RELEASE_BASE is defined and $CMSSW_RELEASE_BASE/src exists, take the list of packages from the release area.

fwyzard avatar Sep 25 '24 12:09 fwyzard

From a quick test on CentOS 7.9 (in a cmssw-el7 container), the completion for git-cms-addpkg is working, while the completion for git cms-addpkg does not work.

But I don't get any completion for any of the native git commands, either.

fwyzard avatar Sep 25 '24 12:09 fwyzard

please test

fwyzard avatar Sep 25 '24 13:09 fwyzard

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b7626f/41744/summary.html COMMIT: df187cc63a0071dc1bb71e2d38d6ab5fb6049077 CMSSW: CMSSW_14_2_X_2024-09-24-2300/el8_amd64_gcc12 User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cms-git-tools/127/41744/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

  • @cms-sw cms-sw/cmsdist#9434

You can see more details here: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b7626f/41744/git-recent-commits.json https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b7626f/41744/git-merge-result

Comparison Summary

Summary:

  • You potentially added 16 lines to the logs
  • Reco comparison results: 8 differences found in the comparisons
  • DQMHistoTests: Total files compared: 44
  • DQMHistoTests: Total histograms compared: 3331070
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3331044
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 119.2900000000001 KiB( 43 files compared)
  • DQMHistoSizes: changed ( 1000.0,... ): 1.715 KiB OfflinePV/Alignment
  • DQMHistoSizes: changed ( 12834.0,... ): 5.430 KiB HLT/Vertexing
  • DQMHistoSizes: changed ( 24834.911,... ): 3.590 KiB HLT/Vertexing
  • Checked 193 log files, 163 edm output root files, 44 DQM output files
  • TriggerResults: no differences found

cmsbuild avatar Sep 25 '24 17:09 cmsbuild

+externals

this needs to be tested via cmsdist PR (with changes to deploy this new script)

smuzaffar avatar Sep 26 '24 08:09 smuzaffar

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @antoniovilela, @sextonkennedy, @rappoccio, @mandrenguyen (and backports should be raised in the release meeting by the corresponding L2)

cmsbuild avatar Sep 26 '24 08:09 cmsbuild