kubeshop / botkube

An app that helps you monitor your Kubernetes cluster, debug critical deployments & gives recommendations for standard practices
https://botkube.io
MIT License
2.15k stars 289 forks source link

Add setting up an Instance via the UI instead of GraphQL #1458

Closed mszostok closed 5 months ago

mszostok commented 5 months ago

Description

Changes proposed in this pull request:

Testing

It requires a local UI version from https://github.com/kubeshop/botkube-cloud/pull/1137

  1. In my case, recreated local control-plane with mine own Slack instance.
  2. Make sure you have a trial subscribed and a placeholder instance created.
  3. Next, I exported following properties:

    export BOTKUBE_CLOUD_API_BASE_URL='http://localhost:8080'
    export BOTKUBE_CLOUD_UI_BASE_URL='http://localhost:3000'
    export BOTKUBE_CLOUD_EMAIL='your_user'
    export BOTKUBE_CLOUD_PASSWORD='your_pass'
    export BOTKUBE_CLOUD_TEAM_ORGANIZATION_ID='your_org_id'
    export DEBUG_MODE='true'
    
    export SLACK_WORKSPACE_NAME='your_workspace'
    export SLACK_EMAIL='your workspace email'
    export SLACK_PASSWORD='pass ' # by default pass is not set, see: https://slack.com/help/articles/201909068-Reset-your-password#h_01F256P7NEHPDZ7FT513SAZVBR
    
    export SLACK_TESTER_BOT_NAME='your tester app'
    export SLACK_TESTER_TESTER_BOT_TOKEN='tester slack app token'
    export SLACK_TESTER_CLOUD_TESTER_NAME='your cloud app'
    export BOTKUBE_CLI_BINARY_PATH="botkube" 
  4. Finally, executed test with:
    cd tests
    go test -tags=cloud_slack_dev_e2e -v -timeout 30m  -count 1 ./cloud-slack-dev-e2e/...

Related issue(s)

Fix https://github.com/kubeshop/botkube-cloud/issues/886

mszostok commented 5 months ago

I executed the workflow 3 times in a row, all passed: https://github.com/kubeshop/botkube/actions/runs/9572807087?pr=1458

mszostok commented 5 months ago

I had to skip the plugin update flow because it was too flaky.

  1. The screenshot shows that the button is there and enabled.
  2. However, the assertion can't pass, with logs like:

    === NAME  TestCloudSlackE2E/Creating_Botkube_Instance_with_newly_added_Slack_Workspace
        botkube_page_helpers_test.go:215: Submitting changes
    [rod] 2024/06/18 20:33:12 [wait] stable <page:AE0EEF2A>
    [rod] 2024/06/18 20:33:12 [query] rod.elementR("button","/Deploy changes/i")  <page:AE0EEF2A>
    [rod] 2024/06/18 20:33:12 [wait] interactable <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] visible <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] stable RAF <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] visible <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] stable RAF <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:13 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:13 [wait] visible <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:13 [wait] stable RAF <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:14 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>

Notes: