Skip to content

hive: add option to persistently disallow substitutes #264

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

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

Conversation

pks-t
Copy link
Contributor

@pks-t pks-t commented Feb 2, 2025

While Colmena provides a "--no-substitutes" flag to disable substitutes,
there is no way to persistently disable their use. Such an option would
be useful though in cases where one is deploying to a node that does not
have an internet connection, which would otherwise fail if the flag was
not given.

Introduce a new per-node "deployment.noSubstitute" option that allows
you to persistently disable the use of substitutes. This option defaults
to "false", which is in line with the current default. Furthermore, the
option gets overridden by the "--no-substitutes" command line flag.

Part of #187.

@pks-t pks-t force-pushed the pks-node-no-substitute branch 2 times, most recently from e1ef604 to 9df7194 Compare February 2, 2025 14:05
@pks-t pks-t force-pushed the pks-node-no-substitute branch from 9df7194 to 5d75fd5 Compare June 1, 2025 15:38
pks-t added 3 commits June 6, 2025 07:08
In the next commit, we're about to introduce a new per-node option that
disables substitutes by default. If set, the "--no-substitutes" command
line option shall continue to override that default, following our usual
rules of preference.

In order to override the default, we're also going to introduce a new
"--use-substitutes" option. But this will require us to distinguish the
cases where either of these flags has been set from the case where none
of them were passed:

  - "--no-substitutes" overrides the per-node option and disables
    substitutes.

  - "--use-substitutes overrides the per-node option and enables
    substitutes.

  - No flag will cause the per-node option to kick in.

Refactor the code so that we use an `Option<bool>`. This allows us to
easily discern the last case in subsequent commits.
While Colmena provides a "--no-substitutes" flag to disable substitutes,
there is no way to persistently disable their use. Such an option would
be useful though in cases where one is deploying to a node that does not
have an internet connection, which would otherwise fail if the flag was
not given.

Introduce a new per-node "deployment.noSubstitute" option that allows
you to persistently disable the use of substitutes. This option defaults
to "false", which is in line with the current default. Furthermore, the
option gets overridden by the "--no-substitutes" command line flag.
Introduce a new "--use-substitutes" option. While the use of substitutes
is enabled by default, they can be disabled per-node by setting the
"deployment.noSubstitutes" option. If so, specifying the new flag will
override that option and enable substitutes regardless of the per-node
option.
@pks-t pks-t force-pushed the pks-node-no-substitute branch from 5d75fd5 to 55b5a76 Compare June 6, 2025 05:09
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.

1 participant