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

Store experiment when it was created #662

Merged
merged 6 commits into from
Jul 7, 2020
Merged

Conversation

cwen0
Copy link
Member

@cwen0 cwen0 commented Jun 29, 2020

Signed-off-by: cwen0 [email protected]

What problem does this PR solve?

Fix #657 #557

What is changed and how does it work?

  • store experiment when it was created
  • add archived field to archive_eperiment struct, when some experiment was deleted and update archived to true

@codecov-commenter
Copy link

codecov-commenter commented Jun 29, 2020

Codecov Report

Merging #662 into master will decrease coverage by 1.12%.
The diff coverage is 31.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #662      +/-   ##
==========================================
- Coverage   55.78%   54.65%   -1.13%     
==========================================
  Files          68       68              
  Lines        4383     4574     +191     
==========================================
+ Hits         2445     2500      +55     
- Misses       1768     1887     +119     
- Partials      170      187      +17     
Impacted Files Coverage Δ
api/v1alpha1/podchaos_types.go 37.14% <ø> (ø)
controllers/networkchaos/ipset/ipset.go 37.14% <0.00%> (ø)
pkg/utils/chaosdaemon.go 51.21% <0.00%> (ø)
pkg/utils/grpc.go 0.00% <0.00%> (ø)
pkg/webhook/inject/inject.go 73.49% <0.00%> (-0.68%) ⬇️
pkg/store/experiment/experiment.go 23.14% <9.72%> (-15.63%) ⬇️
pkg/httpfs/fs.go 31.48% <31.48%> (ø)
controllers/twophase/types.go 54.20% <40.00%> (-1.68%) ⬇️
controllers/networkchaos/netem/types.go 47.27% <50.00%> (ø)
pkg/utils/selector.go 53.15% <66.66%> (+0.91%) ⬆️
... and 5 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 f39a01c...884dbbc. Read the comment docs.

@yeya24
Copy link
Contributor

yeya24 commented Jun 29, 2020

TBH I don't think it is a good choice. The experiment object can be updated/changed after it is created. Then do we want to update the archive experiment in db every time?

@cwen0
Copy link
Member Author

cwen0 commented Jun 30, 2020

TBH I don't think it is a good choice. The experiment object can be updated/changed after it is created. Then do we want to update the archive experiment in db every time?

Yes, I think updating it in DB every time is ok. 😂, I don't want to use finalizers any more.

Signed-off-by: cwen0 <[email protected]>
@cwen0 cwen0 requested review from yeya24, fewdan and YangKeao and removed request for yeya24 June 30, 2020 11:19
cwen0 added 2 commits July 1, 2020 11:40
Signed-off-by: cwen0 <[email protected]>
Signed-off-by: cwen0 <[email protected]>
Copy link
Member

@fewdan fewdan left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-srebot
Copy link
Contributor

@fewdan, Thanks for your review, however we are sorry that your vote won't be count. You are not a reviewer or committer or co-leader or leader.

@cwen0
Copy link
Member Author

cwen0 commented Jul 6, 2020

@YangKeao @yeya24 PTAL, thanks!

@g1eny0ung g1eny0ung self-requested a review July 7, 2020 09:18
@ti-srebot
Copy link
Contributor

@g1eny0ung, Thanks for your review, however we are sorry that your vote won't be count. You are not a reviewer or committer or co-leader or leader for the related sigs:chaos-mesh(slack).

@fewdan
Copy link
Member

fewdan commented Jul 7, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@cwen0 merge failed.

@cwen0 cwen0 merged commit f03febf into chaos-mesh:master Jul 7, 2020
@cwen0 cwen0 deleted the fix_archive branch July 7, 2020 09:52
shonge pushed a commit to shonge/chaos-mesh that referenced this pull request Jul 7, 2020
sjwsl pushed a commit to sjwsl/chaos-mesh that referenced this pull request May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail to archive experiment
6 participants