Skip to content

Conversation

@mvidner
Copy link
Contributor

@mvidner mvidner commented Jun 26, 2025

Problem

  1. reported by Leo Manfredi: When using a relative reference in files, agama config generate does not resolve them
  files: [{
     destination: '/usr/local/share/dummy.xml',
     url: 'dummy.xml',
     chroot: false,
  }],
  1. it is because the config fails schema validation (differently in Leo's case and my test case)
  2. Agama outputs a validation failure message, and the invalid config, without resolving references. (Outputting the invalid config is intentional to make debugging easy)
  3. It also does not stop processing at that point. That is IMHO the real bug

Solution

Short description of the fix.

Testing

  • for now just modify a test to show the bug

Screenshots

If the fix affects the UI attach some screenshots here.

Documentation

Remember to look at it from the user's perspective. Yes you have made the compiler happy.
But will the humans even know about your contribution? Sometimes they cannot miss it,
other times they need advertisement and explanation.

Look for relevant sections and adjust:

@coveralls
Copy link

Coverage Status

coverage: 64.279% (-11.9%) from 76.147%
when pulling 6458324 on relative-urlref-files
into e9b4908 on master.

@imobachgs
Copy link
Contributor

The source of the problem is that the profile is not valid. The behaviour of the agama config generate project is pretty confusing, because it prints the profile and the user might think it was processed despite the error. See https://github.com/agama-project/agama/blob/master/rust/agama-cli/src/config.rs#L233.

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.

4 participants