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

Feature gate DownstreamPlaceholder::unknownCaOutput #8692

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

Ericson2314
Copy link
Member

Motivation

This is a part of CA derivations that we forgot to put behind the experimental feature.

Context

This was caught by @fricklerhandwerk in
#8369 (comment)

Checklist for maintainers

Maintainers: tick if completed or explain if not relevant

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.

@github-actions github-actions bot added new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority labels Jul 13, 2023
This is a part of CA derivations that we forgot to put behind the
experimental feature.

This was caught by @fricklerhandwerk in
NixOS#8369 (comment)
@Ericson2314 Ericson2314 force-pushed the add-another-xp-check branch from 89e0d9f to caabc4f Compare July 13, 2023 11:56
@Ericson2314 Ericson2314 marked this pull request as ready for review July 13, 2023 11:57
@Ericson2314 Ericson2314 added the ca-derivations Derivations with content addressed outputs label Jul 14, 2023
DownstreamPlaceholder::unknownCaOutput(drv.drvPath, outputName).render(),
store->printStorePath(outputPath)
);
}
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't there be an "else" here (like throwing an error)? Seems strange that we can do nothing if CA derivations are not enabled.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so actually. It is unclear but basically:

  1. The only way to get these placeholders is the outPaths of CA derivation outputs.
  2. If we don't have those, then there is nothing to substitute.
  3. If someone tried to hand-write one of these (rather than using outPath, it shouldn't work.

Today, it does work; this is mistakenly a bonus feature that can be used without ca-derivations with careful hand-coding. But I don't think we want that.

@thufschmitt thufschmitt self-assigned this Jul 24, 2023
@thufschmitt thufschmitt merged commit 5df0f17 into NixOS:master Aug 7, 2023
@Ericson2314 Ericson2314 deleted the add-another-xp-check branch August 7, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ca-derivations Derivations with content addressed outputs new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants