sciyoshi / redmine-slack

Slack notification plugin for Redmine
MIT License
404 stars 218 forks source link

Question: Link-assembly Method Changed? #131

Closed ferricoxide closed 6 years ago

ferricoxide commented 6 years ago

Recently updated my RedMine version. Specifically, updated my deployment automation and deployed whole new RedMine host. Automation I created updates the RedMine version and pulls all relevant plugins from their respective repositories (updating them to "latest" in the process). Not sure if my issue is with this plugin or one of its dependencies.

At any rate, after upgrading everything, the links that get posted into my Slack-channel(s) are now coming in as http:// rather than the previous https://. Found #130 - which seems to be around non-standard ports. The work-around referenced in that thread seems to be around tacking on a non-standard port, not fixing/altering the link's protocol. Not finding a config-option in the plugin's config-page for setting/overriding the protocol nor am I seeing anything in the project dox.

Is this a known issue with a known fix?

At any rate, my config is as follows:

Environment:
  Redmine version                3.4.3.stable
  Ruby version                   2.4.0-p0 (2016-12-24) [x86_64-linux]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
  redmine_slack                  0.2

Hosted on CentOS 7.4.1708 (January patch-set)

sciyoshi commented 6 years ago

Hi @ferricoxide, the plugin uses the protocol Redmine setting described here. Can you verify that that option is correctly set?

ferricoxide commented 6 years ago

Ah! Thanks for the reply. That was the problem (it had reverted to HTTP).

I'd sort of assumed that such a configuration item would have been kept in RedMine's config DB and that, when I re-deployed, it would have persisted with the DB. Guessing I may have to update my AutoScaling Group's deployment scripts to locate that config-parm and massage it at each re-launch.

Begs the question of why have a config-DB if things like that aren't going to be kept in it?

ferricoxide commented 6 years ago

Looks like it is kept in the DB:

> select * from settings where name like 'protocol'
    -> ;
+----+----------+-------+---------------------+
| id | name     | value | updated_on          |
+----+----------+-------+---------------------+
| 40 | protocol | https | 2018-01-17 16:58:21 |
+----+----------+-------+---------------------+
1 row in set (0.00 sec)

MySQL [rmtst00]> \q
Bye
[root@redmine00 ~]# date
Wed Jan 17 17:06:53 UTC 2018

Wondering if the DB schema-change between my older version and newer version caused the issue (because prior to resetting it, the value was http).

Any way, thanks for the pointer!