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

prepare for duty migration in canary checker #139

Merged
merged 10 commits into from
May 10, 2023
Merged

Conversation

adityathebe
Copy link
Member

Add new methods and some refactoring to help with flanksource/canary-checker#794

@@ -76,17 +67,17 @@ type Component struct {
Parents []string `json:"parents,omitempty" gorm:"-"`
}

func (c *Component) GetStatus() ComponentStatus {
func (c *Component) GetStatus() types.ComponentStatus {
Copy link
Member Author

@adityathebe adityathebe May 2, 2023

Choose a reason for hiding this comment

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

Thought I would just use GetStatus() method from Summary

func (c *Component) GetStatus() types.ComponentStatus {
	return c.Summary.GetStatus()
}

but they have different logics. Not sure if it's correct to do it this way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here, I see that component's status is being set using Summary's GetStatus method

https://github.com/flanksource/canary-checker/blob/master/pkg/topology/run.go#L399

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, not sure about it. @moshloop Can you chime in here

@github-actions
Copy link

github-actions bot commented May 2, 2023

E2E -

0 tests   0 ✔️  0s ⏱️
0 suites  0 💤
0 files    0

Results for commit 02ff4d9.

♻️ This comment has been updated with latest results.

@adityathebe adityathebe marked this pull request as ready for review May 2, 2023 12:07
types/component.go Outdated Show resolved Hide resolved
types/config.go Outdated Show resolved Hide resolved
utils/hash.go Outdated Show resolved Hide resolved
models/components.go Outdated Show resolved Hide resolved
@adityathebe adityathebe force-pushed the component-migration branch from 4fd7266 to 1921f88 Compare May 4, 2023 09:58
@adityathebe adityathebe force-pushed the component-migration branch from 63eb38f to 02ff4d9 Compare May 10, 2023 05:59
@moshloop moshloop merged commit a6b6884 into main May 10, 2023
@moshloop moshloop deleted the component-migration branch May 10, 2023 06: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.

3 participants