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

Add healthy condition to source #1976

Merged
merged 231 commits into from
Dec 11, 2024

Conversation

alonkeyval
Copy link
Collaborator

This pull request includes several changes to the frontend package, focusing on refactoring functions, improving code readability, and enhancing the condition handling for instrumented applications.

Refactoring and Code Simplification:

  • Removed the mapping of instrumentation options in the instrumentedApplicationToActualSource function in frontend/graph/conversions.go to simplify the code.
  • Changed the AutoInstrumentedDecision field to be an empty string in the instrumentedApplicationToActualSource function in frontend/graph/conversions.go.

Condition Handling Enhancements:

  • Added a call to AddHealthyInstrumentationInstancesCondition in the K8sActualSources resolver in frontend/graph/schema.resolvers.go to ensure healthy instrumentation instances are tracked.
  • Modified the GetActualSource function in frontend/services/sources.go to use AddHealthyInstrumentationInstancesCondition with a nil source parameter.
  • Updated the addHealthyInstrumentationInstancesCondition function (renamed to AddHealthyInstrumentationInstancesCondition) in frontend/services/sources.go to use model.ConditionStatusTrue and model.ConditionStatusFalse instead of metav1.ConditionTrue and metav1.ConditionFalse, respectively. Also, added formatted message and transition time handling. [1] [2]

Utility Functions:

  • Added a new utility function Metav1TimeToString in frontend/services/utils.go to convert metav1.Time to a string formatted in RFC3339.

Minor Code Improvements:

  • Removed unnecessary comments in the Actions resolver in frontend/graph/schema.resolvers.go to improve code readability.
  • Added the time package import in frontend/services/utils.go for date and time formatting.

alonkeyval and others added 30 commits July 30, 2023 10:50
…urces-card

Task 107 overview sources card
…rce-manage-list

Task 142 display source manage list
…sources-connection

Task 145 handle new sources connection
alonkeyval and others added 27 commits September 28, 2024 11:45
Copy link
Contributor

@BenElferink BenElferink left a comment

Choose a reason for hiding this comment

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

😃

@alonkeyval alonkeyval merged commit 396aa34 into odigos-io:main Dec 11, 2024
31 checks passed
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