ngit-cli icon indicating copy to clipboard operation
ngit-cli copied to clipboard

Re-introduce `match_events`

Open sectore opened this issue 1 year ago • 6 comments

After upgrading to [email protected] in fc3f22e respond_standard_req seems to be broken due missing helper function match_events.

This PR ~~uses a custom fork of nostr~~ brings match_events back. Just to see, if tests are running fine now.

Changes of the nostr fork ~~might be~~ have been already merged into nostr as part of https://github.com/rust-nostr/nostr/pull/268

sectore avatar Jan 28 '24 16:01 sectore

There were other issues effecting the successful running of the tests that are now resolved by 76db0732fbc6b7dcdd3350d2387bf7144289a0cd.

Currently the test all pass but it would be good to reintroduce match_events back into the test relay.

Thank you for raising the PR with rust-nostr. I can see it is now merged.

I tried to apply both your branch and the commit where it was merged but the compiler it some problems and warnings (no doubt some more breaking changes).

I tried to apply your changes directly to v0.27 and use that (fa7f2f172e252fb028f6231773c7314af60d298b). However that also caused some compiler issues.

We can either wait for v0.28.0 and upgrade the package then, or fix the issues now.

Thanks again for your contribution.

DanConwayDev avatar Jan 31 '24 11:01 DanConwayDev

After merging latest changes from master etc. including adding [tokio::test] here and there few tests are still failing or time out:

:heavy_check_mark: running 119 tests test result: ok. 119 passed :heavy_check_mark: login test result: ok. 37 passed :heavy_check_mark: pull test result: ok. 5 passed :no_entry_sign: prs_list has been running for over 60 seconds :no_entry_sign: push test result: ok. 6 passed or sometimes has been running for over 60 seconds :heavy_check_mark: prs_create test result: ok. 28 passed :heavy_check_mark: claim test result: ok. 16 passed

sectore avatar Jan 31 '24 15:01 sectore

Currently the test all pass but it would be good to reintroduce match_events back into the test relay.

It's included in this PR by pointing nostr in Cargo.toml to official rust-nostr master branch (664ffe3) which includes rust-nostr/nostr#268

sectore avatar Jan 31 '24 15:01 sectore

There seems to be intermittency in other tests for the latest commit in this branch a84b4547e191322d60c4e680e51105c67d7b21d0. For example it stopped at prs_create after about 6 full runs of the test suite under the nix configuration:

test sends_pr_and_2_patches_to_3_relays::patch_tags::description_with_commit_message ... ok
test sends_pr_and_2_patches_to_3_relays::patch_tags::parent_commit_and_parent_commit_r has been running for over 60 seconds
test sends_pr_and_2_patches_to_3_relays::patch_tags::patch_tags_pr_event_as_root has been running for over 60 seconds

There is still 48 occurrences of on_block but they are not within the prs_list, push or claim modules. I wonder if they are still a factor.

tests within prs_list are failing inconsistently but very high frequency. running only one test such as one of pr_branch_created_with_correct_name test will fail more than half the time. That cant have anything to do with on_block as it is not even called but must be the result of the a change made in this branch.

DanConwayDev avatar Jan 31 '24 15:01 DanConwayDev

Thanks for your contributions on this. Tomorrow I'll be pushing some breaking changes to reflect discussion and proposal on nip34 https://github.com/nostr-protocol/nips/pull/997.

Would you like a wider chat about the project. We could have a call or IM on Telegram, SimpleX, Jitsu or similar?

DanConwayDev avatar Jan 31 '24 17:01 DanConwayDev

rust-nostr has been updated to v0.29 but reintroducing match_events seems to cause tests to break. This appears not to be related to bugs in the filters. This is evidenced by the fact that when_main_branch_is_uptodate::when_proposal_branch_doesnt_exist::when_main_is_checked_out::when_first_proposal_selected::cli_prompts::prompts_to_choose_from_proposal_titles passes where when_main_branch_is_uptodate::when_proposal_branch_doesnt_exist::when_main_is_checked_out::when_first_proposal_selected::proposal_branch_created_with_correct_name fails to end.

DanConwayDev avatar Apr 01 '24 10:04 DanConwayDev

thanks for your help @sectore. I reintroduced match_event eventually. PRs and Issues are being managed on nostr now. see https://gitworkshop.dev/r/naddr1qqzxuemfwsqs6amnwvaz7tmwdaejumr0dspzpgqgmmc409hm4xsdd74sf68a2uyf9pwel4g9mfdg8l5244t6x4jdqvzqqqrhnym0k2qj

DanConwayDev avatar Jul 25 '24 07:07 DanConwayDev