From 8188c23622325d25d95d3527df0578aa323cada7 Mon Sep 17 00:00:00 2001 From: Greg Osuri Date: Sun, 20 Oct 2019 21:56:29 -0700 Subject: [PATCH] github: add pull request template (#410) * github: add pull request template * cmd/deployment: fix panic for nil leases (fixes #412 #411) Signed-off-by: Greg Osuri --- .../community-issue-template.md | 7 ++- .github/PULL_REQUEST_TEMPLATE.md | 44 +++++++++++++++++++ cmd/akash/deployment/create.go | 3 ++ cmd/common/sdutil/sdutil.go | 6 +++ go.mod | 2 +- go.sum | 1 + 6 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE/community-issue-template.md b/.github/ISSUE_TEMPLATE/community-issue-template.md index 29b7e2c13a..b2a544f195 100644 --- a/.github/ISSUE_TEMPLATE/community-issue-template.md +++ b/.github/ISSUE_TEMPLATE/community-issue-template.md @@ -34,10 +34,8 @@ $ akash query account [key value] #returns your balance ### What happened - ### What did you expect to happen - ### How to reproduce it @@ -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. + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..6e906fa7ee --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,44 @@ +--- +name: Pull Request +about: Submit a pull request +title: '' +labels: '' +assignees: '@boz @gosuri' + +--- + + + +## Description + + +## Motivation and Context + + +- [ ] 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? + + + + + +## Types of changes + +- [ ] 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: + + +- [ ] 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. diff --git a/cmd/akash/deployment/create.go b/cmd/akash/deployment/create.go index 08d322657c..8136a1861a 100644 --- a/cmd/akash/deployment/create.go +++ b/cmd/akash/deployment/create.go @@ -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) diff --git a/cmd/common/sdutil/sdutil.go b/cmd/common/sdutil/sdutil.go index aecade2d08..ce3df97c56 100644 --- a/cmd/common/sdutil/sdutil.go +++ b/cmd/common/sdutil/sdutil.go @@ -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 { diff --git a/go.mod b/go.mod index d2ac08e2a9..f713d96dc1 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 74aeea1e4f..8ce7fa8c30 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,7 @@ github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVa github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/buger/jsonparser v0.0.0-20191004114745-ee4c978eae7e h1:oJCXMss/3rg5F6Poy9wG3JQusc58Mzk5B9Z6wSnssNE= github.com/buger/jsonparser v0.0.0-20191004114745-ee4c978eae7e/go.mod h1:errmMKH8tTB49UR2A8C8DPYkyudelsYJwJFaZHQ6ik8= github.com/caarlos0/env v3.3.0+incompatible h1:jCfY0ilpzC2FFViyZyDKCxKybDESTwaR+ebh8zm6AOE= github.com/caarlos0/env v3.3.0+incompatible/go.mod h1:tdCsowwCzMLdkqRYDlHpZCp2UooDD3MspDBjZ2AD02Y=