Skip to content

Allow skipping profile fetch errors#882

Merged
imobachgs merged 2 commits intomasterfrom
add-skip-profile-fetch-error
Mar 21, 2025
Merged

Allow skipping profile fetch errors#882
imobachgs merged 2 commits intomasterfrom
add-skip-profile-fetch-error

Conversation

@imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Mar 20, 2025

If the environment variable YAST_SKIP_PROFILE_FETCH_ERROR is set to "1", the error is skipped.

Problem

Agama tries to fetch the profiles from predefined locations if no URL is given. See agama-project/agama#2180 for further details.

The problem is that, when the profile does not exist, the AutoYaST code reports an error and it should not do it because it is expected to search for those profiles silently.

Solution

Allow to disable the error by setting the environment variable YAST_SKIP_PROFILE_FETCH_ERROR.

Testing

  • Added a new unit test

@imobachgs imobachgs force-pushed the add-skip-profile-fetch-error branch 2 times, most recently from ce5939a to f0ac162 Compare March 20, 2025 11:46
@coveralls
Copy link

coveralls commented Mar 20, 2025

Coverage Status

coverage: 69.018%. remained the same
when pulling b03bfb9 on add-skip-profile-fetch-error
into 468d07d on master.

@imobachgs imobachgs force-pushed the add-skip-profile-fetch-error branch from f0ac162 to b03bfb9 Compare March 20, 2025 11:51
@mchf
Copy link
Member

mchf commented Mar 21, 2025

NP: Do we plan an env variable for disabling the search completely?

@imobachgs imobachgs merged commit 85fa770 into master Mar 21, 2025
12 checks passed
@imobachgs imobachgs deleted the add-skip-profile-fetch-error branch March 21, 2025 13:48
@imobachgs
Copy link
Contributor Author

NP: Do we plan an env variable for disabling the search completely?

Not at this point. We just want to be able to silently fail in this case.

@github-actions
Copy link

✅ Autosubmission job #13993237386 successfully finished
✅ Created submit request #1255023

imobachgs added a commit to agama-project/agama that referenced this pull request Mar 24, 2025
## Problem

Linuxrc & AutoYaST used to load profiles from predefined locations
automatically. Some customers and partners depend on such behavior, so
Agama should behave in the same way.

## Solution

If no URL was given, Agama tries to load the profile from the following
locations:

- An `autoinst.jsonnet`, `autoinst.json` and `autoinst.xml` files
located on a file system labeled as `OEMDRV`.
- An `autoinst.jsonnet`, `autoinst.json` and `autoinst.xml` files in the
root file system.

## Testing

- *Tested manually*

## To do

- [x] Do not report an error if any of the fallback profiles do not work
(see yast/yast-autoinstallation#882).
- [x] Read profiles from the predefined locations.
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