Skip to content

[AIRFLOW-5039] Fix broken XCom JSON serialization#6273

Closed
roo-oliv wants to merge 1 commit into
apache:masterfrom
roo-oliv:json-xcom-datetime-support
Closed

[AIRFLOW-5039] Fix broken XCom JSON serialization#6273
roo-oliv wants to merge 1 commit into
apache:masterfrom
roo-oliv:json-xcom-datetime-support

Conversation

@roo-oliv
Copy link
Copy Markdown

@roo-oliv roo-oliv commented Oct 7, 2019

Make sure you have checked all steps below.

https://issues.apache.org/jira/browse/AIRFLOW-5039

Jira

  • My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"
    • https://issues.apache.org/jira/browse/AIRFLOW-XXX
    • In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.
    • In case you are proposing a fundamental code change, you need to create an Airflow Improvement Proposal (AIP).
    • In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

Description

  • Here are some details about my PR, including screenshots of any UI changes:

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

Comment thread tests/models/test_xcom.py
serialized = XCom.serialize_value(value)

# then
self.assertEqual("", serialized)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⁉️

Copy link
Copy Markdown
Author

@roo-oliv roo-oliv Oct 7, 2019

Choose a reason for hiding this comment

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

Sorry for that @ashb, this PR is in draft because I'm yet to add unit tests.

@stale
Copy link
Copy Markdown

stale Bot commented Nov 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Nov 21, 2019
@stale stale Bot closed this Nov 28, 2019
@rifqifatih
Copy link
Copy Markdown

rifqifatih commented May 25, 2020

Hi @allrod5, I'm trying to overcome a similar issue and noticed that this PR is not yet merged. Is there anything left to be done beside the unit test?

Edit: might be able to help on unit test if needed.

@roo-oliv
Copy link
Copy Markdown
Author

Hi @rifqifatih, I've come to realize that the issue was not with Airflow itself but that my project was relying on Airflow saving and loading datetimes objects directly without my code having to serialize and deserialize these datetimes.

So I'm unsure if this is a behaviour Airflow wants to keep (doesn't seem that logical to have this datetime parsing enabled by default at least).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants