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

Persist sent help messages #738

Merged
merged 2 commits into from
Sep 20, 2022
Merged

Persist sent help messages #738

merged 2 commits into from
Sep 20, 2022

Conversation

mszostok
Copy link
Contributor

@mszostok mszostok commented Sep 19, 2022

Description

Changes proposed in this pull request:

  • Persist sent help messages

Testing

I wanted to add the e2e tests but I would impact the future improvements with parallel test. I cannot modify the BotKube configuration and delete the pod.

Manual testing:

  1. Checkout this branch: gh pr checkout 738
  2. Create cluster: k3d cluster create
  3. Install BotKube with Slack:
    # /tmp/slack.yaml
    communications:
      default-group:
        slack:
          channels:
            default:
              name: random
          enabled: true
          appToken: "xapp-1-"
          botToken: "xoxb-"
    
    image:
      repository: kubeshop/pr/botkube
      pullPolicy: Always
      tag: 738-PR
    
    analytics:
      disable: true
    
    helm upgrade botkube --install --namespace botkube ./helm/botkube --create-namespace -f /tmp/slack.yaml
    
  4. See the help message on the #random channel.
  5. Delete the Pod (simulate restart): kubectl -n botkube delete po -l app=botkube --force
  6. Help message should NOT be reposted on #random channel
  7. Upgrade BotKube with Discord:
    # /tmp/discord.yaml
    communications:
      default-group:
        discord:
          enabled: true
          channels:
            default:
              id: ""
          botID: ""
          token: ""
    
    image:
      repository: kubeshop/pr/botkube
      pullPolicy: Always
      tag: 738-PR
    
    analytics:
      disable: true
    helm upgrade botkube --install --namespace botkube ./helm/botkube --create-namespace -f /tmp/discord.yaml
    
  8. Restart Pod: kubectl delete po -l app=botkube --force
  9. New help message should be visible on Discord channel

Related issue(s)

@mszostok mszostok added the enhancement New feature or request label Sep 19, 2022
@mszostok mszostok added this to the v0.14.0 milestone Sep 19, 2022
@mszostok mszostok requested review from a team and PrasadG193 as code owners September 19, 2022 07:57
@mszostok mszostok force-pushed the help-storage branch 2 times, most recently from b6d9681 to 5d06666 Compare September 19, 2022 08:41
@ezodude
Copy link
Contributor

ezodude commented Sep 20, 2022

  1. Delete the Pod (simulate restart): kubectl -n botkube delete po -l app=botkube --force
  2. Help message should be reposted on #random channel

So far only checked the code, but a question regarding steps 5 & 6 ... my assumption is:

  • Deleting the Pod would NOT re-post the help message on Slack.
  • The BotKube system ConfigMap would continue to exist across Pod restarts.

... Or did I get this wrong?

(about to run BotKube locally)

Copy link
Contributor

@ezodude ezodude left a comment

Choose a reason for hiding this comment

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

👍 ...

Acceptance criteria 5 & 6 should be updated to:
5. Delete the Pod (simulate restart): kubectl -n botkube delete po -l app=botkube --force
6. Help message should NOT be reposted on #random channel

Successfully tested locally with Slack & Discord.

@mszostok
Copy link
Contributor Author

@ezodude yes, you are right about the 6th point, sorry for confusion 👍

@mszostok mszostok enabled auto-merge (squash) September 20, 2022 13:11
@mszostok mszostok merged commit 14dc934 into kubeshop:main Sep 20, 2022
@mszostok mszostok deleted the help-storage branch September 20, 2022 13:26
huseyinbabal pushed a commit to huseyinbabal/botkube that referenced this pull request Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants