Skip to content

listprojects: Maintain order of project owners added to a project#4822

Merged
yadvr merged 1 commit into
apache:4.15from
shapeblue:retain-order-proj-owners
Mar 17, 2021
Merged

listprojects: Maintain order of project owners added to a project#4822
yadvr merged 1 commit into
apache:4.15from
shapeblue:retain-order-proj-owners

Conversation

@Pearl1594
Copy link
Copy Markdown
Contributor

Description

This PR ensures to list the projects owners in the order in which they were added.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Prior to fix, listing projects didn't necessarily return a list of project owners in the order in which they were added.

Added an account (ACSUser)
(admin) SBCM5> > list projects listall=true filter=owner,id,name,
{
  "count": 1,
  "project": [
    {
      "id": "a81b8ec4-fa61-4e17-9383-1083276c18df",
      "name": "p1",
      "owner": [
        {
          "account": "ACSUser"
        }
      ]
    }
  ]
}

Added Admin account
(admin) SBCM5> > list projects listall=true filter=owner,id,name,
{
  "count": 1,
  "project": [
    {
      "id": "a81b8ec4-fa61-4e17-9383-1083276c18df",
      "name": "p1",
      "owner": [
        {
          "account": "admin"
        },
        {
          "account": "ACSUser"
        }
      ]
    }
  ]
}

Added user (u1)
(admin) SBCM5> > list projects listall=true filter=owner,id,name,
{
  "count": 1,
  "project": [
    {
      "id": "a81b8ec4-fa61-4e17-9383-1083276c18df",
      "name": "p1",
      "owner": [
        {
          "account": "ACSUser"
        },
        {
          "account": "admin"
        },
        {
          "account": "u1",
          "user": "u1",
          "userid": "603d77db-bd46-4f06-9c71-18ccd0211f8d"
        }
      ]
    }
  ]
}

Notice that the order of the account/user admins of a project is not the same as the order in which they were added to the project
With this fix, the order of the owners in maintained.

(admin) SBCM5> > list projects listall=true filter=owner,id,name,
{
  "count": 1,
  "project": [
    {
      "id": "a81b8ec4-fa61-4e17-9383-1083276c18df",
      "name": "p1",
      "owner": [
        {
          "account": "ACSUser"
        }
      ]
    }
  ]
}
(admin) SBCM5> > list projects listall=true filter=owner,id,name,
{
  "count": 1,
  "project": [
    {
      "id": "a81b8ec4-fa61-4e17-9383-1083276c18df",
      "name": "p1",
      "owner": [
        {
          "account": "ACSUser"
        },
        {
          "account": "admin"
        }
      ]
    }
  ]
}
(admin) SBCM5> > list projects listall=true filter=owner,id,name,
{
  "count": 1,
  "project": [
    {
      "id": "a81b8ec4-fa61-4e17-9383-1083276c18df",
      "name": "p1",
      "owner": [
        {
          "account": "ACSUser"
        },
        {
          "account": "admin"
        },
        {
          "account": "u1",
          "user": "u1",
          "userid": "603d77db-bd46-4f06-9c71-18ccd0211f8d"
        }
      ]
    }
  ]
}

@Pearl1594 Pearl1594 requested review from shwstppr and yadvr March 16, 2021 05:50
@Pearl1594 Pearl1594 added this to the 4.15.1.0 milestone Mar 16, 2021
@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@Pearl1594 Pearl1594 changed the title listprojects: Maintain order or project owners added to account listprojects: Maintain order of project owners added to a project Mar 16, 2021
@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ centos7 ✔️ centos8 ✔️ debian. SL-JID 131

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 133

@Pearl1594
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests [S]

@blueorangutan
Copy link
Copy Markdown

[S] Trillian test result (tid-144)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36879 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4822-t144-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_password_server.py
Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 83 look OK, 3 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_isolate_network_password_server Failure 18.95 test_password_server.py
test_01_migrate_VM_and_root_volume Error 69.22 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 49.10 test_vm_life_cycle.py
test_hostha_enable_ha_when_host_in_maintenance Error 300.48 test_hostha_kvm.py

Copy link
Copy Markdown
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

code LGTM

Copy link
Copy Markdown
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

LGTM

@yadvr yadvr merged commit 136252d into apache:4.15 Mar 17, 2021
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.

5 participants