่ฟ™ๆ˜ฏindexlocๆไพ›็š„ๆœๅŠก๏ผŒไธ่ฆ่พ“ๅ…ฅไปปไฝ•ๅฏ†็ 
Skip to content

Conversation

@tangowithfoxtrot
Copy link
Contributor

๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/PM-13335

๐Ÿ“” Objective

Add Renovate managers so we can pin the Rust and Rust nightly toolchains in our workflows.

๐Ÿ“ธ Screenshots

image

โฐ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

๐Ÿฆฎ Reviewer guidelines

  • ๐Ÿ‘ (:+1:) or similar for great changes
  • ๐Ÿ“ (:memo:) or โ„น๏ธ (:information_source:) for notes or general info
  • โ“ (:question:) for questions
  • ๐Ÿค” (:thinking:) or ๐Ÿ’ญ (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • ๐ŸŽจ (:art:) for suggestions / improvements
  • โŒ (:x:) or โš ๏ธ (:warning:) for more significant problems or concerns needing attention
  • ๐ŸŒฑ (:seedling:) or โ™ป๏ธ (:recycle:) for future improvements or indications of technical debt
  • โ› (:pick:) for minor or nitpick changes

@tangowithfoxtrot tangowithfoxtrot changed the title add rust and rust-nightly managers PM-13335 - Pin Rust version and introduce Renovate Jan 17, 2025
},
"customDatasources": {
"rust-nightly": {
"defaultRegistryUrlTemplate": "https://renovate-rust-nightly.phi-ag.workers.dev/"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is using a community-made Cloudflare worker. The source for it is here.

It would probably be ideal if we hosted our own for the sake of reliability. Thoughts?

Copy link
Contributor

@withinfocus withinfocus left a comment

Choose a reason for hiding this comment

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

Can we avoid the nightly support? Do we really need that? Seems unadvisable, and then we avoid custom datasources.

In parallel, if custom datasources are truly needed, I would think that's an investment to be proposed with Mend themselves and for it to become a first-class datasource that I have seen added via community contributions in the past (and not some Cloudflare worker that I don't support us using or implementing).

@tangowithfoxtrot
Copy link
Contributor Author

@withinfocus I'd also prefer to avoid nightly toolchains, but the linting/formatting features we use, a tool we use to detect unused dependencies, and some rustdoc features all require usage of features that are not allowed on stable Rust toolchains.

There is an open PR for Renovate to support managing stable Rust toolchains via the rust-toolchain.toml file, but that still wouldn't handle our need for managing the nightly toolchains.

@withinfocus
Copy link
Contributor

I pinged the Renovate PR author to see if we can help there.

Given my lack of Rust experience, can you show me what a Renovate PR would look like here? I see uses of certain versions in Cargo files but also stable, and for the nightly usages it's just nightly ... I don't know what this will create really.

@tangowithfoxtrot
Copy link
Contributor Author

@withinfocus Sure! Here's a rust-nightly PR and a rust PR.

We're currently just invoking nightly as +nightly, but in order to use a pinned version, you would do this: +nightly-YYYY-MM-DD. The Renovate PRs would just update the date string for us.

Both the stable and nightly releases would be handled from a new rust-toolchain.toml file in the repo root. I probably should have mentioned that in my previous comment ๐Ÿ˜…

The rust-version defined in our Cargo file refers to the MSRV. I don't know of any hard-and-fast guidelines for how often that needs to be updated, but it seems like a value we probably wouldn't want Renovate to manage for us.

Copy link
Contributor

@withinfocus withinfocus left a comment

Choose a reason for hiding this comment

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

Yeah the toolchain configuration file existence was the missing part for me; I see it on your fork.

I'm a bit hesitant to approve here, but I do see this as a workable solution for now. While the dude's CF worker might not be the most reliable, it's something Renovate is invoking and it's not really exposing us to anything, and given the frequency and how Renovate works in general with clear logs about how it's running, this will do.

I look forward to enhanced Renovate support directly though.

@tangowithfoxtrot tangowithfoxtrot merged commit c7eb274 into main Jan 21, 2025
2 checks passed
@tangowithfoxtrot tangowithfoxtrot deleted the pm-13335-pin-rust-version-and-introduce-renovate branch January 21, 2025 18:11
tangowithfoxtrot added a commit to bitwarden/sdk-internal that referenced this pull request Feb 11, 2025
## ๐ŸŽŸ๏ธ Tracking

https://bitwarden.atlassian.net/browse/PM-13335

## ๐Ÿ“” Objective

Introduce a
[`rust-toolchain.toml`](https://github.com/bitwarden/sdk-internal/pull/117/files#diff-2b1bde2cf3a858b7bf7424cb8bcbf01f35b94dc80b925d9432cbab3319ca9b4e)
file, which can serve as a single source of truth for our Rust stable
and nightly channels. This will allow us to pin our Rust and Rust
nightly toolchains and manage dependency updates with Renovate. This
will depend on the changes in bitwarden/renovate-config/pull/17 (already
merged).

For the WASM build script, this requires changes from #72, which are
already merged into this branch.

## โฐ Reminders before review

- Contributor guidelines followed
- All formatters and local linters executed and passed
- Written new unit and / or integration tests where applicable
- Protected functional changes with optionality (feature flags)
- Used internationalization (i18n) for all UI strings
- CI builds passed
- Communicated to DevOps any deployment requirements
- Updated any necessary documentation (Confluence, contributing docs) or
informed the documentation
  team

## ๐Ÿฆฎ Reviewer guidelines

<!-- Suggested interactions but feel free to use (or not) as you desire!
-->

- ๐Ÿ‘ (`:+1:`) or similar for great changes
- ๐Ÿ“ (`:memo:`) or โ„น๏ธ (`:information_source:`) for notes or general info
- โ“ (`:question:`) for questions
- ๐Ÿค” (`:thinking:`) or ๐Ÿ’ญ (`:thought_balloon:`) for more open inquiry
that's not quite a confirmed
  issue and could potentially benefit from discussion
- ๐ŸŽจ (`:art:`) for suggestions / improvements
- โŒ (`:x:`) or โš ๏ธ (`:warning:`) for more significant problems or
concerns needing attention
- ๐ŸŒฑ (`:seedling:`) or โ™ป๏ธ (`:recycle:`) for future improvements or
indications of technical debt
- โ› (`:pick:`) for minor or nitpick changes

---------

Co-authored-by: Daniel Garciฬa <dani-garcia@users.noreply.github.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.

3 participants