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

Add INITIALIZATION_ERROR statue for process initialization failure #2935

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

GuanqunYang193
Copy link

what

  • Added a new status of process, used for showing the process failed when initialization.
  • Supervisor will initiate a port selection and restart the process initialization if failure is detected during the process initialization.

why

If the process fails to start (due to, for instance, a port conflict), the previous design will attempt to retry the process using the same port.

how

In this new commit, the supervisor will confirm the successful initialization of the process. If the initialization fails, it will make up to three attempts to start the process again.

@GuanqunYang193 GuanqunYang193 requested review from BupycHuk and a team as code owners March 29, 2024 01:09
@GuanqunYang193 GuanqunYang193 requested review from idoqo and JiriCtvrtka and removed request for a team March 29, 2024 01:09
@GuanqunYang193 GuanqunYang193 changed the title add process init fail status Add INITIALIZATION_ERROR statue for process initialization failure Mar 29, 2024
Copy link
Member

@BupycHuk BupycHuk left a comment

Choose a reason for hiding this comment

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

Looks good to me, just few comments

agent/agents/process/process.go Outdated Show resolved Hide resolved
agent/agents/supervisor/supervisor_test.go Show resolved Hide resolved
agent/agents/supervisor/supervisor_test.go Show resolved Hide resolved
api/inventorypb/agent_status.dot Show resolved Hide resolved
api/inventorypb/agent_status.proto Outdated Show resolved Hide resolved
api/inventorypb/agent_status.proto Outdated Show resolved Hide resolved
Copy link

codecov bot commented May 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.76%. Comparing base (1d87743) to head (bd8647f).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2935      +/-   ##
==========================================
+ Coverage   43.29%   43.76%   +0.47%     
==========================================
  Files         399      398       -1     
  Lines       41381    43117    +1736     
==========================================
+ Hits        17915    18871     +956     
- Misses      21465    22246     +781     
+ Partials     2001     2000       -1     
Flag Coverage Δ
admin 11.61% <ø> (ø)
managed 44.41% <ø> (ø)
vmproxy 66.66% <ø> (ø)

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

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

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

3 participants