Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new deployment metadata to table #987

Merged
merged 2 commits into from
Jun 23, 2023

Conversation

Fuzzicles
Copy link
Contributor

Description of change

I added the new git_* fields to the table output of cargo shuttle deployment list.

Closes #981

How has this been tested? (if applicable)

I created a new project via the rocket example and made local changes to check that the git_dirty field rendered correctly, and that truncating the commit ID and message worked as intended. I also created some deployments with a version prior to the addition of the new metadata to make sure the Option values correctly displayed No Data in the table.

Copy link
Contributor

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

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

Thanks @Fuzzicles ! Just a small comment.

common/src/models/deployment.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

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

Sorry for the late review @Fuzzicles ! We're a bit low on review resources because we have some competing priorities coming from a bigger release and an upcoming offsite.

Other than this, the PR is very close.

common/src/models/deployment.rs Show resolved Hide resolved
Copy link
Contributor

@iulianbarbu iulianbarbu left a comment

Choose a reason for hiding this comment

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

Just have to test it, looks good to me!

common/src/models/deployment.rs Show resolved Hide resolved
@jonaro00
Copy link
Member

@Fuzzicles Looking good on my side.

There could be cases where user has a very long branch name etc, but overall this is good. The upcoming ULID's will also make this prettier :D

(For @iulianbarbu) Here are some views of the table at different terminal widths:

Most recent deployments for jonaro00-test
╭────────┬────────┬────────┬───────┬───────┬───────┬───────╮
│ Deploy ┆ Status ┆  Last  ┆ Commi ┆ Commi ┆ Branc ┆ Dirty │
│  ment  ┆        ┆ update ┆  t ID ┆ t Mes ┆   h   ┆       │
│   ID   ┆        ┆    d   ┆       ┆  sage ┆       ┆       │
╞════════╪════════╪════════╪═══════╪═══════╪═══════╪═══════╡
│ d453bc ┆ crashe ┆ 2023-0 ┆ a236f ┆ 12345 ┆ maste ┆  true │
│ 25-cad ┆    d   ┆ 6-21T2 ┆ 19    ┆ 67890 ┆ r     ┆       │
│ b-492a ┆        ┆ 3:30:1 ┆       ┆ 12345 ┆       ┆       │
│ -8af5- ┆        ┆   7Z   ┆       ┆ 67890 ┆       ┆       │
│ 9e8a39 ┆        ┆        ┆       ┆ 1234  ┆       ┆       │
│ 689039 ┆        ┆        ┆       ┆       ┆       ┆       │
├╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
│ 1292f4 ┆ runnin ┆ 2023-0 ┆ caddf ┆ stuff ┆ maste ┆  true │
│ 85-bee ┆    g   ┆ 6-21T2 ┆ e3    ┆       ┆ r     ┆       │
│ 3-433a ┆        ┆ 3:14:3 ┆       ┆       ┆       ┆       │
│ -80f1- ┆        ┆   3Z   ┆       ┆       ┆       ┆       │
│ 7ad66f ┆        ┆        ┆       ┆       ┆       ┆       │
│ 3bc562 ┆        ┆        ┆       ┆       ┆       ┆       │
╰────────┴────────┴────────┴───────┴───────┴───────┴───────╯

Most recent deployments for jonaro00-test
╭───────────────────────────────┬─────────┬──────────────────────┬───────────┬──────────────────────────┬────────┬───────╮
│         Deployment ID         ┆  Status ┆     Last updated     ┆ Commit ID ┆      Commit Message      ┆ Branch ┆ Dirty │
╞═══════════════════════════════╪═════════╪══════════════════════╪═══════════╪══════════════════════════╪════════╪═══════╡
│ d453bc25-cadb-492a-8af5-9e8a3 ┆ crashed ┆ 2023-06-21T23:30:17Z ┆ a236f19   ┆ 123456789012345678901234 ┆ master ┆  true │
│ 9689039                       ┆         ┆                      ┆           ┆                          ┆        ┆       │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┤
│ 1292f485-bee3-433a-80f1-7ad66 ┆ running ┆ 2023-06-21T23:14:33Z ┆ caddfe3   ┆ stuff                    ┆ master ┆  true │
│ f3bc562                       ┆         ┆                      ┆           ┆                          ┆        ┆       │
╰───────────────────────────────┴─────────┴──────────────────────┴───────────┴──────────────────────────┴────────┴───────╯

Most recent deployments for jonaro00-test
╭─────────────────────────────────────────┬────────────┬─────────────────────────┬──────────────┬────────────────────────────┬──────────┬─────────╮
│              Deployment ID              ┆   Status   ┆       Last updated      ┆   Commit ID  ┆       Commit Message       ┆  Branch  ┆  Dirty  │
╞═════════════════════════════════════════╪════════════╪═════════════════════════╪══════════════╪════════════════════════════╪══════════╪═════════╡
│ d453bc25-cadb-492a-8af5-9e8a39689039    ┆   crashed  ┆   2023-06-21T23:30:17Z  ┆ a236f19      ┆ 123456789012345678901234   ┆ master   ┆   true  │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤
│ 1292f485-bee3-433a-80f1-7ad66f3bc562    ┆   running  ┆   2023-06-21T23:14:33Z  ┆ caddfe3      ┆ stuff                      ┆ master   ┆   true  │
╰─────────────────────────────────────────┴────────────┴─────────────────────────┴──────────────┴────────────────────────────┴──────────┴─────────╯

@oddgrd oddgrd merged commit fa8056a into shuttle-hq:main Jun 23, 2023
28 of 29 checks passed
AlphaKeks pushed a commit to AlphaKeks/shuttle that referenced this pull request Jul 21, 2023
* feat: add new deployment metadata to table

* refactor: review comment

---------

Co-authored-by: Grant Lorello <grant.lorello@msn.com>
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.

[Improvement]: Show deployment metadata in deployment table
4 participants