Repository navigation
deprecate: --cartesian and --use-reservation warn instead of doing nothing - #699
Merged
Merged
Conversation
…thing Both were parsed into globals nothing read: accepted, no effect, no word about it. Neither is implemented, deliberately. The cartesian product already exists as the param file's grid: key, and the input --cartesian implies (a repeatable --param lr=0.1,0.2) does not exist — --params is inline JSON that fails closed, and params: is already a list of complete sets with no lists to cross. --reservation-id supersedes --use-reservation. Corrects my own #674 text, which claimed --cartesian 'silently produces the wrong run count'. It does not; with a param file the count comes from params:/grid: and the flag is inert. Over-stated, corrected on the issue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #674. Fixes #675.
Both flags were parsed into package globals that nothing read — accepted, no effect, no warning. Found by #688's wiring gate.
Neither should be implemented, and #674's premise was partly mine to correct
I filed #674 claiming
--cartesian"silently produces the wrong run count" and ranked it the costliest of the three unwired flags. That was wrong, and I've corrected it on the issue. With a param file the run count comes fromparams:/grid:; the flag is simply inert, with no alternate interpretation to produce. What's true is narrower: it advertises a capability, does nothing, and says nothing.Looking at what it would actually cross:
grid:key (pkg/params.expandGrid) — named value lists in, one param set per combination out, with sorted-key iteration so sweep indexes are deterministic.--cartesianimplies, a repeatable--param lr=0.1,0.2, does not exist.--paramsis inline JSON and returnsinline --params not yet implemented, use --param-file for now— fails closed with a clear message, so that one is already honest.params:in a file is a list of complete sets, so there are no lists to cross.Implementing it would add a second way to do what
grid:does, for an input format that doesn't exist.--reservation-id(#216) likewise already supersedes--use-reservationand is wired through toRunInstances'CapacityReservationSpecification.So both are deprecated toward the thing that works:
Deprecated rather than deleted, following the
--subnet/--security-group/--key-pairprecedent: existing scripts keep working, but with a warning instead of silence.--use-reservationis the one I'd most want warned about — it reads as "draw on the capacity I already pay for" and delivered an on-demand instance at on-demand price.Manifests updated
Both stay in
knownUnwiredFlags(they are still read by nothing, which is the honest state) with the reason now recorded as deliberately not implemented rather than to be fixed. InsweepFlagCoveragethey move fromsweepKnownGaptosweepNA— a deprecated inert flag is not a sweep gap to chase.That leaves
--vpc(#673) as the only genuinely unwired flag with real consequences: it has noLaunchConfigfield at all, sospawn launch --vpc vpc-xxxsilently launches in the default VPC. That one needs implementing, not deprecating, and it is next.Gates
gofmt -lempty,go vet ./...,go test -short ./...,make check-docs(regenerated), changelog gate,semgrep→ 0 findings. Warnings verified against a real built binary.