Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add initial implementation of RFC 7464 JSON stream #58408

Draft
wants to merge 10 commits into
base: devel
from

Conversation

2 participants
@webknjaz
Copy link
Member

commented Jun 26, 2019

SUMMARY

Implement JSON streaming according to RFC 7464 which should allow ignoring any garbage in between JSON records in a robust fashion.

Ref: https://tools.ietf.org/html/rfc7464
Ref: https://en.wikipedia.org/wiki/JSON_streaming#Record_separator-delimited_JSON

Related: #13620

Fixes #54949 (potentially)

ISSUE TYPE
  • Bugfix Pull Request
  • Feature Pull Request
COMPONENT NAME

N/A

ADDITIONAL INFORMATION

RFC 7464 describes a way of streaming a series of JSON documents wrapped with RS and LF markers.

@ansibot

This comment was marked as outdated.

Copy link
Contributor

commented Jun 26, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/module_utils/common/_memoryview_compat.py:12:17: undefined-variable Undefined variable 'buffer'

The test ansible-test sanity --test import --python 2.6 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ValueError: Attempted relative import in non-package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ValueError: Attempted relative import in non-package

The test ansible-test sanity --test import --python 2.7 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ValueError: Attempted relative import in non-package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ValueError: Attempted relative import in non-package

The test ansible-test sanity --test import --python 3.5 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: SystemError: Parent module '' not loaded, cannot perform relative import
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: SystemError: Parent module '' not loaded, cannot perform relative import

The test ansible-test sanity --test import --python 3.6 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ImportError: attempted relative import with no known parent package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ImportError: attempted relative import with no known parent package

The test ansible-test sanity --test import --python 3.7 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ImportError: attempted relative import with no known parent package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ImportError: attempted relative import with no known parent package

The test ansible-test sanity --test import --python 3.8 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ImportError: attempted relative import with no known parent package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ImportError: attempted relative import with no known parent package

click here for bot help

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Jun 26, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/module_utils/common/_memoryview_compat.py:12:17: undefined-variable Undefined variable 'buffer'

The test ansible-test sanity --test import --python 2.6 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ValueError: Attempted relative import in non-package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ValueError: Attempted relative import in non-package

The test ansible-test sanity --test import --python 2.7 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ValueError: Attempted relative import in non-package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ValueError: Attempted relative import in non-package

The test ansible-test sanity --test import --python 3.5 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: SystemError: Parent module '' not loaded, cannot perform relative import
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: SystemError: Parent module '' not loaded, cannot perform relative import

The test ansible-test sanity --test import --python 3.6 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ImportError: attempted relative import with no known parent package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ImportError: attempted relative import with no known parent package

The test ansible-test sanity --test import --python 3.7 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ImportError: attempted relative import with no known parent package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ImportError: attempted relative import with no known parent package

The test ansible-test sanity --test import --python 3.8 [explain] failed with 2 errors:

lib/ansible/module_utils/_json_streams_rfc7464.py:5:0: ImportError: attempted relative import with no known parent package
lib/ansible/module_utils/common/_memoryview_compat.py:1:0: ImportError: attempted relative import with no known parent package

click here for bot help

@ansibot ansibot added the ci_verified label Jun 26, 2019

webknjaz added some commits Jun 26, 2019

@webknjaz webknjaz force-pushed the webknjaz:feature/rfc7464-json-records-streaming branch from e39a529 to f87efbf Jul 2, 2019

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Jul 2, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/module_utils/common/_memoryview_compat.py:12:17: undefined-variable Undefined variable 'buffer'

The test ansible-test sanity --test import --python 2.6 [explain] failed with 1 error:

lib/ansible/module_utils/_json_streams_rfc7464.py:7:0: ValueError: Attempted relative import in non-package

The test ansible-test sanity --test import --python 2.7 [explain] failed with 1 error:

lib/ansible/module_utils/_json_streams_rfc7464.py:7:0: ValueError: Attempted relative import in non-package

The test ansible-test sanity --test import --python 3.5 [explain] failed with 1 error:

lib/ansible/module_utils/_json_streams_rfc7464.py:7:0: SystemError: Parent module '' not loaded, cannot perform relative import

The test ansible-test sanity --test import --python 3.6 [explain] failed with 1 error:

lib/ansible/module_utils/_json_streams_rfc7464.py:7:0: ImportError: attempted relative import with no known parent package

The test ansible-test sanity --test import --python 3.7 [explain] failed with 1 error:

lib/ansible/module_utils/_json_streams_rfc7464.py:7:0: ImportError: attempted relative import with no known parent package

The test ansible-test sanity --test import --python 3.8 [explain] failed with 1 error:

lib/ansible/module_utils/_json_streams_rfc7464.py:7:0: ImportError: attempted relative import with no known parent package

click here for bot help

@ansibot

This comment was marked as outdated.

Copy link
Contributor

commented Jul 2, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/module_utils/common/_memoryview_compat.py:12:17: undefined-variable Undefined variable 'buffer'

click here for bot help

webknjaz added some commits Jul 2, 2019

@ansibot

This comment was marked as resolved.

Copy link
Contributor

commented Jul 2, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/module_utils/common/_memoryview_compat.py:14:17: undefined-variable Undefined variable 'buffer'

click here for bot help

@ansibot ansibot removed the ci_verified label Jul 2, 2019

@ansibot ansibot added the stale_ci label Jul 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.