karmada icon indicating copy to clipboard operation
karmada copied to clipboard

[umbrella] [Help Wanted] [Code Writing Wanted] Add e2e Test for Lazy activation Policy

Open chaosi-zju opened this issue 1 year ago • 20 comments

What would you like to be added:

Add e2e Test for Lazy activation Policy.

A Lazy activation Policy is just like:

apiVersion: policy.karmada.io/v1alpha1
kind: PropagationPolicy
metadata:
  name: policy-delay
spec:
  activationPreference: Lazy  # a new field added here, which refers to lazy activation Policy
  resourceSelectors:
    - apiVersion: apps/v1
      kind: Deployment
  placement:
    clusterAffinity:
      clusterNames:
        - member1
        - member2

Then, if a policy sets this field, the policy changes will not take effect immediately but defer to the resource template changes, in other words, the resource template will not be propagated as per the current propagation rules until there is an update on resource template itself.

You you want to known more:

  • proposal PR: #4602
  • implemention PR: #4577
  • related issue: #4563

Why is this needed:

  • Consolidate the test protection for the lazy activation feature.
  • Help partners who are interested in the lazy activation feature to become more familiar with the detail behavior of it, and participate in contributing to the feature.
  • Help beginners contributes code in karmada.

Which cases need to be done:

If you are interested in this activity, I can assign some of the e2e test to you.

All cases are listed in here.

TODO List:

Feel free to ask me if there are any problems, and feel free to ask for assignment.

chaosi-zju avatar Feb 02 '24 08:02 chaosi-zju

/assign

Let me give it a try.

Affan-7 avatar Feb 07 '24 05:02 Affan-7

Hi Chaosi,

I was wondering where should I add these tests. Should I add them in the propogationpolicy_test.go? Or should I create a new file like lazy_activation_policy_test.go?

Affan-7 avatar Feb 07 '24 10:02 Affan-7

I was wondering where should I add these tests. Should I add them in the propogationpolicy_test.go? Or should I create a new file like lazy_activation_policy_test.go?

Hi @Affan-7, sorry for the delay, and thank you very much for your enthusiasm~

I would prefer a new file like lazy_activation_policy_test.go.

Besides, which cases you would like choose? I can assign cases one batch by on batch to you~

Because I actually hope that more partners can be involved, which will help partners better understand this new feature. But since we are celebrating the New Year and most people are on vacation, there is not much popularity recently, haha~

chaosi-zju avatar Feb 08 '24 02:02 chaosi-zju

I can work on Simple Case 1.

Because I actually hope that more partners can be involved, which will help partners better understand this new feature.

That sounds good! I appreciate your help and contributions to the community.

Affan-7 avatar Feb 08 '24 05:02 Affan-7

I can work on Simple Case 1.

Okey, your great effort will provide a important example to followers~ Looking forward to your PR~

Feel free to ask me if there are any problems.

chaosi-zju avatar Feb 08 '24 06:02 chaosi-zju

Unassigning myself so people don't think that I am working on the whole issue.

Affan-7 avatar Feb 20 '24 15:02 Affan-7

Can I work on this?

ewon78 avatar Feb 26 '24 08:02 ewon78

Can I work on this?

@ewon78 Hi, of course you can~

which cases would you prefer?

chaosi-zju avatar Feb 26 '24 13:02 chaosi-zju

@chaosi-zju I can work on Simple Case 3 and Simple Case 4, thanks~

zhzhuang-zju avatar Feb 27 '24 01:02 zhzhuang-zju

@chaosi-zju thanks. I can work on Combined Case 1 & 2.

ewon78 avatar Feb 27 '24 02:02 ewon78

Ok, thank you for your enthusiasm @zhzhuang-zju @ewon78 ~

Besides, since another friend Affan-7 has submited a PR #4622 which haven't been merged, please be careful not to have too many conflicts on file names or common codes, thanks~

chaosi-zju avatar Feb 27 '24 03:02 chaosi-zju

Hi @chaosi-zju, can you please assign me some more test cases?

Affan-7 avatar Mar 22 '24 10:03 Affan-7

can you please assign me some more test cases?

ok, of course, please just wait for a while~

chaosi-zju avatar Mar 23 '24 02:03 chaosi-zju

@Affan-7 hi, Does [Combined Case 3] fit for you?

chaosi-zju avatar Mar 23 '24 08:03 chaosi-zju

@chaosi-zju Hi, can I have a try on this?

hulizhe avatar Apr 06 '24 09:04 hulizhe

@chaosi-zju Hi, can I have a try on this?

I'm glad you're willing to work on this. You can take my tasks, and feel free to ask any questions~

zhzhuang-zju avatar Apr 06 '24 09:04 zhzhuang-zju

@ewon78 I'm very sorry for not following up your progress for a long time. I see that your PR CI failed. Can you rebase the latest code and deal with the CI problem? If you have any questions, please feel free to contact me. Thank you very much~

chaosi-zju avatar May 27 '24 01:05 chaosi-zju

hi @Affan-7, long time no contact, how is it going for Combined Case 3, is there any time for you to go on? Or is here any problem? ٩(๑❛ᴗ❛๑)۶

chaosi-zju avatar May 27 '24 01:05 chaosi-zju

Hi @chaosi-zju, I will surely get back to it on the weekends😅. I am not getting enough time to work on it.

Affan-7 avatar May 27 '24 04:05 Affan-7

I will surely get back to it on the weekends😅. I am not getting enough time to work on it.

OK! no rush, take your time :)

chaosi-zju avatar May 31 '24 07:05 chaosi-zju