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

[AIRFLOW-5048] Improve display of Kubernetes resources #5665

Merged
merged 7 commits into from
Aug 5, 2019

Conversation

ms32035
Copy link
Contributor

@ms32035 ms32035 commented Jul 26, 2019

Make sure you have checked all steps below.

Jira

Description

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

At the moment just a serialized class is displayed in task instance view. This PR improves string conversion

Tests

  • My PR adds the following unit tests:

test_display_resources

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.

Code Quality

  • Passes flake8

@@ -37,6 +37,10 @@ def has_limits(self):
def has_requests(self):
return self.request_cpu is not None or self.request_memory is not None

def __str__(self):
return str({'request': {'memory': self.request_memory, 'cpu': self.request_cpu},
Copy link
Contributor

Choose a reason for hiding this comment

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

self.request_memory can be None, may be check first?
same for self.limit_memory

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, the test covers this, None to string is 'None'

Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

We've just merged GPU limits as well so you should add them.

@potiuk
Copy link
Member

potiuk commented Jul 29, 2019

Tests fail on python 3.5

@potiuk
Copy link
Member

potiuk commented Jul 29, 2019

I think now they will fail on python 3.6 I am afraid. You should use OrderedDict if you want to maintain order @ms32035

@ms32035
Copy link
Contributor Author

ms32035 commented Jul 29, 2019

I'll go for a simpler solution instead of trying to have dict ordering solution compatible with both 3.5 and 3.6

@ms32035
Copy link
Contributor Author

ms32035 commented Aug 1, 2019

@potiuk current test failures are not related to the change

@potiuk
Copy link
Member

potiuk commented Aug 1, 2019

@ms32035 -> please rebase to master (but only after we merge #5703 as it fixes broken master due to dependency problem)

Copy link
Contributor

@dimberman dimberman left a comment

Choose a reason for hiding this comment

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

@potiuk this all LGTM but I'll hold off unless you have any other concerns.

@potiuk potiuk merged commit 4dfe249 into apache:master Aug 5, 2019
potiuk pushed a commit that referenced this pull request Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants