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

Fix string encoding in DockerOperator when using xcom / json #13536

Merged
merged 1 commit into from
Jul 26, 2021

Conversation

AlessioM
Copy link
Contributor

@AlessioM AlessioM commented Jan 7, 2021

closes: #13535

fixes the xcom issue by decoding the byte array of the log file before submitting it to xcom

@boring-cyborg
Copy link

boring-cyborg bot commented Jan 7, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@turbaszek turbaszek changed the title fix string encoding when using xcom / json Fix string encoding in DockerOperator when using xcom / json Jan 7, 2021
@github-actions
Copy link

github-actions bot commented Jan 7, 2021

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Jan 7, 2021
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@dimberman
Copy link
Contributor

@AlessioM can you please rebase on master?

@AlessioM
Copy link
Contributor Author

@AlessioM can you please rebase on master?

sorry for taking so long, done just now

@enima2684
Copy link
Contributor

Many thanks for working on that issue !
Looking forward to use the fix !

@fsalvini
Copy link

Hi @AlessioM, thank you very much for this fix.
Will you be able to find the time to complete this PR?

@cjk
Copy link

cjk commented Apr 12, 2021

I'm still running into #13487 in Airflow 2.0.1 - hope this gets merged soon. 🙏

@RosterIn
Copy link
Contributor

@AlessioM you will need to rebase to fix the conflicts

@RosterIn
Copy link
Contributor

RosterIn commented May 4, 2021

hi @kaxil @AlessioM @turbaszek is there a way to make progress with this fix?
This ismuch needed I don't mind open a new PR copying the code here so it can be finally merged but it seems like rebase this is very simple.

@AlessioM
Copy link
Contributor Author

AlessioM commented May 4, 2021

sorry,that it takes so long, hard to find time at the moment
we are running the patch in production at the moment and are currently investigating an issue with German Umlauts in log messages. Not sure yet if its because of this fix or some other issue

@fredthomsen
Copy link
Contributor

I am curious as to the issues/log messages being encountered here. I have had to patch our DockerOperator using this version and it seems to be running without issues.

@potiuk
Copy link
Member

potiuk commented Jul 26, 2021

@AlessioM I will rebase it for you (as I added some changes in Docker Operator) - I am just about to FINALLY release RC2 of providers so I would love to get that one in.

@potiuk
Copy link
Member

potiuk commented Jul 26, 2021

I rebased and pushed it @AlessioM :) (I also changed ADDITIONAL_INFO to CHANGELOG :)

@potiuk
Copy link
Member

potiuk commented Jul 26, 2021

I simplified it a bit more (there was no need to use logs, It's much simpler if we used already available array of potentially decoded lines and added more comprehensive tests

@potiuk potiuk requested a review from turbaszek July 26, 2021 17:10
@potiuk potiuk merged commit cd3307f into apache:main Jul 26, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Jul 26, 2021

Awesome work, congrats on your first merged pull request!

nathadfield pushed a commit to king/airflow that referenced this pull request Jul 29, 2021
Co-authored-by: Alessio Montuoro <[email protected]>
Co-authored-by: Jarek Potiuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
okay to merge It's ok to merge this PR as it does not require more tests pending-response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DockerOperator / XCOM : TypeError: Object of type bytes is not JSON serializable
10 participants