Skip to content

Conversation

@ghukill
Copy link
Contributor

@ghukill ghukill commented Sep 6, 2024

Purpose and background context

This PR introduces the first real CLI command init-job that is used to initialize a new job:

  • require job-directory argument to know where to create new job
  • require "A" and "B" git commit SHAs of Transmogrifier to build images
  • run core.init_job function to create new job
  • run core.build_ab_images to create new images based on A/B commit SHAs

How can a reviewer manually see the effects of these changes?

pipenv run abdiff --verbose init-job \
-d output/hello-world \
-m "Hello World" \
-a 395e612f8887b279ccf35363694bafb06ef9a25a \
-b 1910426fbcc98e098de222ccdcce3cf3ac1337e7

This should:

  • create a new directory at output/hello-world
  • build two images of Transmog for the SHAs provided
    • can confirm from terminal with docker images | grep "transmogrifier-hello-world"
  • log the contents of job.json

Re-running the command without any modification should return:

Error: Job directory already exists: 'output/hello-world', cannot create new job.

Includes new or updated dependencies?

NO

Changes expectations for external applications?

NO

What are the relevant tickets?

Developer

  • All new ENV is documented in README
  • All new ENV has been added to staging and production environments
  • All related Jira tickets are linked in commit message(s)
  • Stakeholder approval has been confirmed (or is not needed)

Code Reviewer(s)

  • The commit message is clear and follows our guidelines (not just this PR message)
  • There are appropriate tests covering any new functionality
  • The provided documentation is sufficient for understanding any new functionality introduced
  • Any manual tests have been performed or provided examples verified
  • New dependencies are appropriate or there were no changes

Why these changes are being introduced:

The CLI is the primary interface for this application.  We need
a command that will initialize a new "job", where future CLI commands
can then perform "runs" of.

How this addresses that need:
* Reworks CLI to for main group, callbacks, and debug ping command
* Adds new init-job command
* Updates README

Side effects of this change:
* CLI can create new jobs

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/TIMX-345
Copy link
Contributor

@ehanson8 ehanson8 left a comment

Choose a reason for hiding this comment

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

Great work, just 2 suggestions

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10793417875

Details

  • 35 of 35 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.2%) to 97.647%

Totals Coverage Status
Change from base Build 10740174227: 1.2%
Covered Lines: 166
Relevant Lines: 170

💛 - Coveralls

@ehanson8
Copy link
Contributor

Approval stands

@ghukill ghukill merged commit f15a620 into main Sep 11, 2024
@ghukill ghukill deleted the TIMX-345-cli-init-job branch September 25, 2024 18:25
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.

4 participants