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

Don't Increment Scope Distance for Hostless Events #1451

Open
TheTechromancer opened this issue Jun 12, 2024 · 5 comments
Open

Don't Increment Scope Distance for Hostless Events #1451

TheTechromancer opened this issue Jun 12, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@TheTechromancer
Copy link
Collaborator

Events without hosts associated with them, such as FILESYSTEM, should probably not have their scope distance incremented.

@TheTechromancer TheTechromancer added the enhancement New feature or request label Jun 12, 2024
@TheTechromancer TheTechromancer self-assigned this Jun 12, 2024
@domwhewell-sage
Copy link
Contributor

Just looking into this, seems like I can add a if to the BaseEvent class that can satisfy this requirement

if self.host:
    if self._scope_distance_increment_same_host or not hosts_are_same:
        new_scope_distance += 1
self.scope_distance = new_scope_distance

Not sure if its as simple as this or if theres more areas that I'm overlooking

@TheTechromancer
Copy link
Collaborator Author

TheTechromancer commented Jun 12, 2024

Looks good.

The majority of the work will be in fixing the tests and making sure everything works as intended.

@TheTechromancer
Copy link
Collaborator Author

Hey @domwhewell-sage, are you working on this one? If not, I can take it.

@domwhewell-sage
Copy link
Contributor

Hey, I started with the if statement but the tests were returning some strange results (i.e. distance-0 for events that shouldn't be)

So it might make more sense to cast your expert eye over it @TheTechromancer

@TheTechromancer
Copy link
Collaborator Author

Roger I'll take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants