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

[COST-5114] Add type ahead support for the new EC2 fields #5159

Merged
merged 8 commits into from
Jul 17, 2024

Conversation

djnakabaale
Copy link
Contributor

@djnakabaale djnakabaale commented Jun 10, 2024

Jira Ticket

COST-5114

Description

This change add type ahead support for the new EC2 fields: resource_id, instance_name, operating_system.

Testing

  1. Checkout Branch

  2. Load test data

    make create-test-customer ; make load-test-customer-data test_source=aws
    
  3. On these endpoints (supported filters are seacrh and limit), check to see:

    • the AWS EC2 compute instances, http://127.0.0.1:8000/api/cost-management/v1/resource-types/aws-ec2-compute-instances/?search=instance&limit=4

        {
            "meta": {
                "count": 5,
                "limit": 4,
                "offset": 0
            },
            "links": {
                "first": "/api/cost-management/v1/resource-types/aws-ec2-compute-instances/?limit=4&offset=0&search=instance",
                "next": "/api/cost-management/v1/resource-types/aws-ec2-compute-instances/?limit=4&offset=4&search=instance",
                "previous": null,
                "last": "/api/cost-management/v1/resource-types/aws-ec2-compute-instances/?limit=4&offset=1&search=instance"
            },
            "data": [
                {
                    "instance_name": "instance-name-5",
                    "value": "i-444444443"
                },
                {
                    "instance_name": "instance name 4",
                    "value": "i-444444446"
                },
                {
                    "instance_name": "instance-name-1",
                    "value": "i-55555555"
                },
                {
                    "instance_name": "instance-name-2",
                    "value": "i-55555556"
                }
            ]
        }
      
    • the AWS EC2 compute operating systems, http://127.0.0.1:8000/api/cost-management/v1/resource-types/aws-ec2-compute-os/?search=Linux

        {
            "meta": {
                "count": 5,
                "limit": 10,
                "offset": 0
            },
            "links": {
                "first": "/api/cost-management/v1/resource-types/aws-ec2-compute-os/?limit=10&offset=0&search=Linux",
                "next": null,
                "previous": null,
                "last": "/api/cost-management/v1/resource-types/aws-ec2-compute-os/?limit=10&offset=0&search=Linux"
            },
            "data": [
                {
                    "value": "Amazon Linux"
                },
                {
                    "value": "Gentoo Linux"
                },
                {
                    "value": "Oracle Linux"
                },
                {
                    "value": "Red Hat Enterprise Linux"
                },
                {
                    "value": "SUSE Linux Enterprise Server"
                }
            ]
        }
      

Release Notes

  • proposed release note
* [COST-5114](https://issues.redhat.com/browse/COST-5114) Add type ahead support for the new fields in the EC2 view

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 97.56098% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.1%. Comparing base (9289c51) to head (172d1e9).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5159   +/-   ##
=====================================
  Coverage   94.1%   94.1%           
=====================================
  Files        371     373    +2     
  Lines      30941   31023   +82     
  Branches    4545    4559   +14     
=====================================
+ Hits       29114   29195   +81     
+ Misses      1166    1165    -1     
- Partials     661     663    +2     

@djnakabaale djnakabaale added the smoke-tests pr_check will build the image and run minimal required smokes label Jun 10, 2024
@djnakabaale djnakabaale marked this pull request as ready for review June 10, 2024 16:32
@djnakabaale djnakabaale requested review from a team as code owners June 10, 2024 16:32
@djnakabaale djnakabaale enabled auto-merge (squash) July 17, 2024 15:37
@djnakabaale djnakabaale merged commit 1dc0088 into main Jul 17, 2024
11 checks passed
@djnakabaale djnakabaale deleted the cost-5114-ec2-add-type-ahead-support branch July 17, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smoke-tests pr_check will build the image and run minimal required smokes smokes-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants