Skip to content

Conversation

@larsks
Copy link
Member

@larsks larsks commented Mar 23, 2025

The --now option filters offers to those that have availability start
"right now". This supports the common use case of "I would like to lease a
machine at this moment".

@larsks larsks requested a review from tzumainn March 23, 2025 15:05
@tzumainn
Copy link
Contributor

I was about to say that it probably makes sense to ensure that we don't specify both --now and --availability-range - but now I wonder whether we should let users simply say --availability-range now?

@larsks
Copy link
Member Author

larsks commented Mar 24, 2025

but now I wonder whether we should let users simply say --availability-range now?

<whinge>But that's so much tyyyyyyyyping.</whinge>

How about we let users specify --availability-range now, but also allow --now as a shortcut? My argument is that this seems like a very common use case, and if we're not going to make it the default behavior we should at least make it as accessible as possible.

@tzumainn
Copy link
Contributor

but now I wonder whether we should let users simply say --availability-range now?

<whinge>But that's so much tyyyyyyyyping.</whinge>

How about we let users specify --availability-range now, but also allow --now as a shortcut? My argument is that this seems like a very common use case, and if we're not going to make it the default behavior we should at least make it as accessible as possible.

Hahahaha - actually that's fair! In that case, no need for --availability-range now; maybe just a check that a user hasn't specified both --availability-range and --now?

@larsks larsks force-pushed the feature/available-now branch from 1c7a244 to a967def Compare March 25, 2025 01:35
@larsks
Copy link
Member Author

larsks commented Mar 25, 2025

I've re-implemented this PR so that it really is shorthand for --availability-range $(date -Iseconds) 9999-12-31T00:00:00. Is that sufficient? There's no warning if you use both --now and --availability-range, because you could just as easily use --availability-range multiple times and we don't issue an error in that case.

Copy link
Contributor

@tzumainn tzumainn left a comment

Choose a reason for hiding this comment

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

Fair enough!

The `--now` option filters offers to those that have availability start
"right now". This supports the common use case of "I would like to lease a
machine at this moment".
@larsks larsks force-pushed the feature/available-now branch from a967def to 0ba1136 Compare March 25, 2025 12:30
@larsks larsks merged commit 3423f2c into master Mar 25, 2025
8 checks passed
@larsks larsks deleted the feature/available-now branch March 25, 2025 12:32
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.

3 participants