Skip to content

Conversation

@Ferroin
Copy link
Member

@Ferroin Ferroin commented Nov 4, 2025

Summary

This allows more intelligent fallback behavior, insisting on using native packages if they are being published (and are actually available) and only falling back if they aren’t. It also means that users installing on platforms we still have packages available for but no longer publish packages for will end up with static installs instead of native package installs.

This change includes a new option for the kickstart script called --install-type, which can be used to specify the install type to use. It supports five possible values currently, native, static, build, auto, and any. The first three are equivalent to the existing --native-only, --static-only, and --build-only options. The any value indicates to use our existing fallback behavior (try each install type in order until we find one that works). The auto value, which is the new default, acts like native if the script detects that we publish native packages for the platform, and any otherwise.

The actual checking done for auto involves confirming that:

  1. We have CI configured to publish native packages for the detected platform (confirmed looking for a flag file in the repositories that is generated by the repository backend code from .github/data/distros.yaml).
  2. A repository configuration package exists for the detected platform.
  3. Repository metadata exists for the selected release channel and the requested platform. This is used to confirm that we’ve actually published packages for the platform.

If either of the first two checks fail when in auto mode, the install itself will fall back to using static builds like it does currently.

If the third check fails when in auto mode, the install will fail with an error message indicating that packages have not yet been published for this platform, but are expected to be published soon. For nightlies it asks the user to try again tomorrow (which will almost always work), while for stable builds it suggests the possibility of using a nightly build or a static build for the install.

If all three checks pass when in auto mode but the package install fails, the install will fail with an error message indicating that the package couldn’t be installed despite appearing to be available, and suggests that the user should look into what’s wrong with their system, or try with any mode to install regardless.

Test Plan

Requires some manual testing to confirm that the changes behave as expected.

…form.

This allows more intelligent fallback behavior, insisting on using
native packages if they are being published (and are actually available)
and only falling back if they aren’t. It also means that users
installing on platforms we still have packages available for but no
longer publish packages for will end up with static installs instead of
native package installs.

This change includes a new option for the kickstart script called
`--install-type`, which can be used to specify the install type to use.
It supports five possible values currently, `native`, `static`, `build`,
`auto`, and `any`. The first three are equivalent to the existing
`--native-only`, `--static-only`, and `--build-only` options. The `any`
value indicates to use our existing fallback behavior (try each install
type in order until we find one that works). The `auto` value, which is
the new default, acts like `native` if the script detects that we
publish native packages for the platform, and `any` otherwise.

This is dependent on a flag file on the repository server that is
generated by our package upload processing code for platforms that we
publish native packages for.
@github-actions github-actions bot added the area/packaging Packaging and operating systems support label Nov 4, 2025
@Ferroin Ferroin marked this pull request as ready for review November 4, 2025 17:56
@Ferroin Ferroin requested a review from a team as a code owner November 4, 2025 17:57
@ilyam8 ilyam8 requested a review from Copilot November 5, 2025 12:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the installer script to rename NETDATA_FORCE_METHOD to NETDATA_REQUESTED_INSTALL_TYPE for improved clarity, and adds a new --install-type option along with enhanced logic to detect whether native packages are published for a platform.

Key changes:

  • Renames NETDATA_FORCE_METHOD variable to NETDATA_REQUESTED_INSTALL_TYPE throughout the script
  • Adds support for auto and any as new install type values
  • Implements a check for whether native packages are currently published for a platform
  • Adds a new --install-type <type> option to the help documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

With this change, the script now also checks for the presence of
repository metadata for the repository that would be used to install
Netdata. If the other checks pass but this one fails, a different error
message is show indicating that packages aren’t available yet, but will
be soon, with the stable install message providing info on how to
install anyway.
@ilyam8 ilyam8 requested a review from Copilot November 5, 2025 16:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/packaging Packaging and operating systems support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant