Skip to content

Improve error handling#689

Merged
imobachgs merged 8 commits intoagama-project:masterfrom
imobachgs:improve-error-handling
Aug 8, 2023
Merged

Improve error handling#689
imobachgs merged 8 commits intoagama-project:masterfrom
imobachgs:improve-error-handling

Conversation

@imobachgs
Copy link
Copy Markdown
Contributor

@imobachgs imobachgs commented Aug 3, 2023

  • An attempt to address some of the issues reported in Miscellaneous problems with agama config set #688.
  • Fix handling of users/root settings: the CLI ignored the settings but did not report any problem. This bug was introduced in Better Settings derive macro #666. I needed to extend the derive macro to support flatten (in serde jargon) fields.
  • Extend the agama_settings documentation to explain better how it works.
Click for a documentation screenshot 😉

Screenshot from 2023-08-04 13-42-54

@imobachgs imobachgs marked this pull request as draft August 3, 2023 14:14
@coveralls
Copy link
Copy Markdown

coveralls commented Aug 3, 2023

Coverage Status

coverage: 72.098% (-0.06%) from 72.158% when pulling a81fd69 on imobachgs:improve-error-handling into 9c7a6ad on openSUSE:master.

@mvidner
Copy link
Copy Markdown
Contributor

mvidner commented Aug 4, 2023

I can't figure out which problem is solved by c7fed77 "Fix the detection of unknown attributes from config set/add"

@mvidner
Copy link
Copy Markdown
Contributor

mvidner commented Aug 4, 2023

OK, this now works:

agama config set user.user_name=tux user.password=foo
agama config set root.password=foo
agama config set root.sshPublicKey=Roooot

@imobachgs imobachgs marked this pull request as ready for review August 4, 2023 12:46
@imobachgs
Copy link
Copy Markdown
Contributor Author

I can't figure out which problem is solved by c7fed77 "Fix the detection of unknown attributes from config set/add"

In some cases, the old code implemented 1-line methods that just returned Ok(()). Now I have fixed the condition to determine when to implement a method.

@imobachgs
Copy link
Copy Markdown
Contributor Author

I would recommend generating the documentation for agama_settings with cargo doc --no-deps --package agama-settings --open.

Copy link
Copy Markdown
Contributor

@teclator teclator left a comment

Choose a reason for hiding this comment

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

LGTM

@imobachgs imobachgs merged commit 4ec913f into agama-project:master Aug 8, 2023
@imobachgs imobachgs deleted the improve-error-handling branch August 8, 2023 09:31
@imobachgs imobachgs mentioned this pull request Sep 26, 2023
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