Skip to content

Generated gRPC pbs in Rust for interacting with IAM runtimes

License

Notifications You must be signed in to change notification settings

metal-toolbox/iam-runtime-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

There are 2 crates in this repo: builder and iam-runtime.

The builder is there to generate the protobuf code. It is not published. The generated code ends up in iam-runtime which is published as the iam-runtime-rs crate.

We separate it like this so that iam-runtime-rs does not need to be responsible for building itself, meaning crates which depend on iam-runtime-rs do not need to have protoc installed.

Prepare a new crate version

There is a Github Action which will run once a week to automatically bump the version if there is a new version of iam-runtime.

If you would like to trigger a bump ahead of schedule, navigate to the Action tab in Github. Select the Bump version workflow. On the right-hand side, select Run workflow.The action will check whether a new version exists on iam-runtim, fetch the protos for that version, build the code and open a PR.

When the action completes, review and merge the PR. After that you can trigger the Publish workflow.

Publish a new crate

After merging, navigate to the Action tab in Github. Select the Publish workflow. On the right-hand side, select Run workflow. This will publish a new crate. Verify that a new one exists on crates.io after the task has run.

Manual alternative

If either of the workflows do not work, here are the manual steps:

  1. Export the new version:

    export VERSION=0.0.0
    
  2. Run make build This will:

    • Fetch the proto definitions from iam-runtime, put them in ./builder/proto.
    • Bump the version number in Cargo.toml.
    • Generate the protobuf code.
    • Check that everything builds.
  3. Commit and push your changes.

  4. Get an API key from crates.io. If you are not a member of an owning team you will not be able to do the next steps.

  5. Login locally:

    cargo login
    # paste in your key when prompted
  6. Run make publish. This will:

    • Do a dry run of the crates.io publish
    • Publish the actual crate.
  7. Check the crate has been updated on crates.io

TODO

  • Automate the PR workflow whenever a new iam-runtime version is released
  • Remove the manual step of publishing

About

Generated gRPC pbs in Rust for interacting with IAM runtimes

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published