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

[BUG] #460

Closed
adityadoke opened this issue Mar 3, 2021 · 1 comment · Fixed by #461
Closed

[BUG] #460

adityadoke opened this issue Mar 3, 2021 · 1 comment · Fixed by #461
Assignees
Labels
bug Something isn't working

Comments

@adityadoke
Copy link

Describe the bug
My @botkube is not working on my cluster charizard.alpha-sense.org - its throwing invalid request error

botkube-579cfd7578-dmptr botkube INFO[2021-03-02T09:12:15Z] Invalid request. Dumping the response. Request:  get deployment --cluster-name <http://charizard.alpha-sense.org|charizard.alpha-sense.org> 
botkube-579cfd7578-dmptr botkube INFO[2021-03-02T09:13:57Z] Invalid request. Dumping the response. Request:  ping --cluster-name <http://charizard.alpha-sense.org|charizard.alpha-sense.org> 
botkube-579cfd7578-dmptr botkube INFO[2021-03-02T09:14:50Z] Invalid request. Dumping the response. Request:  commands list 

To Reproduce
Steps to reproduce the behavior:

  1. Fire command through slack

@botkube commands list

@botkube get pods --cluster-name charizard.alpha-sense.org

@botkube notifier status

@botkube get deployment --cluster-name charizard.alpha-sense.org

  1. See error
botkube-579cfd7578-dmptr botkube INFO[2021-03-02T09:12:15Z] Invalid request. Dumping the response. Request:  get deployment --cluster-name <http://charizard.alpha-sense.org|charizard.alpha-sense.org> 
botkube-579cfd7578-dmptr botkube INFO[2021-03-02T09:13:57Z] Invalid request. Dumping the response. Request:  ping --cluster-name <http://charizard.alpha-sense.org|charizard.alpha-sense.org> 
botkube-579cfd7578-dmptr botkube INFO[2021-03-02T09:14:50Z] Invalid request. Dumping the response. Request:  commands list 

Expected behavior
Expected Command output is not coming in slack channel
Screenshots

Additional context
It treats my cluster name as hyperlink even after removing hyperlink from slack format

@adityadoke adityadoke added the bug Something isn't working label Mar 3, 2021
@girishg4t girishg4t self-assigned this Mar 3, 2021
@girishg4t
Copy link
Contributor

@PrasadG193 i have added small logic to remove the unwanted string from clustername, i have tested that using slack but not with other channels, if the behavior is different then we can add separate method to resolve that

@mergify mergify bot closed this as completed in #461 Mar 10, 2021
mergify bot pushed a commit that referenced this issue Mar 10, 2021
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Bug fix Pull Request

##### SUMMARY
When clustername is passed to botkube from command and if that clustername contains valid domain then slack automatically adds <http:// to the url  
eg.  
if command is `@BotKube get pods --cluster-name xyz.alpha-sense.org`  then in botkube we get cluster name as `<http://xyz.alpha-sense.org|xyz.alpha-sense.org>`

#### Solution:
Added small logic in executor code to remove the unwanted string

Fixes #460
@pkosiec pkosiec added needs-more-info Further information is needed bug Something isn't working and removed bug Something isn't working needs-more-info Further information is needed labels Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants