-
Notifications
You must be signed in to change notification settings - Fork 124
[Integration][ArgoCD] Add cluster availability filtering to ArgoCD integration #2289
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
[Integration][ArgoCD] Add cluster availability filtering to ArgoCD integration #2289
Conversation
Signed-off-by: Dennis Bilson <[email protected]>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
PR Code Suggestions ✨Explore these optional code suggestions:
|
…idually Signed-off-by: Dennis Bilson <[email protected]>
… ArgoCD integration Signed-off-by: Dennis Bilson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…-causing-prolonged-sync-durations
User description
Implemented filtering logic in the
get_clusters
method to exclude unavailable clusters from resource fetching operations. The integration now only processes clusters with a "Successful" connection state, preventing errors and unnecessary API calls to unreachable clusters.Type of change
Please leave one option from the following and delete the rest:
All tests should be run against the port production environment(using a testing org).
Core testing checklist
Integration testing checklist
examples
folder in the integration directory.Preflight checklist
Screenshots
API Documentation
Provide links to the API documentation used for this integration.
PR Type
Bug fix, Enhancement
Description
Added cluster availability filtering to exclude unavailable clusters from resource fetching operations
Implemented dedicated
get_clusters
method with async generator pattern for paginated cluster retrievalIntroduced
ClusterState
enum to standardize cluster availability checksMoved
CLUSTER
fromObjectKind
toResourceKindsWithSpecialHandling
for specialized processingDiagram Walkthrough
File Walkthrough
client.py
Implement cluster availability filtering and dedicated retrieval
method
integrations/argocd/client.py
ClusterState
enum withAVAILABLE
status constantCLUSTER
fromObjectKind
toResourceKindsWithSpecialHandling
get_clusters
async generator method with availabilityfiltering
_available_clusters
instance variable for batch processingget_resources
to use.get()
for safer dictionary accessmain.py
Add dedicated resync handler for cluster resources
integrations/argocd/main.py
on_clusters_resync
handler for cluster resource synchronizationget_clusters
method with async generator patterntest_client.py
Add comprehensive test coverage for cluster filtering logic
integrations/argocd/tests/test_client.py
ClusterState
import for test assertionstest_get_resources
functiontest_get_clusters_with_only_available_clusters
test casetest_get_clusters_filters_unavailable_clusters
test caseCHANGELOG.md
Document cluster availability filtering improvement
integrations/argocd/CHANGELOG.md
pyproject.toml
Update package version to 0.1.224
integrations/argocd/pyproject.toml