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 event being dropped on error #5030

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

faisal-memon
Copy link
Contributor

@faisal-memon faisal-memon commented Mar 30, 2024

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality
Events based cache

Description of change
We are marking the event as being process before the call to GetNodeSelectors(). If that call errors then the event will not retried and be skipped over.

@azdagron
Copy link
Member

azdagron commented Apr 4, 2024

I think we're missing a spot where we need to set the event as handled in the "agent has expired" case. Is there a way this can be refactored so that it's clear the "last handled ID" is being set in all non-error cases?

Signed-off-by: Faisal Memon <[email protected]>
@faisal-memon
Copy link
Contributor Author

I think we're missing a spot where we need to set the event as handled in the "agent has expired" case. Is there a way this can be refactored so that it's clear the "last handled ID" is being set in all non-error cases?

Thanks for catching that. Updated. The "agent has expired" block of code will be removed as part of the change set to properly handling pruning expired agents. That should clean up this function a bit.

@amartinezfayo amartinezfayo merged commit 3bff520 into spiffe:main Apr 5, 2024
33 checks passed
@amartinezfayo amartinezfayo modified the milestones: 1.9.4, 1.9.5 Apr 5, 2024
rushi47 pushed a commit to rushi47/spire that referenced this pull request Apr 11, 2024
* Fix event being dropped on error

Signed-off-by: Faisal Memon <[email protected]>

* Fix missing event id bump

Signed-off-by: Faisal Memon <[email protected]>

---------

Signed-off-by: Faisal Memon <[email protected]>
Co-authored-by: Andrew Harding <[email protected]>
Co-authored-by: Agustín Martínez Fayó <[email protected]>
@amartinezfayo amartinezfayo modified the milestones: 1.9.5, 1.9.6 May 8, 2024
@faisal-memon faisal-memon deleted the get-node-selectors-fix branch July 3, 2024 23:58
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.

3 participants