-
Notifications
You must be signed in to change notification settings - Fork 178
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
Use current active release to fork from #803
Conversation
@@ -144,6 +144,11 @@ func (p *TestProviderRunner) ReleaseList(app string) (structs.Releases, error) { | |||
return p.Releases, nil | |||
} | |||
|
|||
func (p *TestProviderRunner) ReleaseLatest(app string) (*structs.Release, error) { |
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.
exported method TestProviderRunner.ReleaseLatest should have comment or be unexported
The refactor looks great. I'd like to start getting a bit more prescriptive about including tests with patches. I think provider interface work is the obvious place to start since the TestProvider is there to offer easier testing strategies. Want to include some tests with this PR? |
Sure that sounds good to me. Also some output:
|
Noah brought up:
|
I think the app's "current environment" is separate from the releases. We can pull the current environment from S3 rather than the latest or current release. |
@@ -19,3 +19,11 @@ func NewRelease(app string) *Release { | |||
Id: generateId("R", 10), | |||
} | |||
} | |||
|
|||
func (rs Releases) Latest() *Release { |
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.
exported method Releases.Latest should have comment or be unexported
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.
This could be susceptible to bugs in the future. There's no guarantee that this Releases
struct is sorted appropriately.
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.
Makes sense. Safer to check Created
to get the latest one.
- Ported environment features to the provider interface and new Environment type.
61964a6
to
861aea3
Compare
return names | ||
} | ||
|
||
func (e Environment) Raw() string { |
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.
exported method Environment.Raw should have comment or be unexported
release
If no releaseId is provided, `convox run` will use the last promoted release to run a
process. Otherwise iterate over the previous revisions (starting with the
latest) looking for the releaseId specified. This makes sure the same
environment variables are available.
This does not resolve the issue where `convox run` can be used with a
release that hasn't been promoted yet. That will be tackled separately.
Closes #669
|
||
ea := make([]string, 0) |
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.
can probably use "var ea []string" instead
break | ||
// If no releaseId is provided, use the last promoted release to run this process | ||
// otherwise iterate over the previous revisions (starting with the latest) looking for the releaseId specified. | ||
if releaseId == "" { |
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.
looks good to me to retain the current run behavior with no release specified
Merged via #820 |
Whenever
ForkRelease
is called it will now use the current release's build. Fixes #793Also moved
ReleaseLatest
to the provider interface and added the Build ID to the output ofconvox releases
.Also in here, is a fix for
convox run --release
. If no releaseId is provided,convox run
will use the last promoted release to run a process. Otherwise iterate over the previous revisions (starting with thelatest) looking for the releaseId specified. This makes sure the same environment variables are available. Closes #669
This does not resolve the issue where
convox run
can be used with arelease that hasn't been promoted yet. That will be tackled separately.