unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to test fixed output derivations in the bordeaux build farm?
@ 2024-05-18 11:28 Christopher Baines
  2024-06-01 13:26 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2024-05-18 11:28 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

Hey!

I'd like to do more testing of fixed output derivations, both in general
and for patches/branches via QA.

In particular, it would be useful to test specific operations in the
derivation, e.g. downloading just from upstream. Being able to control
this is also necessary to prevent the bordeaux build farm downloading a
previous result from itself via the content addressed mirror or download
nar fallbacks in fixed output derivations.

I've had a look at the GUIX_DOWNLOAD_METHODS environment variable, which
is looked at by the url-fetch procedure, but this seems to work by
generating different derivations, rather than changing the behaviour of
the derivation at build time.

It seems sensible to me to add download-methods to the impureEnvVars so
that this can be passed in when the derivation is built. As far as I can
see though, the only way to set these impureEnvVars is in the
environment when you start the daemon, right? That's very inflexible,
but given most of these variables look like they could/should come from
the client environment (LC_ALL, LC_MESSAGES, LANG adn COLUMNS) maybe
that part of the problem can be addressed in the protocol/daemon.

Have I missed anything?

Thanks,

Chris

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to test fixed output derivations in the bordeaux build farm?
  2024-05-18 11:28 How to test fixed output derivations in the bordeaux build farm? Christopher Baines
@ 2024-06-01 13:26 ` Ludovic Courtès
  2024-07-11  9:57   ` Simon Tournier
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2024-06-01 13:26 UTC (permalink / raw)
  To: Christopher Baines; +Cc: guix-devel

Hi!

Christopher Baines <mail@cbaines.net> skribis:

> I've had a look at the GUIX_DOWNLOAD_METHODS environment variable, which
> is looked at by the url-fetch procedure, but this seems to work by
> generating different derivations, rather than changing the behaviour of
> the derivation at build time.

Yes.  You can’t “change the behavior of derivations” at build time,
except by passing GUIX_DOWNLOAD_METHODS to guix-daemon itself, provided
GUIX_DOWNLOAD_METHODS is also in ‘impureEnvVars’ of said derivation, as
you wrote.

I agree this is inflexible but I couldn’t think of a better way.

Thoughts?

Ludo’.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to test fixed output derivations in the bordeaux build farm?
  2024-06-01 13:26 ` Ludovic Courtès
@ 2024-07-11  9:57   ` Simon Tournier
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Tournier @ 2024-07-11  9:57 UTC (permalink / raw)
  To: Ludovic Courtès, Christopher Baines; +Cc: guix-devel

Hi,

On Sat, 01 Jun 2024 at 15:26, Ludovic Courtès <ludo@gnu.org> wrote:

> Yes.  You can’t “change the behavior of derivations” at build time,
> except by passing GUIX_DOWNLOAD_METHODS to guix-daemon itself, provided
> GUIX_DOWNLOAD_METHODS is also in ‘impureEnvVars’ of said derivation, as
> you wrote.

It’s inflexible but the behaviour « can’t “change the behavior of
derivations” at build time » appears to me reasonable, no?  Well, I am
missing some context.

That’s said, since we are speaking about fixed-output derivations, one
way would to compute another derivation with the expected behaviour.
Somehow, the context is different [1] but rewriting the derivation
allows to bypass such inflexibility.

Bah, I do not know… I am missing context about the issue. :-)

1: https://simon.tournier.info/posts/2024-04-11-rewrite-drv.html

Cheers,
simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-11  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-18 11:28 How to test fixed output derivations in the bordeaux build farm? Christopher Baines
2024-06-01 13:26 ` Ludovic Courtès
2024-07-11  9:57   ` Simon Tournier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).