Skip to content
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

Additions to the CONTRIBUTING doc #1387

Closed
carlisia opened this issue Apr 19, 2019 · 11 comments · Fixed by #2032
Closed

Additions to the CONTRIBUTING doc #1387

carlisia opened this issue Apr 19, 2019 · 11 comments · Fixed by #2032
Assignees
Labels
Area/Documentation Enhancement/Dev Internal or Developer-focused Enhancement to Velero
Milestone

Comments

@carlisia
Copy link
Contributor

carlisia commented Apr 19, 2019

  1. Imports

For Kube/Ark imports, since many of the packages have names like v1, we often give them explicit names like corev1, arkv1, etc. to disambiguate. The problem is that we have no consistency in how we do this, so every file is different.

I'm proposing a standard way of naming these across Ark. The convention would be:

<group><version><api | client | informer | ...>

So, for example:

    import (
        corev1api "k8s.io/api/core/v1"
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
    	corev1listers "k8s.io/client-go/listers/core/v1"
        
        velerov1api ""github.com/heptio/velero/pkg/apis/velero/v1"
        velerov1client "github.com/heptio/velero/pkg/generated/clientset/versioned/typed/velero/v1"
    )

Ref: #494

  1. Code
  • Our standard is to capitalize log messages, but keep actual error messages lower-cased

3) Protobuf

To generate protobuf files, must have version 1.0.0 of protoc-gen-go. Follow instructions in the link below and set git tag to: GIT_TAG="v1.0.0"
https://github.com/golang/protobuf#installation

Protobuf generation was addressed here: #1887

  1. ...
@nrb
Copy link
Contributor

nrb commented Apr 19, 2019

For 1, we have #494, which has kind of been an "as we go" thing. Maybe it's worth doing a pass just to clean these up?

@carlisia
Copy link
Contributor Author

This issue is about documenting that this is even a thing. We know that but new contributors won't.

@skriss
Copy link
Contributor

skriss commented Apr 19, 2019

Let's definitely start to document this stuff. xref #867

@skriss
Copy link
Contributor

skriss commented Apr 19, 2019

xref #1104

@carlisia
Copy link
Contributor Author

carlisia commented Jul 2, 2019

More things:

wrap/add a stack only to errors that are being directly returned from non-velero code (see: #1616 (comment))

use the k8s.io/apimachinery/pkg/util/sets (see: #1616 (comment))

@carlisia
Copy link
Contributor Author

carlisia commented Jul 12, 2019

More:

Generating mocks for our interfaces.

We use a package to do that.

Example: if you want to change this mock: https://github.com/heptio/velero/blob/master/pkg/restic/mocks/backupper.go

Run:

go get github.com/vektra/mockery/.../
cd pkg/restic
mockery -name=Backupper

Might need to run make update to update the imports.

@skriss skriss added Enhancement/Dev Internal or Developer-focused Enhancement to Velero P2 - Long-term important labels Aug 12, 2019
@skriss skriss modified the milestones: v1.2, v1.1 Aug 12, 2019
@skriss
Copy link
Contributor

skriss commented Aug 12, 2019

would be great to ship these docs updates as part of v1.1 if anyone has time -- though not a must-have.

@skriss skriss modified the milestones: v1.1, v1.2 Aug 19, 2019
@carlisia
Copy link
Contributor Author

carlisia commented Sep 19, 2019

When running the website locally, this is the command that works for me:

bundle exec jekyll serve --livereload --future

Otherwise content that I'm adding is not included/displayed as expected.

@carlisia
Copy link
Contributor Author

carlisia commented Sep 20, 2019

More instructions for the website.

When adding a blog post:

  • The author_name must be included in the tags fields so the page that lists the author's posts will work properly. The value for the tags field can be multiple values. Ex:
    author_name: Carlisia Campos
    tags: ['Carlisia Campos', "release", "how-to"].

  • If there is no image added to the header of the post, the default Velero logo will be used. This is fine, but not ideal. If there's an image that can be used as the blog post icon, the image field must be set to: image: /img/posts/<your_image_name.png>, and this image file must be added to the /site/img/posts folder.

@carlisia
Copy link
Contributor Author

Instructions to add: a changelog file for any significant change.

@carlisia
Copy link
Contributor Author

carlisia commented Nov 4, 2019

Closed by: Add code and website guidelines #2032

@carlisia carlisia closed this as completed Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Documentation Enhancement/Dev Internal or Developer-focused Enhancement to Velero
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants