Skip to content
This repository was archived by the owner on Jun 19, 2020. It is now read-only.

(FACT-2565) Debian development versions causes fatal error when resolving os.release#466

Merged
BogdanIrimie merged 7 commits intomasterfrom
FACT-2565
Apr 24, 2020
Merged

(FACT-2565) Debian development versions causes fatal error when resolving os.release#466
BogdanIrimie merged 7 commits intomasterfrom
FACT-2565

Conversation

@Filipovici-Andrei
Copy link
Copy Markdown
Contributor

No description provided.

@Filipovici-Andrei Filipovici-Andrei added the bugfix Something isn't working label Apr 22, 2020
@Filipovici-Andrei Filipovici-Andrei requested review from a team April 22, 2020 12:18
Comment thread lib/facts/debian/os/distro/release.rb Outdated
Comment thread lib/facts/debian/os/distro/release.rb Outdated
Comment thread lib/facts/debian/os/release.rb Outdated
BogdanIrimie
BogdanIrimie previously approved these changes Apr 24, 2020
@BogdanIrimie BogdanIrimie merged commit f376a2a into master Apr 24, 2020
@BogdanIrimie BogdanIrimie deleted the FACT-2565 branch April 24, 2020 12:02
Comment on lines +28 to +34
begin
fact = CoreFact.new(searched_fact)
fact.create
rescue StandardError => e
@@log.error(e.backtrace.join("\n"))
nil
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This will catch all the errors, even dev errors and unhandled cases even from resolvers and will just output a backtrace. I don't think this is the way to go for this situation.
If i call a method on nil in the resolver, this part will catch it for example and return nil, passing nil around and generating more errors.

Filipovici-Andrei added a commit that referenced this pull request Apr 28, 2020
…ving os.release (#466)

* (FACT-2565) fixed fact for when release does not have minor version
refactored unit tests
* (FACT-2565) when fact throws exception, it's value is not stored and the failure is logged
* (FACT-2565) simplified condition for release minor
* (FACT-2565) refactore release hash
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants