Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Better slack notifications #415

Merged
merged 4 commits into from Feb 8, 2017
Merged

Better slack notifications #415

merged 4 commits into from Feb 8, 2017

Conversation

paulbellamy
Copy link
Contributor

@paulbellamy paulbellamy commented Feb 1, 2017

Fixes: #390

TODO:

  • Clean up TODOs in the code
  • Some sort of migration from jobs? or fill the release struct to send to notifiers
  • Make sure the serviceSpec stuff migration works, or move it to separate pr.
  • Figure out how to integrate it with michael's changes for job results...

@paulbellamy
Copy link
Contributor Author

serviceSpec stuff moved to: #423

@paulbellamy paulbellamy changed the title WIP -- Better slack notifications Better slack notifications Feb 3, 2017
@squaremo squaremo self-assigned this Feb 3, 2017
@paulbellamy
Copy link
Contributor Author

Note, without more info from the release, this doesn't currently include any results in the output.

* Rename ReleaseParams -> ReleaseSpec
* Add tests for slack notifier
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

There's a test failing, but it looks easily fixed.
Nitpicks only, really -- though TODOs remain.

"github.com/weaveworks/flux/guid"
)

const (

This comment was marked as abuse.

This comment was marked as abuse.

EndedAt time.Time `json:"endedAt"`
Done bool `json:"done"`
Priority int `json:"priority"`
Status ServiceReleaseStatus `json:"status"`

This comment was marked as abuse.

This comment was marked as abuse.

// TODO: Remove this once there are no more jobs with ServiceSpec, only ServiceSpecs
ServiceSpec flux.ServiceSpec
}
type ReleaseJobParams flux.ReleaseSpec

This comment was marked as abuse.

This comment was marked as abuse.

@squaremo squaremo removed their assignment Feb 6, 2017
* uses spec instead of actual results.
* don't notify slack for dry-runs
@paulbellamy
Copy link
Contributor Author

I re-did the default template, to use the spec instead of the results to output stuff.

It means the output is based on what was requested, not what was done, but... that is what we have for now (until the result format changes from @squaremo's work).

for example:

Release no updates to flux-example/nginx. done
Release all latest to flux-example/nginx. done
Release quay.io/weaveworks/helloworld:master-a000001 to all. done
Release all latest to flux-example/nginx. some error here. failed
Release all latest to all. done // This one is a bit unsatisfying...

@paulbellamy
Copy link
Contributor Author

Also, I think all the TODOs left (now) are places where we need to integrate this with your changes, @squaremo, or reminders to remove deprecated stuff.

EndedAt: time.Now().UTC(),
Done: true,
Priority: job.Priority,
Status: flux.ServiceReleaseStatus(job.Status),

This comment was marked as abuse.

@squaremo
Copy link
Member

squaremo commented Feb 7, 2017

I re-did the default template, to use the spec instead of the results to output stuff.

Does this more or less replicate the current behaviour?

Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

Assuming it makes the notifications act mostly as they are now, until there are results to put in them: looks good! ⭐

@paulbellamy paulbellamy merged commit 1ec8e4b into master Feb 8, 2017
@paulbellamy paulbellamy deleted the 390-better-notifications branch February 8, 2017 10:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants