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

Mark committed_capacity field for removal #12041

Merged
merged 1 commit into from
Apr 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion awx/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4873,7 +4873,7 @@ class InstanceGroupSerializer(BaseSerializer):

show_capabilities = ['edit', 'delete']

committed_capacity = serializers.SerializerMethodField()
committed_capacity = serializers.SerializerMethodField(help_text=_('This resource has been deprecated and will be removed in a future release'))
consumed_capacity = serializers.SerializerMethodField()
Copy link
Member

Choose a reason for hiding this comment

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

fwiw consumed_capacity also uses capacity_values in the ha.py that we've talked about axing. We should think about if we can deprecate that too (unless we want to do some other re-implementation w/o the capacity_values function)

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think we should want to remove the IG consumed_capacity. Ultimately, if we cache task_impact for unified jobs, then we can do the summation in the database by using an efficient Django annotate.

percent_capacity_remaining = serializers.SerializerMethodField()
jobs_running = serializers.IntegerField(
Expand Down