Skip to content

Commit

Permalink
community: generate sig-list.md (#312)
Browse files Browse the repository at this point in the history
* community: generate sig-list.md

Creates an overview over all the sigs that are defined via sigs.yaml
Also corrects a couple of labels for the sigs.

Signed-off-by: Daniel Hiller <[email protected]>

* community, generator: remove unneccessary code

Signed-off-by: Daniel Hiller <[email protected]>

* community, sig-list.md: use proper html list elements

Since asterisks inside tables aren't rendered properly, we use html
ordered/unordered list elements to show chairs and meetings instead.

Also we add links to the documentation of labels, and to the membership
policy document so people can directly look up what those mean.

Signed-off-by: Daniel Hiller <[email protected]>

---------

Signed-off-by: Daniel Hiller <[email protected]>
  • Loading branch information
dhiller authored Sep 4, 2024
1 parent db2ea07 commit 6c053fd
Show file tree
Hide file tree
Showing 11 changed files with 360 additions and 68 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
generate:
go run ./generators/cmd/sigs

validate-sigs:
go run ./validators/cmd/sigs
11 changes: 11 additions & 0 deletions generators/cmd/sigs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# sigs generator

Generates markdown pages for the sigs, user groups and committees defined in `sigs.yaml`.

Run it whenenver you have changed the [sigs.yaml](/sigs.yaml)

## Usage

```bash
make generate
```
87 changes: 87 additions & 0 deletions generators/cmd/sigs/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* This file is part of the KubeVirt project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright the KubeVirt Authors.
*
*/

package main

import (
_ "embed"
"flag"
"github.com/sirupsen/logrus"
"kubevirt.io/community/pkg/sigs"
"os"
"text/template"
)

var (
debug bool
sigsFilePath string
//go:embed sig-list.gomd
sigListTemplate string
)

type SigListTemplateData struct {
Sigs *sigs.Sigs
}

func init() {
logrus.SetFormatter(&logrus.JSONFormatter{})
}

func main() {
fs := flag.NewFlagSet(os.Args[0], flag.ExitOnError)
fs.BoolVar(&debug, "debug", false, "whether debug information should be printed")
fs.StringVar(&sigsFilePath, "sigs-file-path", "./sigs.yaml", "file path to the sigs.yaml file to check")
err := fs.Parse(os.Args[1:])
if err != nil {
log().Fatalf("error parsing arguments %v: %v", os.Args[1:], err)
}

if debug {
logrus.SetLevel(logrus.DebugLevel)
}

sigs, err := sigs.ReadFile(sigsFilePath)
if err != nil {
log().Fatalf("invalid arguments: %v", err)
}

sigListFile, err := os.Create("./sig-list.md")
if err != nil {
log().Fatalf("could not open file: %v", err)
}
defer sigListFile.Close()

t, err := template.New("report").Parse(sigListTemplate)
if err != nil {
log().Fatalf("failed to load template: %v", err)
}

err = t.Execute(sigListFile, SigListTemplateData{Sigs: sigs})
if err != nil {
log().Fatalf("failed to execute template: %v", err)
}
}

func log() *logrus.Entry {
return logrus.WithFields(
logrus.Fields{
"generator": "sigs",
},
)
}
68 changes: 68 additions & 0 deletions generators/cmd/sigs/sig-list.gomd
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{{- /*
This file is part of the KubeVirt project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and
limitations under the License.

Copyright the KubeVirt Authors.

*/
-}}
{{- /* gotype: kubevirt.io/community/generators/cmd/sigs.SigListTemplateData */ -}}
{{ define "group" }}|[{{ .Name }}]({{ .Dir }}/charter.md) |[{{ .Label }}](https://github.com/kubevirt/kubevirt/labels/{{ .Label }})|{{ if .Leadership }}<ol>{{ range $index2, $chair := .Leadership.Chairs }}<li>[{{ $chair.Name }}](https://github.com/{{ $chair.Github }}), {{ $chair.Company }}</li>{{ end }}</ol>{{ end }} |{{ if .Contact }}[Slack]({{ .Contact.Slack}})<br/> [Mailing List]({{ .Contact.MailingList }}){{ end }} |<ul>{{ range $index3, $meeting := .Meetings }}<li>{{ $meeting.Description }}: [ {{ $meeting.Day }} at {{ $meeting.Time }} {{ $meeting.TZ }} ({{ $meeting.Frequency }}) ]({{ $meeting.URL }})</li>{{ end }}</ul> |{{ end }}
<!---
This is an autogenerated file!

Please do not edit this file directly, but instead make changes to the
sigs.yaml file in the project root.

To understand how this file is generated, see github.com/kubevirt/community/tree/main/generator/cmd/sigs/README.md
--->

Most community activity is organized into Special Interest Groups (SIGs),
Working Groups, and the community meeting.

SIGs follow these [guidelines](GOVERNANCE.md) although each of these groups may operate a little differently
depending on their needs and workflow.

Each group's material is in its subdirectory in this project.

{{ if $.Sigs.Usergroups }}
### User Groups

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
{{ range $ug := $.Sigs.Usergroups }}{{ template "group" $ug }}
{{ end }}
{{ end }}

{{ if $.Sigs.Sigs }}
### Special Interest Groups

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
{{ range $sig := $.Sigs.Sigs }}{{ template "group" $sig }}
{{ end }}
{{end}}

{{ if $.Sigs.Committees }}
### Committees

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
{{ range $committee := $.Sigs.Committees }}{{ template "group" $committee }}
{{ end }}
{{end}}

[1]: https://github.com/kubevirt/project-infra/blob/main/docs/labels.md
[2]: https://github.com/kubevirt/community/blob/main/membership_policy.md
9 changes: 7 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
module kubevirt.io/community

go 1.16
go 1.22

require gopkg.in/yaml.v3 v3.0.0
require gopkg.in/yaml.v3 v3.0.1

require (
github.com/sirupsen/logrus v1.9.3 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
)
12 changes: 12 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
40 changes: 40 additions & 0 deletions pkg/sigs/sigs.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* This file is part of the KubeVirt project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright the KubeVirt Authors.
*
*/

package sigs

import (
"fmt"
"gopkg.in/yaml.v3"
"os"
)

func ReadFile(path string) (*Sigs, error) {
buf, err := os.ReadFile(path)
if err != nil {
return nil, fmt.Errorf("error reading %s: %v", path, err)
}

sigs := &Sigs{}
err = yaml.Unmarshal(buf, sigs)
if err != nil {
return nil, fmt.Errorf("in file %q: %v", path, err)
}
return sigs, err
}
74 changes: 74 additions & 0 deletions pkg/sigs/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/*
* This file is part of the KubeVirt project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Copyright the KubeVirt Authors.
*
*/

package sigs

type Sigs struct {
Sigs []*Group `yaml:"sigs"`
Usergroups []*Group `yaml:"usergroups"`
Committees []*Group `yaml:"committees"`
}

type Group struct {
Dir string
Name string
MissionStatement string `yaml:"mission_statement,omitempty"`
Label string `yaml:",omitempty"`
Leadership *Leadership `yaml:",omitempty"`
Meetings []*Meeting `yaml:",omitempty"`
Contact *Contact `yaml:",omitempty"`
SubProjects []*SubProjects `yaml:",omitempty"`
}

type Contact struct {
Slack string `yaml:"slack"`
MailingList string `yaml:"mailing_list"`
Teams []*Team `yaml:"teams"`
}

type Team struct {
Name string `yaml:"name"`
Description string `yaml:"description"`
}

type Meeting struct {
Description string
Day string
Time string
TZ string
Frequency string
URL string
ArchiveURL string `yaml:"archive_url"`
RecordingsURL string `yaml:"recordings_url"`
}

type Leadership struct {
Chairs []*Chair
}

type Chair struct {
Github string
Name string
Company string
}

type SubProjects struct {
Name string
Owners []string
}
48 changes: 48 additions & 0 deletions sig-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

<!---
This is an autogenerated file!
Please do not edit this file directly, but instead make changes to the
sigs.yaml file in the project root.
To understand how this file is generated, see github.com/kubevirt/community/tree/main/generator/cmd/sigs/README.md
--->

Most community activity is organized into Special Interest Groups (SIGs),
Working Groups, and the community meeting.

SIGs follow these [guidelines](GOVERNANCE.md) although each of these groups may operate a little differently
depending on their needs and workflow.

Each group's material is in its subdirectory in this project.


### User Groups

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
|[KubeVirt Community](kubevirt-community/charter.md) |[kubevirt-community](https://github.com/kubevirt/kubevirt/labels/kubevirt-community)|<ol></ol> |[Slack](virtualization)<br/> [Mailing List](https://groups.google.com/forum/#!forum/kubevirt-dev) |<ul><li>Regular KubeVirt Community Meeting: [ Wednesday at 15:00 UTC (weekly) ](https://zoom.us/j/92221936273)</li></ul> |




### Special Interest Groups

| Name | Label [1] | Chairs [2] | Contact | Meetings |
|------|-----------|---------|---------|----------|
|[sig-compute](sig-compute/charter.md) |[sig/compute](https://github.com/kubevirt/kubevirt/labels/sig/compute)|<ol><li>[Itamar Holder](https://github.com/iholder101), Red Hat</li><li>[Jed Lejosne](https://github.com/jean-edouard), Red Hat</li></ol> |[Slack](kubevirt-dev)<br/> [Mailing List](https://groups.google.com/forum/#!forum/kubevirt-dev) |<ul></ul> |
|[documentation](sig-documentation/charter.md) |[](https://github.com/kubevirt/kubevirt/labels/)| | |<ul></ul> |
|[storage](sig-storage/charter.md) |[](https://github.com/kubevirt/kubevirt/labels/)| | |<ul></ul> |
|[testing](sig-testing/charter.md) |[](https://github.com/kubevirt/kubevirt/labels/)| | |<ul></ul> |
|[network](sig-network/charter.md) |[](https://github.com/kubevirt/kubevirt/labels/)| | |<ul></ul> |
|[KubeVirt Perf and Scale SIG](sig-scale/charter.md) |[kubevirt-community](https://github.com/kubevirt/kubevirt/labels/kubevirt-community)|<ol><li>[Ryan Hallisey](https://github.com/rthallisey), Nvidia</li><li>[Alay Patel](https://github.com/alaypatel07), Nvidia</li></ol> |[Slack](kubevirt-dev)<br/> [Mailing List](https://groups.google.com/forum/#!forum/kubevirt-dev) |<ul><li>KubeVirt Perf and Scale SIG Meeting: [ Thursday at 14:00 UTC (bimonthy) ](https://zoom.us/j/3205945033)</li></ul> |
|[observability](sig-observability/charter.md) |[](https://github.com/kubevirt/kubevirt/labels/)| | |<ul></ul> |
|[KubeVirt Buildsystem SIG](sig-buildsystem/charter.md) |[sig/buildsystem](https://github.com/kubevirt/kubevirt/labels/sig/buildsystem)|<ol><li>[Daniel Hiller](https://github.com/dhiller), Red Hat</li><li>[Brian Carey](https://github.com/brianmcarey), Red Hat</li><li>[Luboslav Pivarc](https://github.com/xpivarc), Red Hat</li></ol> | |<ul></ul> |
|[KubeVirt CI Operations Group](sig-ci/charter.md) |[sig/ci](https://github.com/kubevirt/kubevirt/labels/sig/ci)|<ol><li>[Brian Carey](https://github.com/brianmcarey), Red Hat</li><li>[Daniel Hiller](https://github.com/dhiller), Red Hat</li></ol> |[Slack](kubevirt-dev)<br/> [Mailing List](https://groups.google.com/forum/#!forum/kubevirt-dev) |<ul><li>KubeVirt CI Taskforce Sync meeting: [ Monday at 09:00 CET (weekly) ](https://zoom.us/j/96583958896)</li><li>KubeVirt tests quarantine catch-up: [ Wednesday at 08:45 CET (weekly) ](https://zoom.us/j/94552009485)</li></ul> |





[1]: https://github.com/kubevirt/project-infra/blob/main/docs/labels.md
[2]: https://github.com/kubevirt/community/blob/main/membership_policy.md
5 changes: 3 additions & 2 deletions sigs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
sigs:
- dir: sig-compute
label: sig-compute
label: sig/compute
leadership:
chairs:
- github: iholder101
Expand Down Expand Up @@ -155,7 +155,7 @@ sigs:
mission_statement: |
SIG buildsystem takes care of all things building and automating for the KubeVirt project - they ensure new and existing contributors have a smooth contribution experience, i.o.w. contributors shouldn't have the feeling that they are wasting their time.
This includes bazel, test automation and updates, also support of failing builds or test lanes in case of infrastructural or configuration problems.
label: sig-buildsystem
label: sig/buildsystem
leadership:
chairs:
- github: dhiller
Expand All @@ -168,6 +168,7 @@ sigs:
name: "Luboslav Pivarc"
company: Red Hat
- dir: sig-ci
label: sig/ci
name: KubeVirt CI Operations Group
mission_statement: |
Ensure that the CI infrastructure is operational, that CI jobs are executed in a timely manner and PRs of any of the onboarded projects are not blocked.
Expand Down
Loading

0 comments on commit 6c053fd

Please sign in to comment.