-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: add metrics enablement #319
Conversation
/run pipeline |
@kccox you must be in the team github-collaborators in order to trigger the pipeline. |
/run pipeline |
1 similar comment
/run pipeline |
@Ak-sky The CI failure was from invalid credentials while creating the topics:
This is odd, since the same credentials were used to create the Event Streams service instance and that worked. Topic creation also worked in the previous CI run. I looked at the logging from the kafka servers, but unfortunately Cloud Logs is having problems in us-south and they're unavailable. I also notice terraform created the testacc-subnet and VPC in eu-de, but the Event Streams instance in us-south - I don't know if that might be the cause. Could you re-run the pipeline to see if the same error happens again? |
/run pipeline |
1 similar comment
/run pipeline |
@kccox, can you please point me to the terraform provider doc URL to support metrics? |
@Ak-sky https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/examples/ibm-event-streams/README.md shows use of "metrics". We have tested provisioning with metrics using the terraform provider and it works. The metrics are one of the provision parameters, so are in the "parameters" or "parameters_json" property of the
However I don't think it's these code changes that are causing the problem. The infrastructure test for #321 failed in the same way, with EDIT: I see that pull 321 is to fix https://github.ibm.com/GoldenEye/issues/issues/11171, reporting that the main module tests started failing a week ago. Unfortunately I don't have access to that pipeline instance or the COS bucket with the logs. |
I have converted this to draft because we would prefer to implement #322 first. That will allow the metrics variable to be |
/run pipeline |
@ocofaigh This is ready for review |
examples/complete/variables.tf
Outdated
@@ -105,3 +105,9 @@ variable "topics" { | |||
} | |||
] | |||
} | |||
|
|||
variable "metrics" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don'e expose this as a variable in the example. We don't wan't to make examples flexible solutions for people to use. Instead I suggest you hard code metrics
in the example main.tf and add all the allowed values so our our tests test the feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples/complete
is using the default standard plan, and the enhanced metrics are only available for enterprise (https://cloud.ibm.com/docs/EventStreams?topic=EventStreams-metrics). However I will hard-code metrics: []
in the main.tf and remove it from the variables.tf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editing examples/complete/variables.tf, I am now confused. There are variables for several other module properties (resource tags, access tags, schemas, topics) which are used in main.tf. Why would metrics be treated differently?
schemas = var.schemas
tags = var.resource_tags
access_tags = var.access_tags
topics = var.topics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah they should not be exposed in the example. I'll create a separate issue for the core team to clean that up, We don't want people to start consuming the examples, as they not intended to be consumable solutions - just reference on how the module can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
created tracking issue #331
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
examples/fscloud/main.tf
Outdated
@@ -62,6 +62,7 @@ module "event_streams" { | |||
tags = var.resource_tags | |||
topics = var.topics | |||
existing_kms_instance_guid = var.existing_kms_instance_guid | |||
metrics = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add the allowed values here so they get tested in the tests we run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples/fscloud
doesn't set the plan to enterprise-3nodes-2tb
, so is using a standard plan, and these options are not available for standard. Checking our provision code, I see that they're just ignored, and don't cause an error - but I can't promise it will always work that way.
So I could include the allowed values, but it would only be a test of the terraform validator, and might break in the future if we improve the parameters checking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fscloud example is calling the modules/fscloud
submodule, and this is hard code to use the "enterprise-3nodes-2tb"
plan
@ocofaigh Added the metrics to examples/fscloud |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see remaining comments
/run pipeline |
🎉 This PR is included in version 2.8.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Event Streams allows enablement of enhanced customer metrics using the provision parameters. Add the metrics enablement to the main module, and to examples/complete, modules/fscloud, and solutions/quickstart. Update READMEs.
Description
Add metrics enablement to the module. This is a customer-requested feature.
Metrics enablement is already a provision parameter, so no update to the terraform provider version is needed.
Release required?
x.x.X
)x.X.x
)X.x.x
)Run the pipeline
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers