Skip to content

Trimming string api parameters and disallowing only space as an api parameter value - #4311

Closed
davidjumani wants to merge 1 commit into
apache:masterfrom
shapeblue:prevent-space-params
Closed

davidjumani wants to merge 1 commit into
apache:masterfrom
shapeblue:prevent-space-params

Conversation

@davidjumani

@davidjumani davidjumani commented Sep 8, 2020

Copy link
Copy Markdown
Contributor

Description

Disallowing only space characters as a string api parameter

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)

How Has This Been Tested?

(localhost) 🐱 > create project name=' ' displaytext='  '
🙈 Error: (HTTP 431, error code 9999) Unable to execute API command createproject due to invalid value.
Empty string or only spaces are not allowed for name

(localhost) 🐱 > create project name=' abc ' displaytext=' def '
{
  "project": {
    ........
    "displaytext": "def",
    "name": "abc",
    ........
  }
}

Works similarly for other APIs

@davidjumani davidjumani changed the title Disallowing only space characters as a string api parameter Disallowing only space as an api parameter value Sep 8, 2020
@davidjumani davidjumani changed the title Disallowing only space as an api parameter value Trimming string api parameters and disallowing only space as an api parameter value Sep 8, 2020
@davidjumani

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-1923

@yadvr

yadvr commented Sep 9, 2020

Copy link
Copy Markdown
Member

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware67, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@yadvr yadvr added this to the 4.15.0.0 milestone Sep 9, 2020
@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-2707)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 55139 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4311-t2707-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_extra_config_data.py
Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
Intermittent failure detected: /marvin/tests/smoke/test_dynamicroles.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_supported_versions.py
Intermittent failure detected: /marvin/tests/smoke/test_outofbandmanagement.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 77 look OK, 8 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_role_lifecycle_clone Failure 0.88 test_dynamicroles.py
test_02_update_account Error 0.47 test_accounts.py
test_01_deploy_vm_with_extraconfig_throws_exception_kvm Error 0.16 test_deploy_vm_extra_config_data.py
test_02_deploy_vm_with_extraconfig_kvm Error 72.51 test_deploy_vm_extra_config_data.py
test_03_update_vm_with_extraconfig_kvm Error 144.37 test_deploy_vm_extra_config_data.py
test_17_retrieve_cpvm_default_files Error 130.03 test_diagnostics.py
test_18_retrieve_cpvm_single_file Error 134.01 test_diagnostics.py
test_01_add_delete_kubernetes_supported_version Error 1807.67 test_kubernetes_supported_versions.py
test_oobm_issue_power_off Error 18.31 test_outofbandmanagement.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Failure 391.36 test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 353.45 test_vpc_redundant.py
test_hostha_kvm_host_fencing Error 183.75 test_hostha_kvm.py
test_hostha_kvm_host_recovering Error 735.02 test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-2719)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 72901 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4311-t2719-vmware-67u3.zip
Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_extra_config_data.py
Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_root_resize.py
Intermittent failure detected: /marvin/tests/smoke/test_diagnostics.py
Intermittent failure detected: /marvin/tests/smoke/test_dynamicroles.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 76 look OK, 5 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_role_lifecycle_clone Failure 0.48 test_dynamicroles.py
test_02_update_account Error 0.43 test_accounts.py
test_04_deploy_vm_with_extraconfig_throws_exception_vmware Error 0.11 test_deploy_vm_extra_config_data.py
test_05_deploy_vm_with_extraconfig_vmware Error 139.18 test_deploy_vm_extra_config_data.py
test_00_deploy_vm_root_resize Failure 519.64 test_deploy_vm_root_resize.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Failure 558.89 test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics Error 3832.24 test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics Error 3832.28 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 0.03 test_vpc_redundant.py
ContextSuite context=TestVPCRedundancy>:teardown Error 0.05 test_vpc_redundant.py

@yadvr

yadvr commented Sep 13, 2020

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖centos7 ✖centos8 ✖debian. JID-1987

@yadvr

yadvr commented Sep 15, 2020

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖centos7 ✖centos8 ✖debian. JID-2010

@yadvr

yadvr commented Sep 15, 2020

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2012

@yadvr

yadvr commented Sep 16, 2020

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-2755)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 54520 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4311-t2755-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_accounts.py
Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_extra_config_data.py
Intermittent failure detected: /marvin/tests/smoke/test_dynamicroles.py
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py
Intermittent failure detected: /marvin/tests/smoke/test_outofbandmanagement.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 78 look OK, 7 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_role_lifecycle_clone Failure 2.08 test_dynamicroles.py
test_02_update_account Error 1.24 test_accounts.py
test_01_deploy_vm_with_extraconfig_throws_exception_kvm Error 0.92 test_deploy_vm_extra_config_data.py
test_02_deploy_vm_with_extraconfig_kvm Error 65.43 test_deploy_vm_extra_config_data.py
test_03_update_vm_with_extraconfig_kvm Error 160.90 test_deploy_vm_extra_config_data.py
test_01_deploy_kubernetes_cluster Error 0.29 test_kubernetes_clusters.py
test_02_deploy_kubernetes_ha_cluster Error 0.35 test_kubernetes_clusters.py
test_04_deploy_and_upgrade_kubernetes_cluster Error 0.34 test_kubernetes_clusters.py
test_05_deploy_and_upgrade_kubernetes_ha_cluster Error 0.23 test_kubernetes_clusters.py
test_06_deploy_and_invalid_upgrade_kubernetes_cluster Error 0.08 test_kubernetes_clusters.py
test_07_deploy_and_scale_kubernetes_cluster Error 0.09 test_kubernetes_clusters.py
test_oobm_issue_power_reset Error 10.99 test_outofbandmanagement.py
test_oobm_issue_power_status Error 21.38 test_outofbandmanagement.py
test_oobm_zchange_password Error 7.02 test_outofbandmanagement.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Failure 426.07 test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Error 349.58 test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics Error 3866.97 test_vpc_redundant.py
test_hostha_kvm_host_fencing Error 167.14 test_hostha_kvm.py

@davidjumani

Copy link
Copy Markdown
Contributor Author

Looks like some of the smoke tests use test data containing strings with trailing spaces. Fixing them

@davidjumani

Copy link
Copy Markdown
Contributor Author

Closing since this might break existing functionality and scenarios where there might be existing names, etc with leading / trailing spaces

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.

3 participants