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

Colossus cleanup fix #5191

Merged
merged 3 commits into from
Oct 22, 2024
Merged

Conversation

Lezek123
Copy link
Contributor

@Lezek123 Lezek123 commented Oct 16, 2024

  • Fix util:cleanup script (call loadDataObjectIdCache first)
  • Allow changing default log level using environment variable (COLOSSUS_DEFAULT_LOG_LEVEL)
  • Allow adjusting cleanup constants via env (CLEANUP_MIN_REPLICATION_THRESHOLD, CLEANUP_NEW_OBJECT_EXPIRATION_PERIOD)
  • Error handling: Clearer warning messages if unexpected response encountered during sync (ie. 404)
  • Add tests to verify cleanup behavior with --cleanup flag enabled

Related issue: #5182

@mnaamani mnaamani self-requested a review October 21, 2024 09:59
Copy link
Member

@mnaamani mnaamani left a comment

Choose a reason for hiding this comment

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

The new test looks good and the fix for the cleanup command looks correct.
Just left some minor point on the until helper function that could be fixed.
Otherwise this is good to go,

tests/network-tests/src/utils.ts Outdated Show resolved Hide resolved
logger.warn(`Sync - unexpected status code(${res.statusCode}) for ${res?.request?.url}`)
request.on('response', (res: Response) => {
if (!res.ok) {
request.emit('error', `request failed: ${res.error}`)
Copy link
Member

Choose a reason for hiding this comment

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

Seeing that request is a Stream therefore I assume emitting error here will throw an exception in later part of the code.. at await streamPipeline(request, fileStream) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct, I also tested this specific case locally.

@mnaamani mnaamani merged commit 2f6dfe5 into Joystream:master Oct 22, 2024
23 checks passed
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