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

Feat: support exit-on-lost-leader flag #868

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

chivalryq
Copy link
Member

@chivalryq chivalryq commented Aug 8, 2023

Description of your changes

Currently if we step-by-step debug the server for a longer time than RenewDeadline of leader election, the program will exit. This PR support a flag to switch this behavior.

If server starts with --exit-on-lost-leader=false, the server will keep running and try to become leader. If the debugging program is the only replica, it will become leader soon.

This PR also add a retry mechanism for application workflow sync. The max failure times is 5.

Fixes #

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run yarn lint to ensure the frontend changes are ready for review.
  • Run make reviewableto ensure the server changes are ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

Special notes for your reviewer

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage: 53.33% and project coverage change: +0.02% 🎉

Comparison is base (8438aa7) 58.43% compared to head (c368c9f) 58.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #868      +/-   ##
==========================================
+ Coverage   58.43%   58.45%   +0.02%     
==========================================
  Files         115      115              
  Lines       20039    20048       +9     
==========================================
+ Hits        11709    11719      +10     
+ Misses       6897     6896       -1     
  Partials     1433     1433              
Flag Coverage Δ
apiserver-unittests 32.00% <88.88%> (+0.10%) ⬆️
server-e2e-tests 47.83% <53.33%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
pkg/server/config/config.go 0.00% <0.00%> (ø)
pkg/server/domain/service/workflow.go 59.25% <0.00%> (ø)
pkg/server/server.go 53.57% <0.00%> (-0.16%) ⬇️
pkg/server/event/sync/worker.go 76.62% <100.00%> (+1.97%) ⬆️

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chivalryq chivalryq merged commit 7937d09 into kubevela:main Aug 8, 2023
15 of 16 checks passed
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.

None yet

2 participants