jobs: separate description from command#35439
Conversation
6da6ff3 to
604c61e
Compare
pkg/ui/src/views/jobs/index.tsx
Outdated
| <div> | ||
| <h3>Command</h3> | ||
| <pre className="job-detail">{job.description}</pre> | ||
| <pre className="job-detail">{job.command ? job.command : job.description}</pre> |
There was a problem hiding this comment.
nit: I think this could be simplified to job.command || job.description
604c61e to
65e8dd8
Compare
RaduBerinde
left a comment
There was a problem hiding this comment.
Updated to add the command column to SHOW JOBS as well. CC @knz
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @vilterp)
|
Docs for SHOW JOBS will need to be updated with the |
|
The code and overall change LGTM. I do have an issue with the word "command" though. You are introducing a new word without precedent throughout our product. Because you do that we'll have to handle a new type of question: "what's the difference between a command and a SQL statement?" In my opinion, until jobs can be defined to do more things than SQL, we should not use a new word. The word "Statement" or "Query" would be fine. |
|
I used |
|
Unless there was a good reason to choose "command" originally (I don't recall such a reason, but perhaps @piyush-singh or @vilterp recall), I'd recommend changing it yes. |
This change adds a `Statement` field to `jobspb.Payload` (and a corresponding `statement` column to `crdb_internal.jobs` and `SHOW JOBS`). The stats job now shows the internal statement in the expanded job view. If the statement isn't present, the description is assumed to be the command. Release note (sql change): SHOW JOBS now returns an extra `statement` column which is populated when the description is not the statement.
65e8dd8 to
f2c15e6
Compare
|
Done - renamed to "statement" everywhere. @vilterp let me know if the UI change is ok with you. |
celiala
left a comment
There was a problem hiding this comment.
Synced with @piyush-singh - 👍on using Statement over Command.
|
Thank you! bors r+ |
Build failed (retrying...) |
35439: jobs: separate description from command r=RaduBerinde a=RaduBerinde This change adds a `Command` field to `jobspb.Payload` (and a corresponding `command` column to `crdb_internal.jobs`). The stats job now shows the internal command in the expanded job view. If the command isn't present, the description is assumed to be the command. Release note: None Example:  Co-authored-by: Radu Berinde <radu@cockroachlabs.com>
Build succeeded |
In cockroachdb#35439, we introduced a user-friendly message (instead of the exact SQL statement) for automatic table stats. This commit uses the default font for that message, reserving the monospace font for just SQL text. Release note: None
In cockroachdb#35439, we introduced a user-friendly message (instead of the exact SQL statement) for automatic table stats. This commit uses the default font for that message, reserving the monospace font for just SQL text. Release note: None
35607: roachtest: Renenable SQLSmith roachtest r=BramGruneir a=BramGruneir Note that this is the original roachtest and not the re-written one. If we find that this one does not find any different issues, we should remove it entirely. But there is no harm in enabling it right now. Release note: None 35623: storage: enable follower_reads by default r=ajwerner a=ajwerner This PR enables storage level follower reads by default. Follower reads still will not be used for request routing without an enterprise license. Release note: None 35645: sql/sqlbase: fix TestEncDatumSize under go1.12 r=knz a=petermattis Fixes #35636. golang/go@bfc54bb reduced the memory usage of small big integers which in turn reduced the `EncDatum.Size()` for the decimal datum used in this test. Release note: None 35652: ui: remove monospace font for human-readable job description r=celiala a=celiala In #35439, we introduced a user-friendly message (instead of the exact SQL statement) for automatic table stats. This commit uses the default font for that message, reserving the monospace font for just SQL text. cc @rolandcrosby @piyush-singh  35654: roachtest: two easy changefeed test fixes r=nvanbenschoten a=danhhz See commits for details Co-authored-by: Bram Gruneir <bram@cockroachlabs.com> Co-authored-by: Andrew Werner <ajwerner@cockroachlabs.com> Co-authored-by: Peter Mattis <petermattis@gmail.com> Co-authored-by: Celia La <celia@cockroachlabs.com> Co-authored-by: Daniel Harrison <daniel.harrison@gmail.com>
This change adds a
Commandfield tojobspb.Payload(and acorresponding
commandcolumn tocrdb_internal.jobs). The stats jobnow shows the internal command in the expanded job view. If the
command isn't present, the description is assumed to be the command.
Release note: None
Example:
