This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Added documented fields to provision payload #84
Open
beardyman
wants to merge
1
commit into
heroku:master
Choose a base branch
from
beardyman:provision_missing_fields
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
gem 'uuidtools', '~> 2.1.5' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
require 'timeout' | ||
require 'uri' | ||
require 'term/ansicolor' | ||
require 'uuidtools' | ||
|
||
module Heroku | ||
module Kensa | ||
|
@@ -281,9 +282,11 @@ def call! | |
:heroku_id => heroku_id, | ||
:plan => data[:plan] || 'test', | ||
:callback_url => callback, | ||
:log_input_url => "https://token:[email protected]/logs", | ||
:logplex_token => nil, | ||
:region => "amazon-web-services::us-east-1", | ||
:options => data[:options] || {} | ||
:options => data[:options] || {}, | ||
:uuid => UUIDTools::UUID.random_create.to_s | ||
} | ||
|
||
if data[:async] | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this field is not actually always present, but I think we should add a test case that runs for add-ons which have this enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bjeanes yep, that's correct. The
log_input_url
value is only sent in the payload if the add-on service haslog_input
in its manifest: https://devcenter.heroku.com/articles/add-on-provider-log-integration#setupWhat would the test case for sending
log_input_url
cover? That the provisioning service accepts the request includinglog_input_url
without issue?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, basically just that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the description in that link creates a structure(in the manifest) of
{ "api": { "requires": [ "log_input" ] } }
Is that correct? I'm new to add ons, so I've never seen it before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nornholdj that's correct.