Skip to content

Conversation

@ekouts
Copy link
Contributor

@ekouts ekouts commented Dec 20, 2024

Fixes #3353 .

Comment on lines +703 to +706
raise LoggingError(
f'logging failed: HTTP response code '
f'{response.status_code}'
)
Copy link
Contributor Author

@ekouts ekouts Dec 20, 2024

Choose a reason for hiding this comment

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

Should Reframe crash in this case, or try to print a warning?

Copy link
Contributor

Choose a reason for hiding this comment

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

How does the outpupt look like when we raise LoggingError? I see that currently we do raise it, but I'm not sure it's the right thing. I would rather go for a warning instead (remember to include the name of the handler in the message).

@vkarak vkarak added this to the ReFrame 4.8 milestone Dec 21, 2024
Copy link
Contributor

@vkarak vkarak left a comment

Choose a reason for hiding this comment

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

Consider also rebasing this PR onto master.

Comment on lines +703 to +706
raise LoggingError(
f'logging failed: HTTP response code '
f'{response.status_code}'
)
Copy link
Contributor

Choose a reason for hiding this comment

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

How does the outpupt look like when we raise LoggingError? I see that currently we do raise it, but I'm not sure it's the right thing. I would rather go for a warning instead (remember to include the name of the handler in the message).

self._url, data=json_record,
headers=self._headers
)
if response.status_code == 200:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should go for the more inclusive:

Suggested change
if response.status_code == 200:
if response.ok:
break

if response.status_code == 429:
time.sleep(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this can slow down the pipeline what about spreading the wait with a cyclic interval list, say [.1, .2, .4, .8, 1.6, 3.2]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment