Skip to content

Developers' Corner

Shreyas Bhat edited this page Nov 12, 2024 · 25 revisions

This page will contain extra notes for contributors to this repository.

Development workflow

Coming soon

Building a new jobsub_lite release

  1. Update the release notes (https://fifewiki.fnal.gov/wiki/Jobsub_lite_Release_notes)
  2. Ensure that you have the latest master branch. Assuming that the git remote here (https://github.com/fermitools/jobsub_lite) is called "upstream" in a developer's copy of the repository:
git fetch upstream
git checkout master
git merge --ff-only upstream/master

If the git merge fails, that means that the master branch on a developer's local machine and the upstream/master branch have diverged. The developer must either delete their local master branch and recreate it from upstream/master, or do these operations on a branch that's not master.

Make sure, as well, that you have the proper config submodule. Run

git submodule update

If you have the correct permissions for the jobsub_lite_config repo and ssh-agent running on your dev machine, it should checkout the proper commit of the submodule. You can check the currently-checked out submodule commit hash with git submodule status.

  1. Run unit tests
  2. In the Makefile in the root directory, change the version. This change will be picked up during the build process (controlled by the Makefile) by the appropriate files.
  3. From the root directory, run make. This will set the version correctly throughout the code according to the change made in the previous step, build the RPM, and clean up the build artifacts (aside from the RPM itself).
  4. Commit the change and tag the release

a. First, the config submodule:

cd jobsub_lite/config
git checkout main
git add spec/jobsub_lite.spec
git commit
git push origin main  # Assumes that no changes have been made to the git remote configuration locally

b. Next, the main repository:

cd jobsub_lite
git add config Makefile lib/version.py 
git commit
git push upstream master    # direct push to upstream, since we're changing the version number and nothing else.  Only maintainers of upstream can do this step
git tag <version>
git push upstream <TAG>  # direct push to upstream.  Again, only maintainers can do this
  1. Create a release using github's Releases feature. Make sure to include the release notes (they should be identical to the fifewiki release notes).

  2. At this point, if you need to create an RPM on a different platform (for example, if the previous steps were done on an SL7 machine, and you need to create an AL9 RPM):

a. Navigate to that machine, and pull down the new code changes:

cd jobsub_lite
git fetch upstream
git checkout master
git merge --ff-only upstream/master
git submodule update

b. After verifying that git has checked out the correct commit for the submodule, run make from the root directory, as in step 4 to create the RPM.

  1. Deploy the RPM(s) wherever necessary (the RPM repository, test machines, etc.)