microsoft / microsoft/lage

lage should fail on invalid commands, args and arg values

Open
#105 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
816
Forks
88
PR merge metrics
No merged PRs in 30d

Description

We had a recent ADO Tools failure that was passing garbage args to lage like:

lage info build ut --since refs/remotes/origin/master##vso[task.debug]Exit code 0 received from tool '/bin/bash' --production --verbose --grouped

However, lage seems to be too lenient with garbage / invalid, resulting in "false positives":

info Lage task runner - let's make it
verb filterPackages changed: 
verb filterPackages running with dependents
info 🏗 Summary
info 
info Nothing has been run.
info ----------------------------------------------
info Took a total of 0.14s to complete
Done in 0.79s.

This allows PRs that didn't build or run tests to appear to be "passing" but then broke master after merge.

I think lage should fail harder on invalid commands and args to both prevent CI from generating "false positives" and also more clearly highlight issues with tools, like this ADO tool issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the invalid lage info build ut --since ... command shown in the issue and trace its command-line argument handling. The change is done when invalid commands, arguments, and argument values cause a nonzero exit instead of reporting successful completion; no files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.