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

App config bug fix #5748

Merged
merged 13 commits into from
Oct 30, 2024
Merged

App config bug fix #5748

merged 13 commits into from
Oct 30, 2024

Conversation

Ramya-c4
Copy link
Contributor

Copy link

@saikumar1607 saikumar1607 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@hkantare
Copy link
Collaborator

Documentation changes were missing
Add testcase and update test result execution of all testcases

@Ramya-c4
Copy link
Contributor Author

image image image image

@Ramya-c4
Copy link
Contributor Author

terraform outputs

create boolean property

ibm_app_config_property.string_flag: Creating...
ibm_app_config_property.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

property = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T08:39:12.000Z"
  "description" = "description"
  "environment_id" = "dev"
  "evaluation_time" = tostring(null)
  "format" = tostring(null)
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/properties/property_id"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id"
  "name" = "name"
  "property_id" = "property_id"
  "region" = "us-south"
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = "tags"
  "type" = "BOOLEAN"
  "updated_time" = "2024-10-29T08:39:12.000Z"
  "value" = "true"
}

create string:text property

ibm_app_config_property.string_flag: Creating...
ibm_app_config_property.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

property = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T08:36:00.000Z"
  "description" = "description"
  "environment_id" = "dev"
  "evaluation_time" = tostring(null)
  "format" = "TEXT"
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/properties/property_id"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id"
  "name" = "name"
  "property_id" = "property_id"
  "region" = "us-south"
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = "tags"
  "type" = "STRING"
  "updated_time" = "2024-10-29T08:36:00.000Z"
  "value" = "value"
}

create string:json property

ibm_app_config_property.string_flag: Creating...
ibm_app_config_property.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

property = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T08:36:54.000Z"
  "description" = "description"
  "environment_id" = "dev"
  "evaluation_time" = tostring(null)
  "format" = "JSON"
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/properties/property_id"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id"
  "name" = "name"
  "property_id" = "property_id"
  "region" = "us-south"
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = "tags"
  "type" = "STRING"
  "updated_time" = "2024-10-29T08:36:54.000Z"
  "value" = "value"
}

create string:yaml property

ibm_app_config_property.string_flag: Creating...
ibm_app_config_property.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

property = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T08:37:33.000Z"
  "description" = "description"
  "environment_id" = "dev"
  "evaluation_time" = tostring(null)
  "format" = "YAML"
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/properties/property_id"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id"
  "name" = "name"
  "property_id" = "property_id"
  "region" = "us-south"
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = "tags"
  "type" = "STRING"
  "updated_time" = "2024-10-29T08:37:33.000Z"
  "value" = "value"
}

create numeric property

ibm_app_config_property.string_flag: Creating...
ibm_app_config_property.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

property = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T08:38:13.000Z"
  "description" = "description"
  "environment_id" = "dev"
  "evaluation_time" = tostring(null)
  "format" = tostring(null)
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/properties/property_id"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/property_id"
  "name" = "name"
  "property_id" = "property_id"
  "region" = "us-south"
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = "tags"
  "type" = "NUMERIC"
  "updated_time" = "2024-10-29T08:38:13.000Z"
  "value" = "1"
}

create boolean feature flag

ibm_app_config_feature.string_flag: Creating...
ibm_app_config_feature.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

feature = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T07:53:22.000Z"
  "description" = tostring(null)
  "disabled_value" = "false"
  "enabled" = false
  "enabled_value" = "true"
  "environment_id" = "dev"
  "feature_id" = "string_flag"
  "format" = tostring(null)
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/features/string_flag"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag"
  "name" = "test_string_flag"
  "region" = "us-south"
  "rollout_percentage" = 100
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = ""
  "type" = "BOOLEAN"
  "updated_time" = "2024-10-29T07:53:22.000Z"
}

create numeric feature flag

ibm_app_config_feature.string_flag: Creating...
ibm_app_config_feature.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

feature = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T07:54:45.000Z"
  "description" = tostring(null)
  "disabled_value" = "0"
  "enabled" = false
  "enabled_value" = "1"
  "environment_id" = "dev"
  "feature_id" = "string_flag"
  "format" = tostring(null)
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/features/string_flag"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag"
  "name" = "test_string_flag"
  "region" = "us-south"
  "rollout_percentage" = 100
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = ""
  "type" = "NUMERIC"
  "updated_time" = "2024-10-29T07:54:45.000Z"
}

create string:text feature flag

ibm_app_config_feature.string_flag: Creating...
ibm_app_config_feature.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

feature = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T07:49:00.000Z"
  "description" = tostring(null)
  "disabled_value" = "string1"
  "enabled" = false
  "enabled_value" = "string2"
  "environment_id" = "dev"
  "feature_id" = "string_flag"
  "format" = "TEXT"
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/features/string_flag"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag"
  "name" = "test_string_flag"
  "region" = "us-south"
  "rollout_percentage" = 100
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = ""
  "type" = "STRING"
  "updated_time" = "2024-10-29T07:49:00.000Z"
}

create string:json feature flag

ibm_app_config_feature.string_flag: Creating...
ibm_app_config_feature.string_flag: Creation complete after 2s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

feature = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T07:50:16.000Z"
  "description" = tostring(null)
  "disabled_value" = "string1"
  "enabled" = false
  "enabled_value" = "string2"
  "environment_id" = "dev"
  "feature_id" = "string_flag"
  "format" = "JSON"
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/features/string_flag"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag"
  "name" = "test_string_flag"
  "region" = "us-south"
  "rollout_percentage" = 100
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = ""
  "type" = "STRING"
  "updated_time" = "2024-10-29T07:50:16.000Z"
}

create string:yaml feature flag

ibm_app_config_feature.string_flag: Creating...
ibm_app_config_feature.string_flag: Creation complete after 3s [id=318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

feature = {
  "collections" = tolist([])
  "created_time" = "2024-10-29T07:51:48.000Z"
  "description" = tostring(null)
  "disabled_value" = "string1"
  "enabled" = false
  "enabled_value" = "string2"
  "environment_id" = "dev"
  "feature_id" = "string_flag"
  "format" = "YAML"
  "guid" = "318e97bc-7237-4629-a367-c77c6696d8d4"
  "href" = "https://us-south.apprapp.cloud.ibm.com/feature/v1/instances/318e97bc-7237-4629-a367-c77c6696d8d4/environments/dev/features/string_flag"
  "id" = "318e97bc-7237-4629-a367-c77c6696d8d4/dev/string_flag"
  "name" = "test_string_flag"
  "region" = "us-south"
  "rollout_percentage" = 100
  "segment_exists" = false
  "segment_rules" = tolist([])
  "tags" = ""
  "type" = "STRING"
  "updated_time" = "2024-10-29T07:51:48.000Z"
}

@@ -76,6 +76,11 @@ func ResourceIBMIbmAppConfigFeature() *schema.Resource {
Optional: true,
Description: "Rollout percentage of the feature.",
},
"format": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add validation on acceptable values

@hkantare hkantare merged commit 619c55b into IBM-Cloud:master Oct 30, 2024
1 check passed
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