Skip to content

chore(ci): examples:cargo run#200

Closed
RandyMcMillan wants to merge 2 commits into
sedited:masterfrom
RandyMcMillan:955676/1865/241798/19d25f8/8174a81-example-ci-cargo-run
Closed

chore(ci): examples:cargo run#200
RandyMcMillan wants to merge 2 commits into
sedited:masterfrom
RandyMcMillan:955676/1865/241798/19d25f8/8174a81-example-ci-cargo-run

Conversation

@RandyMcMillan

Copy link
Copy Markdown
Contributor

No description provided.

@RandyMcMillan

Copy link
Copy Markdown
Contributor Author

follow up to #199 (combined)

@RandyMcMillan RandyMcMillan force-pushed the 955676/1865/241798/19d25f8/8174a81-example-ci-cargo-run branch from e8d1bd9 to b93183c Compare June 27, 2026 16:44
Comment thread .github/workflows/ci.yml
- name: Run tests
run: cargo test -vv
- name: Build and Test
env:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixes an intermittent failure:

CARGO_HTTP_PROTOCOL: "http1": HTTP/2 is prone to framing layer errors when proxies or unstable networks are involved in CI runners. HTTP/1.1 is significantly more resilient for the small, numerous requests required by cargo.

CARGO_HTTP_MULTIPLEXING: "false": This disables the ability to send multiple requests over one connection, which is exactly where the "HTTP2 framing layer" errors usually manifest during concurrent dependency downloads.

CARGO_NET_RETRY: Increases the patience of the Cargo client if a transient packet loss occurs during the is_terminal_polyfill download.

@alexanderwiederin alexanderwiederin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the suggestions!

Comment thread .github/workflows/ci.yml
run: |
cd examples
cargo build --verbose
cargo run --verbose -- datadir

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This runs silentpaymentscanner.rs against an empty datadir, so scan_chain will iterate over an empty chain. Does this test anything beyond "the binary doesn't crash on startup"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

you are correct - please suggest a better implementation.
maybe the simple arg test (above) - then maybe no arg (default) to test default?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am not sure I understand what you are trying to achieve. I don't think the examples are intended to be run in the CI to check that they run without panicking, but more for people to see what the API looks like in use. What do you think?

Comment thread .github/workflows/ci.yml
Comment on lines +183 to +189
run: |
# Clean the stale/corrupted attempt
cargo clean
# Force an update of the registry without using multiplexing
cargo update
# Perform the test
cargo test -vv

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this test really a problem? I do not recall seeing a flaky windows run.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the flakiness may be due to GitHub infrastructure - not necessarily from the implementation.

@RandyMcMillan RandyMcMillan force-pushed the 955676/1865/241798/19d25f8/8174a81-example-ci-cargo-run branch from b93183c to b3eafcd Compare July 8, 2026 16:14
@RandyMcMillan RandyMcMillan changed the title CI:example: cargo run with arg fix(examples): silentpaymentscanner.rs:arg parsing Jul 8, 2026
@RandyMcMillan

RandyMcMillan commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

follow up to #199 (combined)

b3eafcd updated commit messages per suggestion in #199

bfc51be: remove CHANGELOG.md edit

@RandyMcMillan RandyMcMillan force-pushed the 955676/1865/241798/19d25f8/8174a81-example-ci-cargo-run branch from b3eafcd to bfc51be Compare July 8, 2026 16:30
@RandyMcMillan RandyMcMillan changed the title fix(examples): silentpaymentscanner.rs:arg parsing chore(ci): examples:cargo run Jul 8, 2026
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.

2 participants