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

modernize cln tests and CI #259

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

daywalker90
Copy link
Contributor

Replaces #255

I think in your PR tests ran slow because you were running them on an ancient pyln-testing version. Just to make sure i added VALGRIND=0 as that can cause huge slowdowns but i don't know when valgrind actually runs in these tests.

I also assume you don't want CI to run on anything else than commit to the master branch. While testing with a PR all CI ran both for the feature branch and the PR kinda weird.

Also developer: None is not needed with a modern pyln-testing version, as that is a default setting.

Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

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

Thanks!
Some queries inline.

.github/workflows/build.yaml Outdated Show resolved Hide resolved
.github/workflows/cln-plugin.yaml Outdated Show resolved Hide resolved
@@ -69,4 +73,4 @@ jobs:
- name: Run tests
run: |
cd watchtower-plugin/tests
DEVELOPER=1 SLOW_MACHINE=1 poetry run pytest test.py --log-cli-level=INFO -s
VALGRIND=0 SLOW_MACHINE=1 poetry run pytest test.py --log-cli-level=INFO -s
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is VALGRIND enabled by default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i think so, but not sure when and where it's used to be honest

@daywalker90 daywalker90 force-pushed the modernize-cln-tests branch from f76d3c9 to 481768a Compare June 30, 2024 12:26
@daywalker90
Copy link
Contributor Author

Ah yes thanks github for changing the default branch name.

Copy link
Member

@sr-gi sr-gi left a comment

Choose a reason for hiding this comment

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

Looks like we are still facing several issues:

watchtower-plugin/tests/conftest.py Show resolved Hide resolved
@daywalker90 daywalker90 force-pushed the modernize-cln-tests branch from 481768a to dd65ad8 Compare July 28, 2024 10:55
@daywalker90
Copy link
Contributor Author

daywalker90 commented Jul 28, 2024

@sr-gi clnrest and cln-grpc are just plugins to serve the rpc via REST and GRPC. They are not relevant for this project and can safely be ignored.

I removed the functions mentioning DEVELOPER. I'm not sure how they were still used, i could not find any code for them anymore.

Indeed allow_broken_log was removed in favor of broken_log which requires explicitly stating the expected broken log. Please check that the log lines i used are actually expected!

Copy link
Member

@sr-gi sr-gi left a comment

Choose a reason for hiding this comment

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

This works now, but the code needs to be properly formatted. Run black -l 120 watchtower-plugin/tests locally.

Looks good otherwise, thanks for taking the time to fix this!

@@ -123,7 +120,7 @@ def test_auto_retry_watchtower(node_factory, bitcoind, teosd):
{},
{
"plugin": WT_PLUGIN,
"allow_broken_log": True,
"broken_log": r'plugin-watchtower-client: Data was send to an idle retier. This should have never happened. Please report!.*',
Copy link
Member

Choose a reason for hiding this comment

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

This made me realize that there was a typo on this logline. Would you care changing it here and on the plugin side?

retier -> retrier

@daywalker90 daywalker90 force-pushed the modernize-cln-tests branch from dd65ad8 to f6decde Compare July 29, 2024 14:28
@daywalker90
Copy link
Contributor Author

This works now, but the code needs to be properly formatted. Run black -l 120 watchtower-plugin/tests locally.

Looks good otherwise, thanks for taking the time to fix this!

done

This made me realize that there was a typo on this logline. Would you care changing it here and on the plugin side?

retier -> retrier

done

@sr-gi
Copy link
Member

sr-gi commented Jul 29, 2024

LGTM. Rust lint issues are unrelated.

Any additional comment @mariocynicys?

Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

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

One last comment on my end.

.github/workflows/cln-plugin.yaml Show resolved Hide resolved
watchtower-plugin/tests/pyproject.toml Show resolved Hide resolved
Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

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

LGTM :)

@sr-gi sr-gi merged commit e108510 into talaia-labs:master Jul 29, 2024
6 of 7 checks passed
@sr-gi sr-gi mentioned this pull request Jul 29, 2024
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.

3 participants