Skip to content

Conversation

1yam
Copy link
Member

@1yam 1yam commented Sep 3, 2025

This PR add the handling of the two new status REMOVING and REMOVED

Related ClickUp, GitHub or Jira tickets : ALEPH-573

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • [] New classes and functions contain docstrings explaining what they provide.
  • [] All new code is covered by relevant tests.

Changes

This pull request adds support for handling messages that are in the process of being removed or have already been removed on aleph.im. It improves error handling and status reporting for these new message states.

Error handling improvements:

  • Added RemovedMessageError to the list of exceptions handled in message.py, allowing the CLI to inform users when a message has been removed.
  • Updated the get command to catch RemovedMessageError and display an appropriate message to the user.

Status reporting enhancements:

  • Modified the logic for displaying message errors to include both REJECTED and REMOVING statuses, ensuring users see error details for messages being removed.
  • Updated the colorized_status function to include color coding for the new REMOVING (yellow) and REMOVED (red) statuses, improving clarity in CLI output.

Notes

On CLI the biggest impact of those status is on aleph instance list
since api2 is still using 0.7.4 (and scheduler using api2) some side effects is possible, PR is on draft waiting api2 to be upgraded for propper testing

@1yam 1yam marked this pull request as ready for review September 9, 2025 12:53
@1yam
Copy link
Member Author

1yam commented Sep 9, 2025

For aleph instance list the messages statues is handlded on sdk side (new filter on messages statues as been addded (default filter should be PROCESSED or REMOVING) but filter as been explicitly set those status in case of later change on default behavior on that endpoints.

@1yam
Copy link
Member Author

1yam commented Sep 9, 2025

image

@aleph-im aleph-im deleted a comment from github-actions bot Sep 12, 2025
@1yam 1yam force-pushed the 1yam-credits-handling branch from 7ca29a2 to cac3e45 Compare September 16, 2025 09:50
@1yam 1yam force-pushed the 1yam-handle-new-message-status branch from 9dba0d9 to 8c9cbfc Compare September 16, 2025 09:58
@1yam 1yam requested a review from nesitor September 16, 2025 10:01
Copy link

codecov bot commented Sep 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.29%. Comparing base (10704bd) to head (e69744f).

Additional details and impacted files
@@                    Coverage Diff                    @@
##           1yam-credits-handling     #398      +/-   ##
=========================================================
+ Coverage                  61.01%   61.29%   +0.27%     
=========================================================
  Files                         21       21              
  Lines                       3871     3873       +2     
  Branches                     549      549              
=========================================================
+ Hits                        2362     2374      +12     
+ Misses                      1230     1223       -7     
+ Partials                     279      276       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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