chore: merge chatmail/filtermail into chatmail/relay to have a monorepo - #1023
chore: merge chatmail/filtermail into chatmail/relay to have a monorepo#1023missytake wants to merge 169 commits into
Conversation
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.62.49 to 2.66.7. - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@44c6d64...542ceba) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.66.7 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@08c6903...8e8c483) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.17 to 2.0.18. - [Release notes](https://github.com/dtolnay/thiserror/releases) - [Commits](dtolnay/thiserror@2.0.17...2.0.18) --- updated-dependencies: - dependency-name: thiserror dependency-version: 2.0.18 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.8.1 to 2.8.2. - [Release notes](https://github.com/swatinem/rust-cache/releases) - [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md) - [Commits](Swatinem/rust-cache@f13886b...779680d) --- updated-dependencies: - dependency-name: Swatinem/rust-cache dependency-version: 2.8.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 6d653acede28d24f02e3cd41383119e8b1b35921 to f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561. - [Release notes](https://github.com/dtolnay/rust-toolchain/releases) - [Commits](dtolnay/rust-toolchain@6d653ac...f7ccc83) --- updated-dependencies: - dependency-name: dtolnay/rust-toolchain dependency-version: f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Prevents extraction failing on SRS. Fixes: #9 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
…15) Indexing can potentially panic, without indexing it is easier to make sure there will be no crash.
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Improves logs and reduces verbosity. Fixes: #8 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Sets lint rules and applies required changes. Fixes: #16 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Fixes: #19 Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
…tions I don't know if Postfix as the client disables delayed ACKs, but if delayed ACKs are enabled, Nagle's algorithm introduces unnecessary delays.
Rate limiter handles all the necessary locking internally.
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@8e8c483...de0fac2) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.66.7 to 2.67.6. - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@542ceba...8444b4f) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.67.6 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.81.10 to 2.82.2. - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@7a79fe8...9e1e580) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.82.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 to fa04a1451ff1842e2626ccb99004d0195b455a88. - [Release notes](https://github.com/dtolnay/rust-toolchain/releases) - [Commits](dtolnay/rust-toolchain@3c5f7ea...fa04a14) --- updated-dependencies: - dependency-name: dtolnay/rust-toolchain dependency-version: 67ef31d5b988238dd797d409d6f9574278e20537 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Otherwise only the first case is built.
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Bumps [hyper](https://github.com/hyperium/hyper) from 1.9.0 to 1.10.1. - [Release notes](https://github.com/hyperium/hyper/releases) - [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md) - [Commits](hyperium/hyper@v1.9.0...v1.10.1) --- updated-dependencies: - dependency-name: hyper dependency-version: 1.10.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.82.5 to 2.83.1. - [Release notes](https://github.com/taiki-e/install-action/releases) - [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md) - [Commits](taiki-e/install-action@bffeee2...2ca9b94) --- updated-dependencies: - dependency-name: taiki-e/install-action dependency-version: 2.83.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from fa04a1451ff1842e2626ccb99004d0195b455a88 to 2c7215f132e9ebf062739d9130488b56d53c060c. - [Release notes](https://github.com/dtolnay/rust-toolchain/releases) - [Commits](dtolnay/rust-toolchain@fa04a14...2c7215f) --- updated-dependencies: - dependency-name: dtolnay/rust-toolchain dependency-version: 2c7215f132e9ebf062739d9130488b56d53c060c dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
In theory it does not, but then we probably want to tag relay more often, as it won't be possible to deploy relay from main if filtermail changed without compiling it locally. |
f6fb60e to
b8ff1b1
Compare
There was a problem hiding this comment.
Thanks for tackling this, two non-inline comments:
-
ci.yamlstill polls the old filtermail release, adapt that to the build pattern fromfiltermail-ci.yaml. - Changelog: There are now two and two
cliff.toml; needs some--include-pathwork so this won't clobber.
Re versioning: prefixed filtermail-X.Y.Z tags, with relay staying unprefixed, seems the conventional shape; I would not retroactively rename relay's tags to relay-X.Y.Z as it breaks existing release-download URLs.
b8ff1b1 to
c82412d
Compare
c82412d to
9c9e5dd
Compare
9c9e5dd to
3fd3098
Compare
|
CI requires chatmail/cmlxc#31 I think - edit: apparently not, it's green :) |
j4n
left a comment
There was a problem hiding this comment.
Changes looks good. Some more comments inline.
One thing for a followup-PR: RELEASE.md is currently relay-only and should have a filtermail section, something like:
# Releasing chatmail relay
...
# Releasing filtermail
filtermail is versioned independently and released from the same repo,
using `filtermail-` prefixed tags. To release filtermail 0.7.5:
1. Update the changelog:
`git cliff --config filtermail/cliff.toml -u -t filtermail-0.7.5 -p filtermail/CHANGELOG.md`
2. Bump `version` in `filtermail/Cargo.toml` and commit `filtermail/Cargo.lock`.
3. Commit with the message `feat(release): prepare filtermail for 0.7.5`; or chore() if it should be excluded from relay changelog.
4. Open a PR with the new commit, merge it to main after review.
5. In the web interface, create a GitHub release, tell it to create a new tag `filtermail-0.7.5`. Do not push the tag by hand: the release must exist before the upload job runs.
6. Bump the pinned version and sha256sums in`cmdeploy/src/cmdeploy/filtermail/deployer.py`.| cd repo/filtermail && RUSTFLAGS="-Ctarget-feature=+crt-static -Clink-self-contained=yes" cargo build --release --target x86_64-unknown-linux-musl | ||
| cmlxc init | ||
| # single cmdeploy relay test | ||
| cmlxc -v deploy-cmdeploy --source ./repo cm0 |
There was a problem hiding this comment.
| cmlxc -v deploy-cmdeploy --source ./repo cm0 | |
| cmlxc -v deploy-cmdeploy --source ./repo --filtermail repo/filtermail/target/x86_64-unknown-linux-musl/release/filtermail cm0 |
if we do build filtermail at all times, we should probably also use it in the test, otherwise we dont need to build it; though we will have a path clash here that will need fixing in cmlxc.
| cmlxc -v test-cmdeploy cm0 | ||
|
|
||
| # cross cmdeploy relay test | ||
| cmlxc -v deploy-cmdeploy --source ./repo --ipv4-only cm1 |
There was a problem hiding this comment.
| cmlxc -v deploy-cmdeploy --source ./repo --ipv4-only --filtermail repo/filtermail/target/x86_64-unknown-linux-musl/release/filtermail cm1 |
same as above
| cmlxc_commands: | | ||
| sudo apt-get update && sudo apt-get install -y musl-tools | ||
| rustup target add x86_64-unknown-linux-musl | ||
| export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc |
There was a problem hiding this comment.
| export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc |
Looking at the job log, does not reach the next step as each line runs in its own environment and thus is a noop.
| sort_commits = "oldest" | ||
| # Process submodules commits | ||
| recurse_submodules = false | ||
| exclude_paths = ["filtermail/"] |
There was a problem hiding this comment.
| exclude_paths = ["filtermail/"] | |
| exclude_paths = ["filtermail/"] | |
| tag_pattern = '^[0-9]+\.[0-9]+\.[0-9]+$' |
Exclude filtermail tags and match only relay tags.
| # Allowed values: newest, oldest | ||
| sort_commits = "oldest" | ||
| # Process submodules commits | ||
| recurse_submodules = false |
There was a problem hiding this comment.
| recurse_submodules = false | |
| recurse_submodules = false | |
| include_paths = ["filtermail/"] | |
| tag_pattern = "^filtermail-" |
match only filtermail
| ref: ${{ github.event.pull_request.head.sha }} | ||
| persist-credentials: false | ||
| - name: download filtermail | ||
| run: curl -L https://github.com/chatmail/filtermail/releases/download/v0.7.4/filtermail-x86_64 -o /usr/local/bin/filtermail && chmod +x /usr/local/bin/filtermail |
There was a problem hiding this comment.
| run: curl -L https://github.com/chatmail/filtermail/releases/download/v0.7.4/filtermail-x86_64 -o /usr/local/bin/filtermail && chmod +x /usr/local/bin/filtermail | |
| run: curl -f -L https://github.com/chatmail/filtermail/releases/download/v0.7.4/filtermail-x86_64 -o /usr/local/bin/filtermail && chmod +x /usr/local/bin/filtermail |
-f means failing on 404 instead of downloading the error page to filtermail binary location. Maybe we should consider always building and using https://github.com/Swatinem/rust-cache as in filtermail-ci.yaml.
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "filtermail/**" |
There was a problem hiding this comment.
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "filtermail/**" | |
| paths: | |
| - "filtermail/**" | |
| - ".github/workflows/filtermail-ci.yml" | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - "filtermail/**" | |
| - ".github/workflows/filtermail-ci.yml" |
push otherwise runs the full rust matrix for nothing on pushes to main; and add the workflow file.
| Filtermail is distributed as a statically linked linux binary, | ||
| available for `x86_64` and `aarch64` architectures. | ||
|
|
||
| Binaries are available on the [releases page](https://github.com/chatmail/filtermail/releases). |
|
|
||
| jobs: | ||
| build: | ||
| name: Build binaries. |
There was a problem hiding this comment.
| name: Build binaries. | |
| name: Build binaries. | |
| if: startsWith(github.event.release.tag_name, 'filtermail-') |
Guard here..
| push: | ||
| tags: | ||
| - 'filtermail-*' |
There was a problem hiding this comment.
| push: | |
| tags: | |
| - 'filtermail-*' | |
| release: | |
| types: [published] |
see filter on line 10
This is a proposal to merge chatmail/filtermail and chatmail/relay into one monorepo, so we can change filtermail with only one PR in the future.
The paths in the filtermail commits have been rewritten so that they were always in the filtermail/ subdirectory, so the commit history of each file is preserved. What I did to merge the repositories, in case it needs to be repeated slightly differently:
Then I did 3cf3937 on top of it to integrate filtermail's .github/ and .gitignore into chatmail/relay.
open questions: