summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generator/annual-report/github_issue.tmpl29
-rw-r--r--generator/annual-report/sig_report.tmpl142
-rw-r--r--generator/annual-report/wg_report.tmpl61
-rw-r--r--generator/app.go122
4 files changed, 349 insertions, 5 deletions
diff --git a/generator/annual-report/github_issue.tmpl b/generator/annual-report/github_issue.tmpl
new file mode 100644
index 00000000..8a1048eb
--- /dev/null
+++ b/generator/annual-report/github_issue.tmpl
@@ -0,0 +1,29 @@
+{{lastYear}} Annual Report: {{.Prefix | toUpper}} {{.Name}}
+
+Chairs: {{range .Leadership.Chairs}}@{{.GitHub}} {{end}}
+Liaison: @{{.Contact.Liaison.GitHub}}
+
+Actions for the chair/organizer of the community group:
+- [ ] Consult your community group to complete draft of report
+- [ ] If needed, consult with Steering Committee liaison on any private issues or concerns that arrise while completing report
+- [ ] Submit PR to git.k8s.io/community repo with copy of report, assigning your Steering Committee liaison for review
+- [ ] Steering Committee reviews report, and may make comments/ask questions
+- [ ] Once all comments are addressed, Steering Committee will approve report to merge
+- [ ] If needed, any follow up items may be brought to the "Chairs, Tech Leads, and Organizers" meeting in April
+
+Once all the above items are complete, this issue may be `/close`'d
+
+Key dates:
+- Initial PR to communtiy repo should be opened by March 1st, {{now.UTC.Year}}
+- PR should be reviewed and merged by April 1st, {{now.UTC.Year}}
+
+More detailed information on the annual reports process is available [here](https://git.k8s.io/community/committee-steering/governance/annual-reports.md).
+
+If you have any questions or concerns about this process, you may reach the Steering Committee via the following methods:
+- Slack/E-mail your liaison directly
+- The public #steering-committee channel in Slack
+- The public mailing list steering@kubernetes.io
+- The private mailing list steering-private@kubernetes.io for any private or sensitive issues.
+
+/{{.Prefix}} {{.Label}}
+/committee steering
diff --git a/generator/annual-report/sig_report.tmpl b/generator/annual-report/sig_report.tmpl
new file mode 100644
index 00000000..53607f8e
--- /dev/null
+++ b/generator/annual-report/sig_report.tmpl
@@ -0,0 +1,142 @@
+# {{lastYear}} Annual Report: {{.Prefix | toUpper}} {{.Name}}
+
+## Current initiatives
+
+1. What work did the SIG do this year that should be highlighted?
+
+ -
+ -
+ -
+
+2. What initiatives are you working on that aren't being tracked in KEPs?
+
+ -
+ -
+ -
+
+3. KEP work in {{lastYear}} (1.x, 1.y, 1.z):
+
+<!--
+Generated from kubernetes/enhancements kep.yaml files
+1. with SIG as owning-sig or in participating-sigs
+2. listing 1.x, 1.y, or 1.z in milestones or in latest-milestone
+-->
+
+ - Stable
+ - [$kep-number - $title](https://git.k8s.io/community/$link/README.md) - $milestone.stable
+ - [$kep-number - $title](https://git.k8s.io/community/$link/README.md) - $milestone.stable
+ - Beta
+ - [$kep-number - $title](https://git.k8s.io/community/$link/README.md) - $milestone.beta
+ - [$kep-number - $title](https://git.k8s.io/community/$link/README.md) - $milestone.beta
+ - Alpha
+ - [$kep-number - $title](https://git.k8s.io/community/$link/README.md) - $milestone.alpha
+ - [$kep-number - $title](https://git.k8s.io/community/$link/README.md) - $milestone.alpha
+ - Pre-alpha
+ - [$kep-number - $title](https://git.k8s.io/community/$link/README.md)
+
+## Project health
+
+1. What areas and/or subprojects does your group need the most help with?
+ Any areas with 2 or fewer OWNERs? (link to more details)
+
+ -
+ -
+ -
+
+2. What metrics/community health stats does your group care about and/or measure?
+
+ -
+ -
+ -
+
+3. Does your [CONTRIBUTING.md] help **new** contributors engage with your group specifically by pointing
+ to activities or programs that provide useful context or allow easy participation?
+
+ -
+
+4. If your group has special training, requirements for reviewers/approvers, or processes beyond the general [contributor guide],
+ does your [CONTRIBUTING.md] document those to help **existing** contributors grow throughout the [contributor ladder]?
+
+ -
+
+5. Does the group have contributors from multiple companies/affiliations?
+
+ -
+
+6. Are there ways end users/companies can contribute that they currently are not?
+ If one of those ways is more full time support, what would they work on and why?
+
+ -
+ -
+
+## Membership
+
+- Primary slack channel member count:
+- Primary mailing list member count:
+- Primary meeting attendee count (estimated, if needed):
+- Primary meeting participant count (estimated, if needed):
+- Unique reviewers for SIG-owned packages: {generated from OWNERS files referenced from subprojects, expanded with OWNERS_ALIASES files}
+- Unique approvers for SIG-owned packages: {generated from OWNERS files referenced from subprojects, expanded with OWNERS_ALIASES files}
+
+Include any other ways you measure group membership
+
+## Subprojects
+
+<!--
+Generated from delta of sigs.yaml from $YYYY-01-01 to $YYYY-12-31
+Manually visible via `git diff HEAD@{$YYYY-01-01} HEAD@{$YYYY-12-31} -- $sig-id/README.md`
+-->
+
+New in $YYYY:
+- [$subproject-name](https://git.k8s.io/community/$sig-id#$subproject-name)
+-
+
+Retired in $YYYY:
+- [$subproject-name](https://git.k8s.io/community/$sig-id#$subproject-name)
+-
+
+Continuing:
+- [$subproject-name](https://git.k8s.io/community/$sig-id#$subproject-name)
+-
+
+## Working groups
+
+<!--
+Generated from delta of sigs.yaml from $YYYY-01-01 to $YYYY-12-31
+Manually visible via `git diff HEAD@{$YYYY-01-01} HEAD@{$YYYY-12-31} -- $sig-id/README.md`
+-->
+
+New in $YYYY:
+- [$wg-name](https://git.k8s.io/community/$wg-id/) ([$YYYY report](https://git.k8s.io/community/$wg-id/annual-report-$YYYY.md))
+-
+
+Retired in $YYYY:
+- [$wg-name](https://git.k8s.io/community/$wg-id/) ([$YYYY report](https://git.k8s.io/community/$wg-id/annual-report-$YYYY.md))
+-
+
+Continuing:
+- [$wg-name](https://git.k8s.io/community/$wg-id/) ([$YYYY report](https://git.k8s.io/community/$wg-id/annual-report-$YYYY.md))
+-
+
+## Operational
+
+Operational tasks in [sig-governance.md]:
+
+[ ] [README.md] reviewed for accuracy and updated if needed
+[ ] [CONTRIBUTING.md] reviewed for accuracy and updated if needed
+ (or created if missing and your contributor steps and experience are different or more
+ in-depth than the documentation listed in the general [contributor guide] and [devel] folder.)
+[ ] Subprojects list and linked OWNERS files in [sigs.yaml] reviewed for accuracy and updated if needed
+[ ] SIG leaders (chairs, tech leads, and subproject owners) in [sigs.yaml] are accurate and active, and updated if needed
+[ ] Meeting notes and recordings for {{lastYear}} are linked from [README.md] and updated/uploaded if needed
+[ ] Did you have community-wide updates in {{lastYear}} (e.g. community meetings, kubecon, or kubernetes-dev@ emails)? Links to email, slides, or recordings:
+ -
+ -
+
+[CONTRIBUTING.md]: https://git.k8s.io/community/{{.Dir}}/CONTRIBUTING.md
+[contributor ladder]: https://git.k8s.io/community/community-membership.md
+[sig-governance.md]: https://git.k8s.io/community/committee-steering/governance/sig-governance.md
+[README.md]: https://git.k8s.io/community/{{.Dir}}/README.md
+[sigs.yaml]: https://git.k8s.io/community/sigs.yaml
+[contributor guide]: https://git.k8s.io/community/contributors/guide/README.md
+[devel]: https://git.k8s.io/community/contributors/devel/README.md
diff --git a/generator/annual-report/wg_report.tmpl b/generator/annual-report/wg_report.tmpl
new file mode 100644
index 00000000..6e4e2d5b
--- /dev/null
+++ b/generator/annual-report/wg_report.tmpl
@@ -0,0 +1,61 @@
+# {{lastYear}} Annual Report: {{.Prefix | toUpper}} {{.Name}}
+
+## Current initiatives
+
+1. What work did the WG do this year that should be highlighted?
+ For example, artifacts, reports, white papers produced this year.
+
+ -
+ -
+ -
+
+2. What initiatives are you working on that aren't being tracked in KEPs?
+
+ -
+ -
+ -
+
+## Project health
+
+1. What's the current roadmap until completion of the working group?
+
+ -
+ -
+ -
+
+2. Does the group have contributors from multiple companies/affiliations?
+
+ -
+
+3. Are there ways end users/companies can contribute that they currently are not?
+ If one of those ways is more full time support, what would they work on and why?
+
+ -
+ -
+
+## Membership
+
+- Primary slack channel member count:
+- Primary mailing list member count:
+- Primary meeting attendee count (estimated, if needed):
+- Primary meeting participant count (estimated, if needed):
+
+Include any other ways you measure group membership
+
+## Operational
+
+Operational tasks in [wg-governance.md]:
+
+[ ] [README.md] reviewed for accuracy and updated if needed
+[ ] WG leaders in [sigs.yaml] are accurate and active, and updated if needed
+[ ] Meeting notes and recordings for {{lastYear}} are linked from [README.md] and updated/uploaded if needed
+[ ] Updates provided to sponsoring SIGs in {{lastYear}}
+ - [$sig-name](https://git.k8s.io/community/$sig-id/)
+ - links to email, meeting notes, slides, or recordings, etc
+ - [$sig-name](https://git.k8s.io/community/$sig-id/)
+ - links to email, meeting notes, slides, or recordings, etc
+ -
+
+[wg-governance.md]: https://git.k8s.io/community/committee-steering/governance/wg-governance.md
+[README.md]: https://git.k8s.io/community/{{.Dir}}/README.md
+[sigs.yaml]: https://git.k8s.io/community/sigs.yaml
diff --git a/generator/app.go b/generator/app.go
index 22c751ff..bae4903e 100644
--- a/generator/app.go
+++ b/generator/app.go
@@ -27,16 +27,20 @@ import (
"sort"
"strings"
"text/template"
+ "time"
yaml "gopkg.in/yaml.v3"
)
const (
- readmeTemplate = "readme.tmpl"
- listTemplate = "list.tmpl"
- aliasesTemplate = "aliases.tmpl"
- liaisonsTemplate = "liaisons.tmpl"
- headerTemplate = "header.tmpl"
+ readmeTemplate = "readme.tmpl"
+ listTemplate = "list.tmpl"
+ aliasesTemplate = "aliases.tmpl"
+ liaisonsTemplate = "liaisons.tmpl"
+ headerTemplate = "header.tmpl"
+ annualReportIssueTemplate = "annual-report/github_issue.tmpl"
+ annualReportSIGTemplate = "annual-report/sig_report.tmpl"
+ annualReportWGTemplate = "annual-report/wg_report.tmpl"
sigsYamlFile = "sigs.yaml"
sigListOutput = "sig-list.md"
@@ -155,6 +159,7 @@ func (g *LeadershipGroup) Owners() []Person {
// Group represents either a Special Interest Group (SIG) or a Working Group (WG)
type Group struct {
Dir string
+ Prefix string `yaml:",omitempty"`
Name string
MissionStatement FoldedString `yaml:"mission_statement,omitempty"`
CharterLink string `yaml:"charter_link,omitempty"`
@@ -377,6 +382,14 @@ var funcMap = template.FuncMap{
"trimSuffix": strings.TrimSuffix,
"githubURL": githubURL,
"orgRepoPath": orgRepoPath,
+ "now": time.Now,
+ "lastYear": lastYear,
+ "toUpper": strings.ToUpper,
+}
+
+// lastYear returns the last year as a string
+func lastYear() string {
+ return time.Now().AddDate(-1, 0, 0).Format("2006")
}
// githubURL converts a raw GitHub url (links directly to file contents) into a
@@ -510,6 +523,91 @@ func createGroupReadme(groups []Group, prefix string) error {
return nil
}
+func createAnnualReportIssue(groups []Group, prefix string) error {
+ // figure out if the user wants to generate one group
+ var selectedGroupName *string
+ if envVal, ok := os.LookupEnv("WHAT"); ok {
+ selectedGroupName = &envVal
+ }
+
+ for _, group := range groups {
+ switch prefix {
+ case "sig":
+ group.Prefix = "sig"
+ case "wg":
+ group.Prefix = "wg"
+ default:
+ continue
+
+ }
+
+ outputDir := filepath.Join(baseGeneratorDir, "generator/generated")
+
+ // skip generation if the user specified only one group
+ if selectedGroupName != nil && !strings.HasSuffix(group.Dir, *selectedGroupName) {
+ fmt.Printf("Skipping %s/%s_%s.md\n", outputDir, lastYear(), group.Dir)
+ continue
+ }
+
+ fmt.Printf("Generating %s/%s_%s.md\n", outputDir, lastYear(), group.Dir)
+ if err := createDirIfNotExists(outputDir); err != nil {
+ return err
+ }
+
+ outputPath := filepath.Join(outputDir, fmt.Sprintf("%s_%s.md", lastYear(), group.Dir))
+ templatePath := filepath.Join(baseGeneratorDir, templateDir, annualReportIssueTemplate)
+ if err := writeTemplate(templatePath, outputPath, "markdown", group); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func createAnnualReport(groups []Group, prefix string) error {
+ // figure out if the user wants to generate one group
+ var selectedGroupName *string
+ var templateFile string
+ if envVal, ok := os.LookupEnv("WHAT"); ok {
+ selectedGroupName = &envVal
+ }
+
+ for _, group := range groups {
+ switch prefix {
+ case "sig":
+ group.Prefix = "sig"
+ templateFile = annualReportSIGTemplate
+ case "wg":
+ group.Prefix = "wg"
+ templateFile = annualReportWGTemplate
+ default:
+ continue
+
+ }
+
+ outputDir := filepath.Join(baseGeneratorDir, group.Dir)
+
+ // skip generation if the user specified only one group
+ if selectedGroupName != nil && !strings.HasSuffix(group.Dir, *selectedGroupName) {
+ fmt.Printf("Skipping %s/annual-report-%s.md\n", outputDir, lastYear())
+ continue
+ }
+
+ fmt.Printf("Generating %s/annual-report-%s.md\n", outputDir, lastYear())
+ if err := createDirIfNotExists(outputDir); err != nil {
+ return err
+ }
+
+ outputPath := filepath.Join(outputDir, fmt.Sprintf("annual-report-%s.md", lastYear()))
+ templatePath := filepath.Join(baseGeneratorDir, templateDir, templateFile)
+ if err := writeTemplate(templatePath, outputPath, "markdown", group); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
// readSigsYaml decodes yaml stored in a file at path into the
// specified yaml.Node
func readYaml(path string, data interface{}) error {
@@ -570,6 +668,20 @@ func main() {
}
}
+ if envVal, ok := os.LookupEnv("ANNUAL_REPORT"); ok && envVal == "true" {
+ fmt.Println("Generating annual reports")
+ for prefix, groups := range ctx.PrefixToGroupMap() {
+ err = createAnnualReportIssue(groups, prefix)
+ if err != nil {
+ log.Fatal(err)
+ }
+ err = createAnnualReport(groups, prefix)
+ if err != nil {
+ log.Fatal(err)
+ }
+ }
+ }
+
fmt.Println("Generating sig-list.md")
outputPath := filepath.Join(baseGeneratorDir, sigListOutput)
err = writeTemplate(filepath.Join(baseGeneratorDir, templateDir, listTemplate), outputPath, "markdown", ctx)