You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/05 03:36:43 UTC
[GitHub] [airflow] retornam opened a new pull request #7628: [AIRFLOW-4363]
Fix JSON encoding error
retornam opened a new pull request #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628
From the docker-py code comments for APIClient pull,
the decode parameter should be set to True, when the
stream parameter is also set to True. This will allow
decoding JSON data returned from the docker registry
server into dicts
Signed-off-by: Raymond Etornam <re...@users.noreply.github.com>
---
Issue link: WILL BE INSERTED BY [boring-cyborg](https://github.com/kaxil/boring-cyborg)
Make sure to mark the boxes below before creating PR: [x]
- [x ] Description above provides context of the change
- [x] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN = JIRA ID<sup>*</sup>
- [x] Unit tests coverage for changes (not needed for documentation changes)
- [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
- [x] Relevant documentation is updated including usage instructions.
- [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
<sup>*</sup> For document-only changes commit message can start with `[AIRFLOW-XXXX]`.
---
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] brokenjacobs commented on issue #7628: [AIRFLOW-4363] Fix
JSON encoding error
Posted by GitBox <gi...@apache.org>.
brokenjacobs commented on issue #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628#issuecomment-613157873
remove the entire json.loads() line... change the loop:
```for output in self.cli.pull(self.image, stream=True, decode=True):```
That fixes it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] brokenjacobs edited a comment on issue #7628:
[AIRFLOW-4363] Fix JSON encoding error
Posted by GitBox <gi...@apache.org>.
brokenjacobs edited a comment on issue #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628#issuecomment-613148448
This breaks the pull functionality because the very next function in the loop tries to do a string decode on this dictionary.
Leading to:
``` File "airflow/operators/docker_operator.py", line 269, in execute
output = json.loads(l.decode('utf-8').strip())
AttributeError: 'dict' object has no attribute 'decode'```
Basically this entire PR breaks image pulls as written.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] brokenjacobs commented on issue #7628: [AIRFLOW-4363] Fix
JSON encoding error
Posted by GitBox <gi...@apache.org>.
brokenjacobs commented on issue #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628#issuecomment-613155263
Testing a fix right now.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] dimberman commented on issue #7628: [AIRFLOW-4363] Fix
JSON encoding error
Posted by GitBox <gi...@apache.org>.
dimberman commented on issue #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628#issuecomment-613152886
Darn. @brokenjacobs do you have a suggestion for a fix for this?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] brokenjacobs commented on issue #7628: [AIRFLOW-4363] Fix
JSON encoding error
Posted by GitBox <gi...@apache.org>.
brokenjacobs commented on issue #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628#issuecomment-613148448
This breaks the pull functionality because the very next function in the loop tries to do a string decode on this dictionary.
Leading to:
``` File "airflow/operators/docker_operator.py", line 269, in execute
output = json.loads(l.decode('utf-8').strip())
AttributeError: 'dict' object has no attribute 'decode'```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] dimberman merged pull request #7628: [AIRFLOW-4363] Fix
JSON encoding error
Posted by GitBox <gi...@apache.org>.
dimberman merged pull request #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [airflow] retornam commented on issue #7628: [AIRFLOW-4363] Fix
JSON encoding error
Posted by GitBox <gi...@apache.org>.
retornam commented on issue #7628: [AIRFLOW-4363] Fix JSON encoding error
URL: https://github.com/apache/airflow/pull/7628#issuecomment-613156658
https://github.com/apache/airflow/pull/8287
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services