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

GitHub subscribe automatically unsubscribes #1086

Open
mveeprojects opened this issue Nov 11, 2020 · 20 comments
Open

GitHub subscribe automatically unsubscribes #1086

mveeprojects opened this issue Nov 11, 2020 · 20 comments

Comments

@mveeprojects
Copy link

When attempting to subscribe to some private repositories from slack (/github subscribe org/repo), we are returned a positive message from the GitHub app saying "Subscribed to x", and when running /github subscribe list the newly subscribed to repo shows up. However, given a minute or so and running the ... list command again, the new repo has magically unsubscribed itself, it's no longer in the list.

Any advice/troubleshooting/recommendations would be greatly appreciated 👍

Slack 4.10.3 (Mac)

@welcome
Copy link

welcome bot commented Nov 11, 2020

Thanks for opening this issue! If you would like to help implement an improvement, read more about contributing and consider submitting a pull request.

@amitkumariiit
Copy link
Contributor

Hi @mveeprojects, thanks for reaching out to us and sorry for the inconvenience you face with the app. Can you please let us know if you still face the issue. If so please run the /github debug command and paste the response here for us to debug.

@mveeprojects
Copy link
Author

mveeprojects commented Feb 22, 2021

@amitkumariiit

Hi, we ended up just creating a new private channel and adding the GitHub app there.

Based on what we saw, this bug needs to be fixed, is this issue being worked on?

@amitkumariiit
Copy link
Contributor

Hi @mveeprojects ,
GitHub need to be added to the private channel to be able to get the permission to post the channel. For public channel this is not required but if the if a channel is turning from public to private, it needs to be added. This is the limitation from the slack.

@mveeprojects
Copy link
Author

if a channel is turning from public to private, it needs to be added. This is the limitation from the slack.

This is the bit doesn't work, even if you add GitHub integration again after changing a channel to private, the subscriptions do not stick.

Is this going to be fixed to prevent people needing to workaround this by creating brand new private channels to continue to use GitHub integration?

@Inventsable
Copy link

I have this same issue despite the fact that I'd added Github to a channel which was private on creation (not public > private) as every one has recommended:

ice_screenshot_20210311-134510

As you can see, I never unsubscribed from this repository but the last message confirms this bug. The Slack integration unsubscribed itself after I'd posted a test Issue on the repo, no matter what I've tried, I have not been able to receive any notifications about commits or issues for this repo. The target repo is private but has Slack integration installed with no error, GitHub is installed on Slack with no error, a new private channel is created and GitHub is added, subscribe method is called with no error, but some error is thrown at the point GitHub is actually receiving an event to echo into Slack.

What's also odd is that I can interact with GitHub via Slack. If I try closing an issue, Slack-GitHub will tell me there was an error and it failed, but the Issue will indeed be closed so it did not fail.

@Inventsable
Copy link

I do this for an account or organization, same issue:

ice_screenshot_20210311-135513

The channel is private on creation, Github is added, use the subscribe command, confirm it's there via list, create a new Issue on any repo and it unsubscribes.

@amitkumariiit
Copy link
Contributor

👋 @mveeprojects @Inventsable
We have some logic that if we get the error channel_not_found from slack while posting notification to the channel, we delete the subscription assuming that channel actually doesn't exists. Could be scenarios that channel got deleted or bot doesn't have access to this private channel. This is a measure to cleanup subscriptions.
I see we need to improve upon this experience. Will look into this. Thanks.

@Inventsable
Copy link

Thanks @amitkumariiit, is there any way I can send useful info or debug from my end? Anything to look out for in regards to the current Slack channel that might be the cause? Should I include /github debug results here, or test with a brand new Workspace? The Workspace above was originally created in 2016 but was dormant for some time -- is there a chance this could be the reason we cannot get the bot to work on any channel within it?

@amitkumariiit
Copy link
Contributor

@Inventsable you can run the /github debug and share us the result.

@Inventsable
Copy link

Here you go:

{
  "team_id": "T2Q3C4KE3",
  "team_domain": "battleaxedotco",
  "user_id": "U01QR5C7N14",
  "channel_id": "C01R026L2RZ",
  "channel_name": "sandbox",
  "text": "debug"
}

@nkcraddock
Copy link

I'm having this same problem. I noticed that for many private channels that were created further in the past, they work fine. But for newly-created private channels, none of them work. Note: These are not public channels that were made private. They were all set to private in channel creation.

I believe something changed in the way channel creation works (on my work's slack server at least) sometime between February 23rd and March 17th. Every channel whose channel_name from /github debug is "privategroup" works. Every channel where the channel_name is the actual channel's name does not work. The first action which triggers a message to the non-working channel causes the github integration to unsubscribe.

The /github debug difference shows this main difference:

Channel that works (Created February 23)

{
  ...snip...
  "channel_name": "privategroup",
}

Channel that does not work (Created March 17)

{
  ... snip ...
  "channel_name": "advocacy-console",
}

@psinger
Copy link

psinger commented Mar 31, 2021

Having the same issue, and idea how to solve this?

@nayuta-cr
Copy link

I'm having the same problem too.
Any newly-created private channel is suffered by this problem, and the /github debug shows like:

{
  ...(snip)...
  "channel_id": "C01SX65NBL2",
  "channel_name": "private_channel_github_integration_test",
  "text": "debug"
}

Any solution?

@nkcraddock
Copy link

@ashokirla updated the docs in #1141 that probably sheds some light on what changed to make this stop working.

One line in the change to docs suggests a possible solution:

You need to update your GitHub app if you have installed the GitHub Slack integration in your workspace before March 31, 2021.

@psinger
Copy link

psinger commented Apr 2, 2021

@nkcraddock I purged and re-installed the github app already and it did not solve the issue.

@nkcraddock
Copy link

@psinger You're right. I removed the integration from a test slack, and removed it completely from my GitHub account, reinstalled to both and the behavior is the same.

I'm worried that the real situation here is that #1103 is accurate and the upgrade mentioned in #1141 is only being done to keep it from completely breaking due to slack's deprecation of the legacy workspace api.

In #1131 they changed the contribution docs:

We are currently making platform changes and not accepting any contributions to this app. You can raise a feature request from here

@m8ow
Copy link

m8ow commented Apr 6, 2021

I faced same error in my organization.

My research is below

  1. I uninstalled Github App in Slack, and re-installing wouldn't solve this problem
  2. some repos work, but other repos don't work
  3. new integrated repos don't work (in my case, since March 28th 2021)

I tried to integrate a few times.
image

@nayuta-cr
Copy link

nayuta-cr commented Apr 16, 2021

Yesterday, Github app said that:

⚠️ Action required - upgrade app for xxxxxxx ⚠️
GitHub app is built on Slack's workspace apps which are now deprecated. The legacy GitHub app will stop working on July 15, 2021.
Don't worry, we have built a new version of GitHub-Slack integration. You can just upgrade the app and get back to your work.
Learn more about this upgrade here.
[ Upgrade App ]

and its name was changed to "GitHub (Legacy)".

After upgrading Github app, everything works fine ! It reports the activities of our private repositories to the private slack channels.

@m8ow
Copy link

m8ow commented Apr 16, 2021

YES!! Me either!!
@nayuta-cr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants