Skip to content

Commit

Permalink
Merge branch 'master' into peer-store
Browse files Browse the repository at this point in the history
  • Loading branch information
drHuangMHT authored Feb 11, 2025
2 parents 7c847a6 + 5f0d3f2 commit dee1897
Show file tree
Hide file tree
Showing 194 changed files with 2,709 additions and 2,086 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
- type: textarea
attributes:
label: Summary
description: Please provide a short summary of the bug, along with any information you feel relevant to replicate the bug.
description: Please provide a short summary of the bug, along with any information you feel is relevant to replicate the bug.
validations:
required: true
- type: textarea
Expand All @@ -34,7 +34,7 @@ body:
- type: textarea
attributes:
label: Possible Solution
description: Suggest a fix/reason for the bug, or ideas how to implement the addition or change.
description: Suggest a fix/reason for the bug, or ideas on how to implement the addition or change.
validations:
required: false
- type: textarea
Expand All @@ -45,11 +45,11 @@ body:
required: false
- type: dropdown
attributes:
label: Would you like to work on fixing this bug ?
label: Would you like to work on fixing this bug?
description: Any contribution towards fixing the bug is greatly appreciated. We are more than happy to provide help on the process.
options:
- "Yes"
- "No"
- Maybe
validations:
required: true
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ body:
required: true
- type: dropdown
attributes:
label: Are you planning to do it yourself in a pull request ?
label: Are you planning to do it yourself in a pull request?
description: Any contribution is greatly appreciated. We are more than happy to provide help on the process.
options:
- "Yes"
- "No"
- Maybe
validations:
required: true
required: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ body:
required: false
- type: dropdown
attributes:
label: Are you planning to do it yourself in a pull request ?
label: Are you planning to do it yourself in a pull request?
description: Any contribution is greatly appreciated. We are more than happy to provide help on the process.
options:
- "Yes"
- "No"
- Maybe
validations:
required: true
required: true
91 changes: 38 additions & 53 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,30 @@
defaults:
actions:
queue:
method: squash
commit_message_template: |
{{ title }}
{{ body | get_section("## Description", "") }}
Pull-Request: #{{ number }}.
{{ body | get_section("## Attributions", "") }}
pull_request_rules:
- name: Ask to resolve conflict
conditions:
- conflict
- -author=dependabot[bot]
- or:
- -draft # Don't report conflicts on regular draft.
- and: # Do report conflicts on draft that are scheduled for the next major release.
- draft
- milestone~=v[0-9]\.[0-9]{2}
- -draft # Don't report conflicts on regular draft.
- and: # Do report conflicts on draft that are scheduled for the next major release.
- draft
- milestone~=v[0-9]\.[0-9]{2}
actions:
comment:
message: This pull request has merge conflicts. Could you please resolve them @{{author}}? 🙏

- name: Add to merge queue
conditions:
# All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection
- label=send-it
- base=master
actions:
queue:
name: default

# Adds the Pr to the batch queue, so that we can run the interop tests. See the `external_prs` queue for more info.
- name: Add to batch merge queue
conditions:
# All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection
- label=send-it-batch
- base=master
actions:
queue:
name: external_prs

- name: Add approved dependabot PRs to merge queue
conditions:
# All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection
- author=dependabot[bot]
- base=master
actions:
queue:
name: default
message: This pull request has merge conflicts. Could you please resolve them
@{{author}}? 🙏

- name: Remove reviews on updates after PR is queued for merging
conditions:
- base=master
- label=send-it
- author!=@libp2p/rust-libp2p-maintainers
- author!=dependabot[bot]
# Do not remove approvals if last commit was a merge of master into the branch, required for the PR to be merged.
- commits[-1].author!=@libp2p/rust-libp2p-maintainers
actions:
dismiss_reviews:
message: Approvals have been dismissed because the PR was updated after the `send-it` label was applied.
message: Approvals have been dismissed because the PR was updated after the
`send-it` label was applied.
changes_requested: false

- name: Approve trivial maintainer PRs
Expand All @@ -83,11 +46,33 @@ pull_request_rules:
review:
type: APPROVE

- name: Add approved dependabot PRs to merge queue
conditions:
# All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection
- author=dependabot[bot]
- base=master
actions:
queue:

- name: Add send-it labeled PRs to merge queue
conditions:
# All branch protection rules are implicit: https://docs.mergify.com/conditions/#about-branch-protection
- base=master
- label=send-it
actions:
queue:

queue_rules:
- name: default
conditions: []
# External PR's don't have access to secrets and variables, therefore they don't run the interop tests.
# using a batch queue allows to circumvent that as mergify creates it from an internal branch.
- name: external_prs
conditions: []
batch_size: 1
queue_conditions:
- base=master
merge_conditions: []
merge_method: squash
commit_message_template: |
{{ title }}
{{ body | get_section("## Description", "") }}
Pull-Request: #{{ number }}.
{{ body | get_section("## Attributions", "") }}
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This section will appear as the commit message after merging.
Please craft it accordingly.
For a quick primer on good commit messages, check out this blog post: https://cbea.ms/git-commit/
Please include any relevant issues in here, for example:
Please include any relevant issues here, for example:
Related https://github.com/libp2p/rust-libp2p/issues/ABCD.
Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ.
Expand All @@ -15,7 +15,7 @@ Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ.
## Notes & open questions

<!--
Any notes, remarks or open questions you have to make about the PR which don't need to go into the final commit message.
Any notes, remarks, or open questions you have to make about the PR that don't need to go into the final commit message.
-->

## Change checklist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache-factory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
shared-key: stable-cache

Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
shared-key: stable-cache
save-if: false
Expand All @@ -67,17 +67,17 @@ jobs:
echo "CRATE_VERSION=$CRATE_VERSION" >> $GITHUB_ENV
- name: Enforce version in `workspace.dependencies` matches latest version
- name: Enforce version in `workspace.dependencies` matches the latest version
if: env.CRATE != 'libp2p'
run: |
SPECIFIED_VERSION=$(tq "workspace.dependencies.$CRATE.version" --file ./Cargo.toml)
SPECIFIED_VERSION=$(tq "workspace.dependencies.$CRATE.version" -r --file ./Cargo.toml)
echo "Package version: $CRATE_VERSION";
echo "Specified version: $SPECIFIED_VERSION";
test "$CRATE_VERSION" = "$SPECIFIED_VERSION" || test "=$CRATE_VERSION" = "$SPECIFIED_VERSION"
- name: Enforce version in CHANGELOG.md matches version in manifest
- name: Enforce version in CHANGELOG.md matches the version in manifest
run: |
MANIFEST_PATH=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .manifest_path')
DIR_TO_CRATE=$(dirname "$MANIFEST_PATH")
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
os: ubuntu-latest
- target: "wasm32-unknown-emscripten"
os: ubuntu-latest
- target: "wasm32-wasi"
- target: "wasm32-wasip1"
os: ubuntu-latest
- target: "x86_64-apple-darwin"
os: macos-latest
Expand All @@ -149,7 +149,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@9fe7ca9f6550e5d6358e179d451cc25ea6b54f98 #v1.5.0

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
key: ${{ matrix.target }}
save-if: ${{ github.ref == 'refs/heads/master' }}
Expand All @@ -174,7 +174,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@9fe7ca9f6550e5d6358e179d451cc25ea6b54f98 #v1.5.0

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -195,7 +195,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@9fe7ca9f6550e5d6358e179d451cc25ea6b54f98 #v1.5.0

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
key: ${{ matrix.features }}
save-if: ${{ github.ref == 'refs/heads/master' }}
Expand All @@ -212,7 +212,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@9fe7ca9f6550e5d6358e179d451cc25ea6b54f98 #v1.5.0

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -238,7 +238,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@9fe7ca9f6550e5d6358e179d451cc25ea6b54f98 #v1.5.0

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -254,7 +254,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@9fe7ca9f6550e5d6358e179d451cc25ea6b54f98 #v1.5.0

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
save-if: ${{ github.ref == 'refs/heads/master' }}

Expand All @@ -273,7 +273,7 @@ jobs:

- uses: r7kamura/rust-problem-matchers@9fe7ca9f6550e5d6358e179d451cc25ea6b54f98 #v1.5.0

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
with:
shared-key: stable-cache
save-if: false
Expand Down Expand Up @@ -365,7 +365,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7

- run: cargo install --version 0.10.0 pb-rs --locked

Expand All @@ -391,7 +391,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
- run: cargo metadata --locked --format-version=1 > /dev/null

cargo-deny:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
uses: libp2p/test-plans/.github/actions/run-transport-interop-test@master
with:
test-filter: ${{ matrix.flavour }}-rust-libp2p-head
test-results-suffix: ${{matrix.flavour}}
extra-versions: ${{ github.workspace }}/interop-tests/${{ matrix.flavour }}-ping-version.json
s3-cache-bucket: ${{ vars.S3_LIBP2P_BUILD_CACHE_BUCKET_NAME }}
s3-access-key-id: ${{ vars.S3_LIBP2P_BUILD_CACHE_AWS_ACCESS_KEY_ID }}
Expand Down
Loading

0 comments on commit dee1897

Please sign in to comment.