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

Added warning on CHANGELOG.md & rust-toolchain.toml #413

Merged
merged 7 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 41 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ on:
types: [opened, reopened, synchronize]

jobs:
version:
name: check rust version consistency
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
profile: minimal
override: true
- name: check rust versions
run: ./scripts/check-rust-version.sh

rustfmt:
name: rustfmt check nightly on ubuntu-latest
runs-on: ubuntu-latest
Expand All @@ -40,4 +29,44 @@ jobs:
run: |
rustup update --no-self-update nightly
rustup +nightly component add clippy
make clippy
make clippy

doc:
name: doc stable on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Build docs
run: |
rustup update --no-self-update
make doc

version:
name: check rust version consistency
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
profile: minimal
override: true
- name: check rust versions
Comment on lines +44 to +53
Copy link
Contributor

Choose a reason for hiding this comment

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

While we are at it, let's also change rust-toolchain to rust-toolchain.toml and update the check-rust-version.sh script accordingly.

Copy link
Contributor

@Mirko-von-Leipzig Mirko-von-Leipzig Jul 18, 2024

Choose a reason for hiding this comment

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

I don't understand why we're restricting the current toolchain to the MSRV of the workspace. I've read through #267, #272 and the related miden-vm PRs and issues, and discord.

From what I can tell its issues due to using the nightly compiler -- which afaik we're not using? Having the lock file committed should be more than enough when using stable compiler.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the primary motivation is that everyone is using the same toolchain as we've had issues when things suddenly break if a different version is used. As an example, in facebook/winterfell#277 code that worked fine prior to 1.78 started failing with 1.78 onwards (this was due to the bug in the code, but still).

Another example is something like 0xPolygonMiden/miden-vm#917, where nothing broke but there was a significant performance degradation when moving from 1.69 to 1.70 (which fixed itself after 1.74).

run: ./scripts/check-rust-version.sh

changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Check if CHANGELOG.md is modified
run: |
# Get the list of changed files in the PR
changed_files=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.sha }})
# Check if CHANGELOG.md is in the list of changed files
if echo "$changed_files" | grep -q '^CHANGELOG.md$'; then
echo "CHANGELOG.md has been modified."
else
echo $'::warning file=CHANGELOG.md::CHANGELOG.md has not been modified.\n This warning can be ignored if is has been explicitely decided not to log changes.\n Except in this situation, make sure to add log changes.'
Copy link
Contributor

Choose a reason for hiding this comment

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

A downside to this is that this marks the overall CI run as a failure; somewhat destroying the glance value. If we think it will be rare to have a no-op changelog PR then this is probably fine.

Did you look into existing github actions we could use? e.g. this one allows you to skip the check by adding a no changelog label to the PR. I haven't actually audited the action itself though.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit hesitant to use actions that are not very popular - but skipping changelog check by adding no changelog label seems cool. Is this something that can be fairly easily emulated locally?

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough; I believe we should be able to simply copy the actions code. Its very short, label is added as an env variable and then simply used in an if then within the script.

env:
    NO_CHANGELOG_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'no changelog') }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this PR I inspired myself with the action code and merged it with our existing one, enabling us to get the no changelog label feature: 0xPolygonMiden/miden-vm#1406

And not having to depend on not widely used actions as @bobbinth mentioned

exit 1
bobbinth marked this conversation as resolved.
Show resolved Hide resolved
fi
60 changes: 30 additions & 30 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,53 @@

### Enhancements

* [BREAKING] Configuration files with unknown properties are now rejected (#401).
* [BREAKING] Removed redundant node configuration properties (#401).
* Improve type safety of the transaction inputs nullifier mapping (#406).
* Embed the faucet's static website resources (#411).
- Added warning on CI for `CHANGELOG.md` (#413).
bobbinth marked this conversation as resolved.
Show resolved Hide resolved
- [BREAKING] Configuration files with unknown properties are now rejected (#401).
- [BREAKING] Removed redundant node configuration properties (#401).
- Improve type safety of the transaction inputs nullifier mapping (#406).
- Embed the faucet's static website resources (#411).

## 0.4.0 (2024-07-04)

### Features

* Changed sync endpoint to return a list of committed transactions (#377).
* Added `aux` column to notes table (#384).
* Changed state sync endpoint to return a list of `TransactionSummary` objects instead of just transaction IDs (#386).
* Added support for unauthenticated transaction notes (#390).
- Changed sync endpoint to return a list of committed transactions (#377).
- Added `aux` column to notes table (#384).
- Changed state sync endpoint to return a list of `TransactionSummary` objects instead of just transaction IDs (#386).
- Added support for unauthenticated transaction notes (#390).

### Enhancements

* Standardized CI and Makefile across Miden repositories (#367)
* Removed client dependency from faucet (#368).
* Fixed faucet note script so that it uses the `aux` input (#387).
* Added crate to distribute node RPC protobuf files (#391).
* Add `init` command for node and faucet (#392).

- Standardized CI and Makefile across Miden repositories (#367)
- Removed client dependency from faucet (#368).
- Fixed faucet note script so that it uses the `aux` input (#387).
- Added crate to distribute node RPC protobuf files (#391).
- Add `init` command for node and faucet (#392).

## 0.3.0 (2024-05-15)

* Added option to mint pulic notes in the faucet (#339).
* Renamed `note_hash` into `note_id` in the database (#336)
* Changed `version` and `timestamp` fields in `Block` message to `u32` (#337).
* [BREAKING] Implemented `NoteMetadata` protobuf message (#338).
* Added `GetBlockByNumber` endpoint (#340).
* Added block authentication data to the `GetBlockHeaderByNumber` RPC (#345).
* Enabled support for HTTP/1.1 requests for the RPC component (#352).
- Added option to mint pulic notes in the faucet (#339).
- Renamed `note_hash` into `note_id` in the database (#336)
- Changed `version` and `timestamp` fields in `Block` message to `u32` (#337).
- [BREAKING] Implemented `NoteMetadata` protobuf message (#338).
- Added `GetBlockByNumber` endpoint (#340).
- Added block authentication data to the `GetBlockHeaderByNumber` RPC (#345).
- Enabled support for HTTP/1.1 requests for the RPC component (#352).

## 0.2.1 (2024-04-27)

* Combined node components into a single binary (#323).
- Combined node components into a single binary (#323).

## 0.2.0 (2024-04-11)

* Implemented Docker-based node deployment (#257).
* Improved build process (#267, #272, #278).
* Implemented Nullifier tree wrapper (#275).
* [BREAKING] Added support for public accounts (#287, #293, #294).
* [BREAKING] Added support for public notes (#300, #310).
* Added `GetNotesById` endpoint (#298).
* Implemented amd64 debian packager (#312).
- Implemented Docker-based node deployment (#257).
- Improved build process (#267, #272, #278).
- Implemented Nullifier tree wrapper (#275).
- [BREAKING] Added support for public accounts (#287, #293, #294).
- [BREAKING] Added support for public notes (#300, #310).
- Added `GetNotesById` endpoint (#298).
- Implemented amd64 debian packager (#312).

## 0.1.0 (2024-03-11)

* Initial release.
- Initial release.
Loading