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

Introduce kubectl argo rollouts list experiments #267

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

jessesuen
Copy link
Member

$ kubectl argo rollouts list experiments --all-namespaces
NAMESPACE           NAME            STATUS   DURATION  REMAINING  AGE
test                my-experiment   Running  3h        119m       7d 
my-other-namespace  my-experiment2  Running  -         -          7d 

Built ontop of #266. Only look at last commit.

@codecov
Copy link

codecov bot commented Nov 6, 2019

Codecov Report

Merging #267 into master will increase coverage by 0.14%.
The diff coverage is 85.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
+ Coverage   83.54%   83.68%   +0.14%     
==========================================
  Files          61       63       +2     
  Lines        5487     5548      +61     
==========================================
+ Hits         4584     4643      +59     
- Misses        664      665       +1     
- Partials      239      240       +1
Impacted Files Coverage Δ
pkg/kubectl-argo-rollouts/cmd/list/list.go 14.28% <0%> (-69.72%) ⬇️
pkg/kubectl-argo-rollouts/cmd/list/rollloutinfo.go 100% <100%> (+10%) ⬆️
...kg/kubectl-argo-rollouts/cmd/list/list_rollouts.go 87.25% <87.25%> (ø)
...kubectl-argo-rollouts/cmd/list/list_experiments.go 93.44% <93.44%> (ø)
pkg/kubectl-argo-rollouts/info/rollout_info.go 82.35% <0%> (+8.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e51a553...7d45bc1. Read the comment docs.

@jessesuen jessesuen force-pushed the kubectl-rollout-list-exp branch from 36a11f2 to 5b97228 Compare November 6, 2019 12:14
@jessesuen jessesuen force-pushed the kubectl-rollout-list-exp branch from 5b97228 to 7d45bc1 Compare November 6, 2019 19:06
ExperimentKind string = "Experiment"
ExperimentSingular string = "experiment"
ExperimentPlural string = "experiments"
ExperimentFullName string = ExperimentPlural + "." + Group
Copy link
Member Author

Choose a reason for hiding this comment

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

We were no longer using the shortnames so i removed it. instead i added it as kubebuilder comments

@@ -0,0 +1,158 @@
package list
Copy link
Member Author

Choose a reason for hiding this comment

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

This file mainly lifted and shifted from list.go

@@ -95,44 +96,3 @@ func (ri *rolloutInfo) String(timestamp, namespace bool) string {
}
return fmt.Sprintf(fmtString, args...)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Got rid of rolloutStauts in favor of the one in info package since there was duplication and inconsistencies in logic.

Copy link
Member

@dthomson25 dthomson25 left a comment

Choose a reason for hiding this comment

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

LGTM

ExperimentKind string = "Experiment"
ExperimentSingular string = "experiment"
ExperimentPlural string = "experiments"
ExperimentShortName string = "ex"
Copy link
Member

Choose a reason for hiding this comment

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

Why do you remove the short names?

Copy link
Member Author

Choose a reason for hiding this comment

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

I explained above -- we werent using it anymore. And the kubebuilder annotations is the source of truthe.

@@ -151,8 +153,6 @@ type AnalysisRunSpec struct {
AnalysisSpec AnalysisTemplateSpec `json:"analysisSpec"`
// Arguments hold the arguments to the run to be used by metric providers
Arguments []Argument `json:"arguments,omitempty"`
// ReplicaSets identifies the ReplicaSets in which to monitor to decide when to begin analysis
ReplicaSets []string `json:"replicaSets,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Are you removing these since we aren't using them?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

@jessesuen jessesuen merged commit 9ad38b7 into argoproj:master Nov 6, 2019
@jessesuen jessesuen deleted the kubectl-rollout-list-exp branch November 6, 2019 19:42
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