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

Relay Subscribe #5

Merged
merged 14 commits into from
Nov 24, 2023
Merged

Relay Subscribe #5

merged 14 commits into from
Nov 24, 2023

Conversation

fbarbu15
Copy link
Collaborator

@fbarbu15 fbarbu15 commented Nov 22, 2023

@fbarbu15 fbarbu15 changed the title Tests/relay subscribe Relay Subscribe Nov 23, 2023
@fbarbu15 fbarbu15 marked this pull request as ready for review November 23, 2023 10:19
Copy link
Collaborator

@AlbertoSoutullo AlbertoSoutullo left a comment

Choose a reason for hiding this comment

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

Questions + typo

Comment on lines -11 to -15
# The retry decorator is applied to handle transient errors gracefully. This is particularly
# useful when running tests in parallel, where occasional network-related errors such as
# connection drops, timeouts, or temporary unavailability of a service can occur. Retrying
# ensures that such intermittent issues don't cause the tests to fail outright.
@retry(stop=stop_after_delay(0.5), wait=wait_fixed(0.1), reraise=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just out of curiosity, why is this no longer needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I realized it makes more sense to handle retries case by case at higher level, instead of having all HTTP requests that fail retried by default.
There are more and more test cases where it is expected to have an error and I wanted to avoid retries for those cases.

So removing this retry gives the tests more control

for pubsub_topic in VALID_PUBSUB_TOPICS:
self.check_publish_without_subscription(pubsub_topic)

def test_unsubscribe_from_sume_pubsub_topics(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo, I guess this is "same"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, will fix, thanks :)

Comment on lines +74 to +75
if self.node1.is_nwaku():
pass # nwaku doesn't fail in this case
Copy link
Collaborator

Choose a reason for hiding this comment

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

Am I right when I say that you mentioned you were gathering all differences between Waku implementations? Where does that live?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Most of them as github issues/bugs if they are serious enough.
But now that you mentioned it, maybe it makes sense to start a notion page for everything that I find. Because for this one in particular I didn't raised a bug because doesn't look that serious, it's more of an edge case. But either way it should be documented
Will start a notion page, thanks for the hint :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here's the page I started, it's not much but still better than nothing :)

Copy link

@AlejandroCabeza AlejandroCabeza left a comment

Choose a reason for hiding this comment

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

Aside from @AlbertoSoutullo's comments I got nothing to add :)

@romanzac
Copy link
Collaborator

romanzac commented Nov 23, 2023

@fbarbu15 I am learning from each of your PRs. I am curious about this sequence:
self.node1.restart()
self.node1.ensure_ready()

I haven't seen retry in ensure_ready. Is the ensure_ready() still valuable to run, when we could fail in the next step as well? What if container restarted, but API not ready yet ? Just curious.

@fbarbu15
Copy link
Collaborator Author

@fbarbu15 I am learning from each of your PRs. I am curious about this sequence: self.node1.restart() self.node1.ensure_ready()

I haven't seen retry in ensure_ready. Is the ensure_ready() still valuable to run, when we could fail in the next step as well? What if container restarted, but API not ready yet ? Just curious.

It is decorated with the tenacity retry decorator
https://github.com/waku-org/waku-interop-tests/blob/tests/relay-subscribe/src/node/waku_node.py#L104
That mean it will be retried for 10 seconds with a 0.1s delays between retries

@fbarbu15 fbarbu15 merged commit f8db76a into master Nov 24, 2023
1 of 2 checks passed
@fbarbu15 fbarbu15 deleted the tests/relay-subscribe branch November 24, 2023 12:04
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.

4 participants