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

Integrate Experiments with Analysis #210

Merged
merged 14 commits into from
Oct 28, 2019

Conversation

jessesuen
Copy link
Member

@jessesuen jessesuen commented Oct 19, 2019

  1. Refactors Experiment controller to allow degraded replicasets to fail the experiment
  2. Allows multiple analysis templates to be invoked as part of an Experiment

@codecov
Copy link

codecov bot commented Oct 19, 2019

Codecov Report

Merging #210 into master will increase coverage by 0.29%.
The diff coverage is 91.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #210      +/-   ##
==========================================
+ Coverage   84.52%   84.82%   +0.29%     
==========================================
  Files          47       47              
  Lines        3981     4244     +263     
==========================================
+ Hits         3365     3600     +235     
- Misses        440      455      +15     
- Partials      176      189      +13
Impacted Files Coverage Δ
utils/conditions/experiments.go 95.06% <ø> (-1.43%) ⬇️
rollout/sync.go 76.62% <100%> (ø) ⬆️
utils/analysis/helpers.go 100% <100%> (+4.76%) ⬆️
utils/conditions/conditions.go 89.13% <100%> (ø) ⬆️
utils/replicaset/replicaset.go 88.82% <100%> (ø) ⬆️
utils/defaults/defaults.go 100% <100%> (ø) ⬆️
utils/controller/controller.go 94.2% <100%> (ø) ⬆️
rollout/replicaset.go 76.19% <100%> (ø) ⬆️
utils/annotations/annotations.go 96.73% <100%> (ø) ⬆️
rollout/canary.go 86.29% <100%> (ø) ⬆️
... and 9 more

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 ca99e35...874c3e4. Read the comment docs.

@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from fa1ce45 to 15ec304 Compare October 20, 2019 02:30
@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from 15ec304 to 94a00f0 Compare October 20, 2019 02:34
@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from 9628142 to 38a0b38 Compare October 23, 2019 08:12
@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from 38a0b38 to 47e7340 Compare October 23, 2019 08:15
@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from 4c8e487 to 7c85d2e Compare October 24, 2019 03:31
@jessesuen jessesuen changed the title Initial integration with experiments and analysis Integrate Experiments with Analysis Oct 24, 2019
@jessesuen jessesuen marked this pull request as ready for review October 24, 2019 05:46
@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from 53cf865 to de2d492 Compare October 24, 2019 07:51
experiments/controller.go Outdated Show resolved Hide resolved
experiments/experiment.go Outdated Show resolved Hide resolved
// we ignore this update.
msg := fmt.Sprintf(conditions.ExperimentTimeOutMessage, experiment.Name)
condition := conditions.NewExperimentConditions(v1alpha1.ExperimentProgressing, corev1.ConditionFalse, conditions.TimedOutReason, msg)
conditions.SetExperimentCondition(&newStatus, *condition)
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 removed TimeOut condition from experiments because this now fails the Experiment, and will be implicit by the Failed status. One less state to manage.

@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from 4fa1339 to 29cb1f3 Compare October 25, 2019 01:33
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.

Overall looks good, but I have some questions

examples/example-experiment.yaml Outdated Show resolved Hide resolved
experiments/experiment.go Outdated Show resolved Hide resolved
experiments/experiment.go Show resolved Hide resolved
go test -failfast -covermode=count -coverprofile=coverage.out ${TEST_TARGET}

.PHONY: coverage
coverage: test
Copy link
Member

Choose a reason for hiding this comment

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

I'm excited to start using this!

experiments/experiment.go Outdated Show resolved Hide resolved
experiments/experiment.go Outdated Show resolved Hide resolved
experiments/controller.go Show resolved Hide resolved
utils/conditions/experiments.go Outdated Show resolved Hide resolved
@@ -158,12 +164,31 @@ func NewExperimentController(
// Two different versions of the same Replica will always have different RVs.
return
}
if defaults.GetReplicasOrDefault(newRS.Spec.Replicas) == defaults.GetReplicasOrDefault(oldRS.Spec.Replicas) &&
Copy link
Member

Choose a reason for hiding this comment

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

Would we want to use this logic with rollouts too? We don't have to do it now, but it's just a thought

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 think so, it's a riskier change though. Not sure if we consider other things about the replicaset, like conditions.

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

experiments/experiment.go Outdated Show resolved Hide resolved
@dthomson25
Copy link
Member

Minor: can you write tests to cover https://codecov.io/gh/argoproj/argo-rollouts/pull/210/diff#D1-74 and https://codecov.io/gh/argoproj/argo-rollouts/pull/210/diff#D1-194

@jessesuen jessesuen force-pushed the experiment-analysis-integration branch from 74ee8bf to 874c3e4 Compare October 28, 2019 20:11
@jessesuen jessesuen merged commit 6278c47 into argoproj:master Oct 28, 2019
@jessesuen jessesuen deleted the experiment-analysis-integration branch October 28, 2019 20:41
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.

2 participants