Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

k8s_log no longer attempts to parse log as JSON #69

Merged

Conversation

fabianvf
Copy link
Collaborator

@fabianvf fabianvf commented Mar 31, 2020

SUMMARY

Fixes #68

Rather than relying on the default serialization logic (which attempts to parse a log as JSON and then load it into a wrapper class), we now simply return the raw log data as expected. The previous behavior worked in many cases because the log was serialized into a JSON string, but in the case of #68 the log was loaded as a JSON float, which made the error handling fail to fallback to returning the raw data.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

k8s_log

Fixes ansible-collections#68

Rather than relying on the default serialization logic (which attempts
    to parse a log as JSON and then load it into a wrapper class), we
now simply return the raw log data as expected. The previous behavior
worked in many cases because the log was serialized into a JSON string,
       but in the case of ansible-collections#68 the log was loaded as a JSON float, which
       made the error handling fail to fallback to returning the raw
       data.
@fabianvf fabianvf requested a review from geerlingguy March 31, 2020 18:56
@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #69 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #69   +/-   ##
=======================================
  Coverage   43.33%   43.33%           
=======================================
  Files           3        3           
  Lines         540      540           
  Branches      109      109           
=======================================
  Hits          234      234           
  Misses        263      263           
  Partials       43       43           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 493b6e3...2191825. Read the comment docs.

molecule/default/tasks/log.yml Outdated Show resolved Hide resolved
@geerlingguy geerlingguy merged commit dd8b716 into ansible-collections:master Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

k8s_log fails to read job logs
2 participants