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

Remove NeedsServices from components #5780

Merged
merged 6 commits into from
Nov 24, 2023

Conversation

rfratto
Copy link
Member

@rfratto rfratto commented Nov 15, 2023

This PR removes the NeedsServices field from component registration. See #5777 for context.

I've split the PR across several commits to make it more readable.

Closes #5777.

Update the cluster service to stop looking at dependant components when
notifying clustered components of a cluster update.

Related to grafana#5777, as components will no longer be able to declare a
dependancy on a service.
Change the doc comment of service.Data to note that the returned data
must not rely on runtime config.

Related to grafana#5777, as components will no longer directly depend on
services. If service.Data relied on the runtime config, it would open
the door for hidden circular dependencies.
This commit fully removes the dependency from components to services,
leaving the NeedsServices field in component.Registration ignored.

Related to grafana#5777.
Remove the unused NeedsServices field.

Related to grafana#5777.
Update the CHANGELOG and docs to reflect the dropped requirement that
components must depend on consumed services.

Closes grafana#5777.
@rfratto rfratto requested review from a team and clayton-cornell as code owners November 15, 2023 15:04
Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

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

Doc changes are small - looks good as-is

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Nov 15, 2023
Copy link
Contributor

@wildum wildum left a comment

Choose a reason for hiding this comment

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

LGTM

@rfratto rfratto merged commit adba793 into grafana:main Nov 24, 2023
10 checks passed
@rfratto rfratto deleted the remove-needsservices branch November 24, 2023 13:11
hainenber pushed a commit to hainenber/agent that referenced this pull request Nov 25, 2023
* service/cluster: stop using dependant components

Update the cluster service to stop looking at dependant components when
notifying clustered components of a cluster update.

Related to grafana#5777, as components will no longer be able to declare a
dependancy on a service.

* service: add soft requirement that data must not rely on runtime config

Change the doc comment of service.Data to note that the returned data
must not rely on runtime config.

Related to grafana#5777, as components will no longer directly depend on
services. If service.Data relied on the runtime config, it would open
the door for hidden circular dependencies.

* flow: remove dependency from components to services

This commit fully removes the dependency from components to services,
leaving the NeedsServices field in component.Registration ignored.

Related to grafana#5777.

* component: remove NeedsServices field

Remove the unused NeedsServices field.

Related to grafana#5777.

* misc: update CHANGELOG and docs for grafana#5777

Update the CHANGELOG and docs to reflect the dropped requirement that
components must depend on consumed services.

Closes grafana#5777.
@github-actions github-actions bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Feb 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove requirement that components must depend on consumed services
4 participants