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 CI failures found while testing SDK with airflow 2.5.0 #1337

Closed
7 tasks
phanikumv opened this issue Dec 1, 2022 · 1 comment
Closed
7 tasks

Fix CI failures found while testing SDK with airflow 2.5.0 #1337

phanikumv opened this issue Dec 1, 2022 · 1 comment
Assignees
Labels
bug Something isn't working product/python-sdk Label describing products
Milestone

Comments

@phanikumv phanikumv added the bug Something isn't working label Dec 1, 2022
@feluelle feluelle self-assigned this Dec 1, 2022
@feluelle feluelle added the product/python-sdk Label describing products label Dec 1, 2022
kaxil added a commit that referenced this issue Dec 1, 2022
This test was checking a wrong thing, see below:

```
In [1]: import pandas

In [2]: df = pandas.DataFrame({"Numbers": [1, 2, 3], "Colors": ["red", "white", "blue"]})

In [3]: df.columns
Out[3]: Index(['Numbers', 'Colors'], dtype='object')

In [4]: cols = list(df.columns)

In [5]: cols.sort()

In [6]: df.columns == ["Colors", "Numbers"]
Out[6]: array([False, False])
```

It was returning a numpy array with `False, False` values, instead the test actually was meant to test whether the column case was preserved or not.

part of #1337
kaxil added a commit that referenced this issue Dec 1, 2022
This test was checking a wrong thing, see below:

```python
In [1]: import pandas

In [2]: df = pandas.DataFrame({"Numbers": [1, 2, 3], "Colors": ["red", "white", "blue"]})

In [3]: df.columns
Out[3]: Index(['Numbers', 'Colors'], dtype='object')

In [4]: cols = list(df.columns)

In [5]: cols.sort()

In [6]: df.columns == ["Colors", "Numbers"]
Out[6]: array([False, False])
```

It was returning a numpy array with `False, False` values, instead the
test actually was meant to test whether the column case was preserved or
not.

part of #1337


### Checklist
- [x] Created tests which fail without the change (if possible)
- [x] Extended the README / documentation, if necessary
@feluelle feluelle changed the title Fix CI failures found while testing SDK with airflow 2.5RC Fix CI failures found while testing SDK with airflow 2.5.0 Dec 5, 2022
feluelle pushed a commit that referenced this issue Dec 5, 2022
Currently, the `LoadFileOperator` converts dataframe to a File object
when returning. However, this should be handled by the Custom XCom
backend and not in `LoadFileOperator`. Otherwise, we won't be consistent
with dataframe and transform decorators who, too returns dataframes.

From Airflow 2.5 and above, this should be handled automatically, for
older versions, users should use our Custom XCom backend so that their
XCom table isn't fully of GBs of data.

part of #1337

## Does this introduce a breaking change?
No, if you are using our XCom backend. Yes, if you are not! but this
fixes the behaviour and makes it consistent with other decorators and
operators that return dataframes

### Checklist
- [x] Created tests which fail without the change (if possible)
- [x] Extended the README / documentation, if necessary
@utkarsharma2 utkarsharma2 added this to the 1.3.1 milestone Dec 5, 2022
@feluelle
Copy link
Member

feluelle commented Dec 5, 2022

Fixed by #1317

@feluelle feluelle closed this as completed Dec 5, 2022
kaxil added a commit that referenced this issue Dec 13, 2022
This test was checking a wrong thing, see below:

```python
In [1]: import pandas

In [2]: df = pandas.DataFrame({"Numbers": [1, 2, 3], "Colors": ["red", "white", "blue"]})

In [3]: df.columns
Out[3]: Index(['Numbers', 'Colors'], dtype='object')

In [4]: cols = list(df.columns)

In [5]: cols.sort()

In [6]: df.columns == ["Colors", "Numbers"]
Out[6]: array([False, False])
```

It was returning a numpy array with `False, False` values, instead the
test actually was meant to test whether the column case was preserved or
not.

part of #1337

### Checklist
- [x] Created tests which fail without the change (if possible)
- [x] Extended the README / documentation, if necessary

(cherry picked from commit 97de941)
kaxil added a commit that referenced this issue Dec 13, 2022
Currently, the `LoadFileOperator` converts dataframe to a File object
when returning. However, this should be handled by the Custom XCom
backend and not in `LoadFileOperator`. Otherwise, we won't be consistent
with dataframe and transform decorators who, too returns dataframes.

From Airflow 2.5 and above, this should be handled automatically, for
older versions, users should use our Custom XCom backend so that their
XCom table isn't fully of GBs of data.

part of #1337

## Does this introduce a breaking change?
No, if you are using our XCom backend. Yes, if you are not! but this
fixes the behaviour and makes it consistent with other decorators and
operators that return dataframes

### Checklist
- [x] Created tests which fail without the change (if possible)
- [x] Extended the README / documentation, if necessary

(cherry picked from commit 1283394)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product/python-sdk Label describing products
Projects
None yet
Development

No branches or pull requests

3 participants