Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

feat: orb version command #741

Merged
merged 1 commit into from
Dec 4, 2023
Merged

feat: orb version command #741

merged 1 commit into from
Dec 4, 2023

Conversation

cdata
Copy link
Collaborator

@cdata cdata commented Dec 4, 2023

This change proposes a new orb version command to help us track which version of the CLI is in use. It uses the vergen crate, which captures build-relevant environment information for later use in the final binary.

The output of the new command has two levels of verbosity. Simple:

❯ orb version
0.15.4

And verbose:

❯ orb version --verbose
             Version (  orb): 0.15.4
                Date (build): 2023-11-16
           Timestamp (build): 2023-11-16T21:48:24.943980651Z
               Debug (cargo): true
            Features (cargo): default
           Opt Level (cargo): 0
       Target Triple (cargo): x86_64-unknown-linux-gnu
              Branch (  git): fix/make-orb-render-good
 Commit Author Email (  git): 0xcda7a@gmail.com
  Commit Author Name (  git): Chris Joel
        Commit Count (  git): 475
         Commit Date (  git): 2023-11-16
      Commit Message (  git): feat: `orb version` command
    Commit Timestamp (  git): 2023-11-16T13:37:32.000000000-08:00
            Describe (  git): 63588c9
                 SHA (  git): 63588c908e8fee4359e0268e1aa3062ed9849001

Copy link
Contributor

@jsantell jsantell left a comment

Choose a reason for hiding this comment

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

LGTM! Related: #669 -- does the "feature" line include features used during the whole build, or only ones used by noosphere-cli?

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Test flake analysis

status platform features toolchain
🟢 ubuntu-latest test-kubo,headers,rocksdb stable
🟡 ubuntu-latest test-kubo,headers nightly
🟡 macos-13 test-kubo,headers,rocksdb stable
🟡 macos-13 test-kubo,headers stable
🟢 ubuntu-latest test-kubo,headers stable
🟢 windows-latest test-kubo,headers stable

Flake summary for ubuntu-latest, test-kubo,headers, nightly

     Summary [  44.781s] 176 tests run: 176 passed (1 flaky), 1 skipped
   FLAKY 2/6 [  16.877s] noosphere::distributed_stress multiplayer::orb_can_render_peers_in_the_sphere_address_book

Flake summary for macos-13, test-kubo,headers,rocksdb, stable

     Summary [  70.234s] 175 tests run: 175 passed (1 flaky), 1 skipped
   FLAKY 2/6 [   1.835s] noosphere-ns dht::node::test::test_dhtnode_bootstrap

Flake summary for macos-13, test-kubo,headers, stable

     Summary [  86.178s] 176 tests run: 176 passed (1 slow, 1 flaky), 1 skipped
   FLAKY 2/6 [   1.785s] noosphere-ns dht::node::test::test_dhtnode_bootstrap

@cdata
Copy link
Collaborator Author

cdata commented Dec 4, 2023

Running with extra features from CLI:

❯ cargo run --features rocksdb -p noosphere-cli -- version --verbose
             Version (  orb): 0.16.0
                Date (build): 2023-12-04
           Timestamp (build): 2023-12-04T22:06:19.231800853Z
               Debug (cargo): true
            Features (cargo): default,rocksdb
           Opt Level (cargo): 0
       Target Triple (cargo): x86_64-unknown-linux-gnu
              Branch (  git): feat/orb-version-command
 Commit Author Email (  git): 0xcda7a@gmail.com
  Commit Author Name (  git): Chris Joel
        Commit Count (  git): 486
         Commit Date (  git): 2023-12-04
      Commit Message (  git): feat: `orb version` command
    Commit Timestamp (  git): 2023-12-04T09:07:32.000000000-08:00
            Describe (  git): f5d72b1
                 SHA (  git): f5d72b1efb5bdbbf1f4e62143a2a5f467bc50ec6

As for features activated in dependencies, I don't think those are reflected in these environment settings because they can be inferred.

@cdata cdata merged commit 608774e into main Dec 4, 2023
22 checks passed
@cdata cdata deleted the feat/orb-version-command branch December 4, 2023 22:11
@github-actions github-actions bot mentioned this pull request Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants