Skip to content

Minor grammar fix on Pilot.JobCleanerQueuesExcluded - #1046

Merged
brandur merged 1 commit into
masterfrom
brandur-minor-grammar-fix
Sep 28, 2025
Merged

Minor grammar fix on Pilot.JobCleanerQueuesExcluded#1046
brandur merged 1 commit into
masterfrom
brandur-minor-grammar-fix

Conversation

@brandur

@brandur brandur commented Sep 27, 2025

Copy link
Copy Markdown
Contributor

There was an extra word before ("as") that made this doc's grammar
wrong, but it was also just written in such a way that it was difficult
to parse. Here, do a bit of a rewrite as a fix up.

@brandur
brandur requested a review from bgentry September 27, 2025 16:14
Comment thread rivershared/riverpilot/pilot.go Outdated
Comment on lines +22 to +24
// JobCleanerQueuesExcluded returns queues that should be excluded from the
// main River client's JobCleaner. Empty omitted queues should return nil as
// instead of empty array.
// main River client's JobCleaner. If no queues should be omitted, this
// function should return nil as opposed to an empty array.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What's the difference in behavior if I do return an empty array? Maybe worth spelling out if anything but I would expect any logic depending on this to consider them equivalent?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

K I added a little more text to that.

The reason is that we check on empty in the underlying database query and unlike Go, a null array and a zero-length array or not equivalent in Postgres. We could check on both those conditions, but I figured it'd be better to constrain our expectations so we don't pollute the SQL that much.

There was an extra word before ("as") that made this doc's grammar
wrong, but it was also just written in such a way that it was difficult
to parse. Here, do a bit of a rewrite as a fix up.
@brandur
brandur force-pushed the brandur-minor-grammar-fix branch from ae5f376 to b578da3 Compare September 28, 2025 16:58
@brandur
brandur merged commit c8beda5 into master Sep 28, 2025
10 checks passed
@brandur
brandur deleted the brandur-minor-grammar-fix branch September 28, 2025 17:02
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