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

fix: eventstreams sarama clientid #5802

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

kccox
Copy link
Contributor

@kccox kccox commented Nov 19, 2024

What was done: A customer reported an error running the provider,

'resourceIBMEventStreamsTopicCreate createSaramaAdminClient: kafka: invalid configuration (ClientID is invalid)'

The root cause is the use of os.Hostname() for the ClientID, which in rare cases has an illegal value (either it is "", or it contains an illegal character such as $ or #). Change the ClientID to terraform-provider-ibm which is legal.

Note: the ClientID has no effect on the Event Streams or Kafka operations. It is just used in some log messages.

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

Since the same Sarama client is used by all the Event Streams topics tests, it's sufficient to just run the basic tests.

% make testacc TEST=./ibm/service/eventstreams TESTARGS='-run=TestAccIBMEventStreamsTopicDataSourceBasic'
   (skipping messages about environment variables)
=== RUN   TestAccIBMEventStreamsTopicDataSourceBasic
=== RUN   TestAccIBMEventStreamsTopicDataSourceBasic
--- PASS: TestAccIBMEventStreamsTopicDataSourceBasic (99.39s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/eventstreams	100.978s


% make testacc TEST=./ibm/service/eventstreams TESTARGS='-run=TestAccIBMEventStreamsTopicResourceBasic'
   (skipping messages about environment variables)
=== RUN   TestAccIBMEventStreamsTopicResourceBasic
--- PASS: TestAccIBMEventStreamsTopicResourceBasic (189.22s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/eventstreams	191.228s

@hkantare hkantare merged commit f492e62 into IBM-Cloud:master Nov 21, 2024
1 check passed
@kccox kccox deleted the fix-eventstreams-sarama-clientid branch November 21, 2024 13:44
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.

2 participants