tobilg / marathon-slack

Integration for Marathon's Event Bus with Slack
MIT License
42 stars 23 forks source link

Readme suggests MARATHON_HOST and image version 0.1.3 - However MARATHON_URL is used in version 0.1.3 #4

Closed portepa closed 7 years ago

portepa commented 7 years ago

In the Readme, we can see

### Environment variables

* `MARATHON_HOST`: The Marathon Host (hostname or ip address) where Marathon lives. Default is `leader.mesos`, so if you don't use Mesos DNS you'll have to specify this. 

Also:

### Installing via Marathon

You can run this on Marathon like this:

{
  "id": "/marathon-slack",
  "cpus": 0.1,
  "mem": 128,
  "disk": 0,
  "instances": 1,
  "container": {
    "type": "DOCKER",
    "docker": {
      "image": "tobilg/marathon-slack:0.1.3",
      "network": "HOST",
      "privileged": false,
      "parameters": [],
      "forcePullImage": true
    }
  },
  "env": {
    "SLACK_WEBHOOK_URL": "YOUR_WEBHOOK_URL"
  }
}

It's not obvious that tobilg/marathon-slack:0.1.3 is expecting MARATHON_URL environment variable, and that tobilg/marathon-slack:latest is expecting MARATHON_HOST. Furthermore Mesosphere Universe refers to 0.1.3 (https://github.com/mesosphere/universe/blob/version-3.x/repo/packages/M/marathon-slack/1/resource.json).

I think Readme should specify that depending on which image version is running marathon-slack, the environment variable is not the same. Would make it clearer even if the Readme of this commit https://github.com/tobilg/marathon-slack/tree/e5d89a6280791cfc86b61b868461ed06baeb3a49 is correct given that it's the commit refering to the 0.1.3 release.

tobilg commented 7 years ago

I don't really see the issue here. So, the docs for tag 0.1.3 say to use MARATHON_URL (https://github.com/tobilg/marathon-slack/tree/0.1.3), as well as the implementation (https://github.com/tobilg/marathon-slack/blob/0.1.3/index.js#L11).

Whereas master suggest using MARATHON_HOST (https://github.com/tobilg/marathon-slack/tree/master) and the implementation uses it as well (https://github.com/tobilg/marathon-slack/blob/master/index.js#L11).

Listing every change doesn't really make sense, that's what branches and tags are for IMO.