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

CHEF-12417: Remove hab bldr job commands #9302

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

jasonheath
Copy link
Contributor

@jasonheath jasonheath commented Jul 9, 2024

Replaces hab bld job cmds with a message to contact account team

@jasonheath jasonheath self-assigned this Jul 9, 2024
Copy link

netlify bot commented Jul 9, 2024

👷 Deploy Preview for chef-habitat processing.

Name Link
🔨 Latest commit db9a465
🔍 Latest deploy log https://app.netlify.com/sites/chef-habitat/deploys/66a3ce2c091a3700085b9381

@jasonheath jasonheath force-pushed the jah/CHEF-12417_remove-hab-bldr-job-commands branch 2 times, most recently from 93a2eca to c878f7f Compare July 23, 2024 12:30
@jasonheath jasonheath force-pushed the jah/CHEF-12417_remove-hab-bldr-job-commands branch 3 times, most recently from d3a9186 to 9b365b3 Compare July 23, 2024 16:14
@jasonheath jasonheath marked this pull request as ready for review July 23, 2024 16:53
Copy link
Contributor

@agadgil-progress agadgil-progress left a comment

Choose a reason for hiding this comment

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

The code changes per se look okay. A couple of main comments (repeated a few times for each sub command) -

  1. Being a bit more explicit about unsupported features in the CLI help.
  2. We don't have to handle the options for individual job <subcommand>

components/hab/src/cli/hab.rs Outdated Show resolved Hide resolved
components/hab/src/cli/hab/bldr.rs Outdated Show resolved Hide resolved
components/hab/src/cli/hab/bldr.rs Outdated Show resolved Hide resolved
@@ -61,6 +64,9 @@ pub enum Job {
}

/// Get the status of one or more job groups
///
/// NOTICE: Public Builder Build Functions are no longer supported. Please reach
/// out to your account team if you were using these features.
#[derive(ConfigOpt, StructOpt)]
#[structopt(name = "status", no_version)]
pub struct JobStatus {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure whether these arguments make sense any more for example if one runs hab bldr job status, a user is shown CLI parsing error (which is not same as the NOTICE above). When this is anyways not supported, don't think we need to deal with these options anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed in daily and now noted in commit leaving these so that any scripting done leveraging these commands fail with the failure message instead of "missing option".

Copy link
Contributor

@agadgil-progress agadgil-progress Jul 29, 2024

Choose a reason for hiding this comment

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

I just tried locally something - and it works fine - If we change

#[structopt(name = "status", no_version)]

to

#[structopt(name = "demote", no_version, settings = &[AppSettings::ArgRequiredElseHelp])]

This avoids one round trip for user to get the NOTICE: ...

Sorry, I didn't know about this option before, I happened to come to know about this option while working on #9330.

I think it's a good idea to include that.

I am okay if you want to leave it as well.

components/hab/src/cli/hab/bldr.rs Outdated Show resolved Hide resolved
components/hab/src/cli/hab/bldr.rs Show resolved Hide resolved
components/hab/src/cli/hab/bldr.rs Outdated Show resolved Hide resolved
components/hab/src/cli/hab/bldr.rs Show resolved Hide resolved
components/hab/src/error.rs Show resolved Hide resolved
components/hab/src/cli/hab/bldr.rs Outdated Show resolved Hide resolved
@jasonheath jasonheath force-pushed the jah/CHEF-12417_remove-hab-bldr-job-commands branch 2 times, most recently from bfd6bfb to c12449c Compare July 26, 2024 16:15
- Adds a NOTICE to doc for the following commands
  - hab bldr
  - hab bldr job
- Prefixes REMOVED: to doc for the following subcommands
  - hab bldr job
  - hab bldr job {cancel,demote,promote,start,status}
- Removes implementation and returns error for these subcommands
  - hab bldr job {cancel,demote,promote,start,status}

These subcommands that had their implementation removed still require
their options to ensure that any scripting leveraging those subcommands
fail predictably with the messaging we've added.

Signed-off-by: Jason Heath <jh@jasonheath.com>
@jasonheath jasonheath force-pushed the jah/CHEF-12417_remove-hab-bldr-job-commands branch from c12449c to db9a465 Compare July 26, 2024 16:26
@jasonheath
Copy link
Contributor Author

So it's the CPP action that's failing on this. Pushing over that since there's no CPP in our project. Something we ought to fix at some point.

@jasonheath jasonheath merged commit 94f475e into main Jul 29, 2024
10 of 12 checks passed
@jasonheath jasonheath deleted the jah/CHEF-12417_remove-hab-bldr-job-commands branch September 16, 2024 13:30
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.

2 participants