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

Create issue for detached addons #5084

Merged
merged 2 commits into from
May 23, 2024
Merged

Create issue for detached addons #5084

merged 2 commits into from
May 23, 2024

Conversation

mdegat01
Copy link
Contributor

Proposed change

Create an issue if we detect a detached addon so we can make this into a repair and inform users they aren't receiving updates for these addons.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to cli pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Ruff (ruff format supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@mdegat01 mdegat01 added the new-feature A new feature label May 16, 2024
@mdegat01 mdegat01 requested a review from agners May 16, 2024 20:45
@mdegat01
Copy link
Contributor Author

@agners I choose not to include the repo URL in stored addon data. Detached addons where the repo was removed generally shouldn't happen other then current users hit with bugs in the past (and that won't help them).

Each addon includes a URL linking to where to find information for that particular addon. So I'm going to link to that in the repair and tell people to find more info there. That is available even for existing users in this situation.

@property
def states(self) -> list[CoreState]:
"""Return a list of valid states when this check can run."""
return [CoreState.RUNNING, CoreState.SETUP]
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't RUNNING makes this a periodical check?

I think once at startup should be enough.

@agners agners requested a review from pvizeli May 21, 2024 07:16
@agners agners mentioned this pull request May 21, 2024
12 tasks
@property
def states(self) -> list[CoreState]:
"""Return a list of valid states when this check can run."""
return [CoreState.RUNNING, CoreState.SETUP]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return [CoreState.RUNNING, CoreState.SETUP]
return [CoreState.STARTUP, CoreState.RUNNING]

At this point, addons are loaded, SETUP can be to early I feel. I guess we need RUNNING as well detect detach add-ons after store updates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pvizeli we can do either. Currently the healthcheck during SETUP is at the very end after everything else in that step so all addon information is loaded:

await self.sys_resolution.evaluate.evaluate_system()

I just removed RUNNING from there as per @agners request although I can add it back if we want. Once at startup of supervisor seemed like enough, this should be uncommon other then possibly the source code of a local add-on being removed so I don't think we need to catch this immediately.

Copy link
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

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

Okay, let's test that

@pvizeli pvizeli merged commit f150a19 into main May 23, 2024
19 checks passed
@pvizeli pvizeli deleted the detached-addon-repair branch May 23, 2024 07:36
@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants