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

Fix Asteroid Agent __init__ issue #182

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Fix Asteroid Agent __init__ issue #182

merged 1 commit into from
Feb 25, 2025

Conversation

elyousfi5
Copy link
Member

@elyousfi5 elyousfi5 commented Feb 25, 2025

Fix Asteroid Agent broken since last week

image

Last week, a new logic was added to check whether a target has already been processed.

To implement this, the agent now inherits from persist_mixin.AgentPersistMixin. However, since AgentPersistMixin's __init__ method initializes self._redis_client using:

self._redis_client = redis.Redis.from_url(agent_settings.redis_url)

Any agent that inherits from AgentPersistMixin must ensure its init method properly calls the parent class’s init method first to initialize dependencies correctly.

image

@elyousfi5 elyousfi5 requested a review from a team as a code owner February 25, 2025 09:55
Copy link

@ostorlab-ai-pr-review ostorlab-ai-pr-review bot left a comment

Choose a reason for hiding this comment

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

Code Review Summary

Total Issues Found: 1
Critical Issues: 1
Suggestions: 0

Key Findings:
The code review identified one critical issue: the absence of proper initialization of parent classes within the AsteroidAgent's init method. Specifically, the super().init(agent_definition, agent_settings) call is missing, which is necessary to ensure the initialization logic of all parent classes is executed correctly. Overall code quality is impacted due to this missing initialization step. It is recommended to address this issue promptly to ensure the agent is properly set up and functions as expected.

@elyousfi5 elyousfi5 changed the title Fix asteroid broken since last week. Fix Asteroid Agent Issue __init__ issue Feb 25, 2025
@elyousfi5 elyousfi5 changed the title Fix Asteroid Agent Issue __init__ issue Fix Asteroid Agent __init__ issue Feb 25, 2025
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.05%. Comparing base (0bfa533) to head (e464711).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #182   +/-   ##
=======================================
  Coverage   97.05%   97.05%           
=======================================
  Files         233      233           
  Lines        9077     9078    +1     
=======================================
+ Hits         8810     8811    +1     
  Misses        267      267           

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

@amine3 amine3 merged commit 3cc51e0 into main Feb 25, 2025
5 checks passed
@amine3 amine3 deleted the fix/asteroid-broken branch February 25, 2025 10:11
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