Skip to content

Commit

Permalink
github: add pull request template (#410)
Browse files Browse the repository at this point in the history
* github: add pull request template
* cmd/deployment: fix panic for nil leases (fixes #412 #411)

Signed-off-by: Greg Osuri <me@gregosuri.com>
  • Loading branch information
gosuri committed Oct 21, 2019
1 parent eedc491 commit 8188c23
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/community-issue-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ $ akash query account [key value] #returns your balance

### What happened


### What did you expect to happen


### How to reproduce it
<!-- Steps to reproduce, as minimally and precisely as possible -->

Expand All @@ -54,3 +52,8 @@ akash (client): OS and other env info as appropriate
- {deployment,lease} id as appropriate
- deployment.yml if appropriate
-->

## Next steps

You may [join developer chat](https://akash.network/chat) for community support.

44 changes: 44 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Pull Request
about: Submit a pull request
title: ''
labels: ''
assignees: '@boz @gosuri'

---

<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
- [ ] I have raised an issue to propose this change ([required](https://github.com/ovrclk/akash/blob/master/CONTRIBUTING.md))
- [ ] My issue has received approval from the maintainers or lead with the `design/approved` label


## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->


## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)


## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I've read the [CONTRIBUTION](https://github.com/ovrclk/akash/blob/master/CONTRIBUTING.md) guide
- [ ] I have signed-off my commits with `git commit -s`
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
3 changes: 3 additions & 0 deletions cmd/akash/deployment/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ func processStages(statusChan chan *deployStatus, s session.Session) error {
// add services
data = printer.NewSection("Leases").WithLabel("Lease(s)").NewData().AsPane()
for lid, v := range state.providerLeaseStatus {
if v == nil {
continue
}
data.Add("Lease ID", lid.String())
sd := dsky.NewSectionData(" ").AsList()
sdutil.AppendLeaseStatus(v, sd)
Expand Down
6 changes: 6 additions & 0 deletions cmd/common/sdutil/sdutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ func AppendProvider(p *types.Provider, data dsky.SectionData) {
}

func AppendLeaseStatus(status *types.LeaseStatusResponse, sd dsky.SectionData) {
if status == nil {
return
}
if sd == nil {
return
}
for _, service := range status.Services {
name, avail, total := " ", "0", "0"
if len(service.Name) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da // indirect
github.com/ovrclk/dsky v0.0.6
github.com/ovrclk/gestalt v0.1.0 // indirect
github.com/ovrclk/gestalt v0.1.0
github.com/pelletier/go-toml v1.5.1-0.20191009163356-e87c92d4f423 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.8.2-0.20190227000051-27936f6d90f9 // indirect
Expand Down