profile
viewpoint
Srini Brahmaroutu brahmaroutu IBM Corporation San Jose

push eventbrahmaroutu/enhancements

Srini Brahmaroutu

commit sha e14f4e1aec89f80716ded18ba83ccb7e2ace6582

Verification Test Suite Process for CSI Implementations

view details

Srini Brahmaroutu

commit sha 983e6240e3320ef09e3f3d11eaa09a9d5e3a983f

Fix

view details

push time in 2 days

push eventbrahmaroutu/enhancements

Srini Brahmaroutu

commit sha 7a5ef7f596343c630edd5351ab7a614546e32757

Verification Test Suite Process for CSI Implementations

view details

push time in 2 days

PR opened kubernetes/enhancements

Verification Test Suite Process for CSI Implementations

This KEP will allow to identify a set of tests that should be used to test CSI implementations for in-tree CSI and out of tree CSI drivers.

/sig storage /sig testing /area conformance

+148 -0

0 comment

1 changed file

pr created time in 2 days

pull request commentkubernetes/test-infra

Adding support for handling events from Issues

/hold cancel

brahmaroutu

comment created time in 2 days

Pull request review commentkubernetes/test-infra

Adding support for handling events from Issues

 func getColumnID(gc githubClient, orgRepoName, projectName, columnName, issueURL 	return nil, fmt.Errorf("could not find project %s in org/repo %s", projectName, orgRepoName) } -func addPRToColumn(gc githubClient, columnID int, pe github.PullRequestEvent) error {+func addPRToColumn(gc githubClient, columnID int, e eventData) error {

/unhold

brahmaroutu

comment created time in 5 days

Pull request review commentkubernetes/test-infra

Adding support for handling events from Issues

 func getColumnID(gc githubClient, orgRepoName, projectName, columnName, issueURL 	return nil, fmt.Errorf("could not find project %s in org/repo %s", projectName, orgRepoName) } -func addPRToColumn(gc githubClient, columnID int, pe github.PullRequestEvent) error {+func addPRToColumn(gc githubClient, columnID int, e eventData) error {

Thanks for the review, please review to merge.

brahmaroutu

comment created time in 5 days

push eventbrahmaroutu/test-infra

Katharine Berry

commit sha e68007df5de52b2874437f6a57f6e0d0cd1e0c4f

Make job history display handle pending jobs better.

view details

Steve Kuznetsov

commit sha 4892aba7b90ae653e021c6af945156a634338765

Use path simplification library for deck metrics Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

view details

Yecheng Fu

commit sha 067c67b897347852c1af7da9d257017c532ca7cf

able to specify kind node image

view details

Matt Matejczyk

commit sha 6e2bb5845fe1e254ce2f30d3dc670fe9d507d9a5

Add scalability-presubmit-project to boskos resource types Ref. https://github.com/kubernetes/perf-tests/issues/650

view details

Justin SB

commit sha f99b60b89d42e5e081aa7b8f4662b4e7a6101e7d

Revert "Delete maintenance-aws-janitor which never works" This reverts commit c8a449773d5519286e1003d2129c9627f2c236ae.

view details

Justin SB

commit sha 8840e189102a586c669060e0d22378a35475e208

Add ci-aws-janitor job to dashboard

view details

Justin SB

commit sha f469aa8debac467a36ef0d151142c9a19f523939

aws-janitor: Don't exit with error code when we clean up It's not an error; this is the janitor doing what it is supposed to. It makes it look like the janitor is failing, when in fact another job is leaking resources.

view details

Cole Wagner

commit sha 70005b299bbc48522c69b0988f03a8d62987df2f

Add prometheus alerts for Tide pool errors.

view details

Steve Kuznetsov

commit sha 34ca2aa826fe692d0c6abb646135e6dba054a0d8

Refactor MergeAndCheckout to reuse other client calls Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

view details

Petr Muller

commit sha 3349e02b6907eb70350121fc63456c25d5608063

github: Add UpdateRepo() method

view details

Petr Muller

commit sha 56ce7ad384b2e9e64cab1da7f073684da2e1ec20

peribolos: Add feature to update existing GitHub repos

view details

Petr Muller

commit sha 2828c7175f86bb3337bceb8dfa7aaf63c66ccab3

peribolos: Prevent unsupported API call to unarchive a repo

view details

Anish Ramasekar

commit sha 86848733e06dd6d5a987db6d31c4bad6e6ef54a0

add dashboard for all azure jobs

view details

Anish Ramasekar

commit sha 11760467947fa713b055f696e27a7c9c655bdd81

replace sig-azure with provider-azure

view details

Anish Ramasekar

commit sha 03342e2fbdb9ea04c20f57679464ed8ff7281e91

remove testgrid email for staging

view details

Michelle Shepardson

commit sha c2776154738ae2ff082818a85c0d92e4662ad74d

Revert "Configure prow job for multi-tenancy/hnc" This reverts commit 052ebc3cd59a67902980d5fed9ccbf192e74221e.

view details

Anish Ramasekar

commit sha d240a54828f898ae5dd52937ef61ca772544ce5f

update dashboard group name

view details

Jeremy Lewi

commit sha b5290815871063636b1e1869427dc4b7ed144a5d

Define a periodic job to run the 0.7 tests. * The main code for our e2e tests is still on kubeflow/kubeflow@master so that's the branch we associate the periodic test with for now. * Related to kubeflow/testing#498 Fix lint

view details

Katharine Berry

commit sha 3ab7273e02c4eb5f25e02cc29f1a1e01ab000562

Revert "Merge pull request #14747 from justaugustus/img-build" This reverts commit efc3bd0d1d31868c84efde8dbd9185be2ae83fe7, reversing changes made to 85cef905414528a166d887187e844b741a9f0bbd.

view details

Jeremy Lewi

commit sha 9bcb4601484df8dd842330cb1403266e68fb0a49

Miscellaneous change to retrigger CLA check.

view details

push time in 5 days

push eventbrahmaroutu/test-infra

Katharine Berry

commit sha e68007df5de52b2874437f6a57f6e0d0cd1e0c4f

Make job history display handle pending jobs better.

view details

Steve Kuznetsov

commit sha 4892aba7b90ae653e021c6af945156a634338765

Use path simplification library for deck metrics Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

view details

Yecheng Fu

commit sha 067c67b897347852c1af7da9d257017c532ca7cf

able to specify kind node image

view details

Matt Matejczyk

commit sha 6e2bb5845fe1e254ce2f30d3dc670fe9d507d9a5

Add scalability-presubmit-project to boskos resource types Ref. https://github.com/kubernetes/perf-tests/issues/650

view details

Justin SB

commit sha f99b60b89d42e5e081aa7b8f4662b4e7a6101e7d

Revert "Delete maintenance-aws-janitor which never works" This reverts commit c8a449773d5519286e1003d2129c9627f2c236ae.

view details

Justin SB

commit sha 8840e189102a586c669060e0d22378a35475e208

Add ci-aws-janitor job to dashboard

view details

Justin SB

commit sha f469aa8debac467a36ef0d151142c9a19f523939

aws-janitor: Don't exit with error code when we clean up It's not an error; this is the janitor doing what it is supposed to. It makes it look like the janitor is failing, when in fact another job is leaking resources.

view details

Cole Wagner

commit sha 70005b299bbc48522c69b0988f03a8d62987df2f

Add prometheus alerts for Tide pool errors.

view details

Steve Kuznetsov

commit sha 34ca2aa826fe692d0c6abb646135e6dba054a0d8

Refactor MergeAndCheckout to reuse other client calls Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>

view details

Petr Muller

commit sha 3349e02b6907eb70350121fc63456c25d5608063

github: Add UpdateRepo() method

view details

Petr Muller

commit sha 56ce7ad384b2e9e64cab1da7f073684da2e1ec20

peribolos: Add feature to update existing GitHub repos

view details

Petr Muller

commit sha 2828c7175f86bb3337bceb8dfa7aaf63c66ccab3

peribolos: Prevent unsupported API call to unarchive a repo

view details

Anish Ramasekar

commit sha 86848733e06dd6d5a987db6d31c4bad6e6ef54a0

add dashboard for all azure jobs

view details

Anish Ramasekar

commit sha 11760467947fa713b055f696e27a7c9c655bdd81

replace sig-azure with provider-azure

view details

Anish Ramasekar

commit sha 03342e2fbdb9ea04c20f57679464ed8ff7281e91

remove testgrid email for staging

view details

Michelle Shepardson

commit sha c2776154738ae2ff082818a85c0d92e4662ad74d

Revert "Configure prow job for multi-tenancy/hnc" This reverts commit 052ebc3cd59a67902980d5fed9ccbf192e74221e.

view details

Anish Ramasekar

commit sha d240a54828f898ae5dd52937ef61ca772544ce5f

update dashboard group name

view details

Jeremy Lewi

commit sha b5290815871063636b1e1869427dc4b7ed144a5d

Define a periodic job to run the 0.7 tests. * The main code for our e2e tests is still on kubeflow/kubeflow@master so that's the branch we associate the periodic test with for now. * Related to kubeflow/testing#498 Fix lint

view details

Katharine Berry

commit sha 3ab7273e02c4eb5f25e02cc29f1a1e01ab000562

Revert "Merge pull request #14747 from justaugustus/img-build" This reverts commit efc3bd0d1d31868c84efde8dbd9185be2ae83fe7, reversing changes made to 85cef905414528a166d887187e844b741a9f0bbd.

view details

Jeremy Lewi

commit sha 9bcb4601484df8dd842330cb1403266e68fb0a49

Miscellaneous change to retrigger CLA check.

view details

push time in 5 days

pull request commentkubernetes/test-infra

Adding support for handling events from Issues

@stevekuznetsov @matthyx @michelle192837 Will you be able to review this PR? This is critical to get automation working for project boards.

brahmaroutu

comment created time in 6 days

push eventbrahmaroutu/enhancements

Srini Brahmaroutu

commit sha 234ad13632d742a96a761e8382d2a4bd6512987b

Verification Test Suite Process for CSI Implementations

view details

push time in 7 days

pull request commentkubernetes/test-infra

Adding support for handling events from Issues

@cjwagner can you please review this ASAP.

brahmaroutu

comment created time in 8 days

push eventbrahmaroutu/enhancements

zacharysarah

commit sha 78765a59769ccbdbcc31f57ac44f1f76d00195ac

Update SIG Docs leads to match k/org

view details

Patrick Lang

commit sha 6df5bf44d4bb99ab47459ea4cb1bca4072ff21dc

Starting Windows RuntimeClass KEP

view details

Zihong Zheng

commit sha c9cb11ae667caede2857125940d51d94053e6c33

Update graduation criteria for service finalizer KEP

view details

Patrick Lang

commit sha 91da127af70f835d9f286dfb84c11fcf8e4f9070

Updates after first round of feedback

view details

Patrick Lang

commit sha 134c35c7bba933115b0478a9bcef779f5a564185

fix codeblock rendering

view details

Patrick Lang

commit sha b15f71fdb988f47547090d3eade8e805ad628189

2nd round of review updates

view details

Tim Allclair

commit sha 323692f5ce48287275d086c4c082733c6c20bd83

Update mdtoc to accept case-insensitive tags

view details

Tim Allclair

commit sha 7dcb49b1c4cdd46e6c7f1ad6422bcf20c44bf4ad

Cleanup KEP TOCs

view details

Patrick Lang

commit sha f9c0ee978dfec37960767d8e83c077c5d1a1336e

add more details on build string, container images

view details

Patrick Lang

commit sha b143e0e8a2d629d9dd650a1cf699aa7550921f85

fix toc

view details

Kubernetes Prow Robot

commit sha c21bf3a3c574f0add5f5f615cbf35cf83dd6cda5

Merge pull request #1302 from PatrickLang/windows-runtimeclass Windows RuntimeClass KEP

view details

Walter Fender

commit sha ce91bd24d9f5663de55ef420f620d3b154c3f832

Reflecting SIG cloud provider chair changes.

view details

Antoine Pelisse

commit sha 61f326f01287025dc0790d80a39decf7d82aa832

Apply KEP: Document toplogy

view details

John Belamaric

commit sha 188496e7fb53121dab5a1e46999eb6e35284b0aa

kep/service-topology: add test plan

view details

Kubernetes Prow Robot

commit sha 239b0c8cc09895b63151806251d7f6c2d2c3aa2f

Merge pull request #1322 from johnbelamaric/service-topo-test-plan kep/service-topology: add test plan

view details

Kubernetes Prow Robot

commit sha 34cb5ee10daffcc7e9a868fccdac719d92f1e8d2

Merge pull request #1316 from tallclair/toc Allow case-insensitive TOC tags

view details

draveness

commit sha 34739047fc36a7bb7be28dad7fa97e94616a0a5b

feat(scheduling): update existing tests section

view details

Kubernetes Prow Robot

commit sha 10b5587ccddd26a17fa793c68d2a84d0d29dfffc

Merge pull request #1325 from draveness/feature/update-test-section-in-taint-node-by-condition feat(scheduling): update existing tests section

view details

byonggon chun

commit sha 2de9f67521ecd38bfccb4ad79000038659266728

Update huge pages KEP for container isolation of huge pages Signed-off-by: Byonggon Chun <bg.chun@samsung.com>

view details

Matt Farina

commit sha 738af2c50cf34f699fd261d23368eb8a149e8e7e

Adding Janet Kuo to the SIG Apps owners

view details

push time in 9 days

push eventbrahmaroutu/enhancements

zacharysarah

commit sha 78765a59769ccbdbcc31f57ac44f1f76d00195ac

Update SIG Docs leads to match k/org

view details

Patrick Lang

commit sha 6df5bf44d4bb99ab47459ea4cb1bca4072ff21dc

Starting Windows RuntimeClass KEP

view details

Zihong Zheng

commit sha c9cb11ae667caede2857125940d51d94053e6c33

Update graduation criteria for service finalizer KEP

view details

Patrick Lang

commit sha 91da127af70f835d9f286dfb84c11fcf8e4f9070

Updates after first round of feedback

view details

Patrick Lang

commit sha 134c35c7bba933115b0478a9bcef779f5a564185

fix codeblock rendering

view details

Patrick Lang

commit sha b15f71fdb988f47547090d3eade8e805ad628189

2nd round of review updates

view details

Tim Allclair

commit sha 323692f5ce48287275d086c4c082733c6c20bd83

Update mdtoc to accept case-insensitive tags

view details

Tim Allclair

commit sha 7dcb49b1c4cdd46e6c7f1ad6422bcf20c44bf4ad

Cleanup KEP TOCs

view details

Patrick Lang

commit sha f9c0ee978dfec37960767d8e83c077c5d1a1336e

add more details on build string, container images

view details

Patrick Lang

commit sha b143e0e8a2d629d9dd650a1cf699aa7550921f85

fix toc

view details

Kubernetes Prow Robot

commit sha c21bf3a3c574f0add5f5f615cbf35cf83dd6cda5

Merge pull request #1302 from PatrickLang/windows-runtimeclass Windows RuntimeClass KEP

view details

Walter Fender

commit sha ce91bd24d9f5663de55ef420f620d3b154c3f832

Reflecting SIG cloud provider chair changes.

view details

Antoine Pelisse

commit sha 61f326f01287025dc0790d80a39decf7d82aa832

Apply KEP: Document toplogy

view details

John Belamaric

commit sha 188496e7fb53121dab5a1e46999eb6e35284b0aa

kep/service-topology: add test plan

view details

Kubernetes Prow Robot

commit sha 239b0c8cc09895b63151806251d7f6c2d2c3aa2f

Merge pull request #1322 from johnbelamaric/service-topo-test-plan kep/service-topology: add test plan

view details

Kubernetes Prow Robot

commit sha 34cb5ee10daffcc7e9a868fccdac719d92f1e8d2

Merge pull request #1316 from tallclair/toc Allow case-insensitive TOC tags

view details

draveness

commit sha 34739047fc36a7bb7be28dad7fa97e94616a0a5b

feat(scheduling): update existing tests section

view details

Kubernetes Prow Robot

commit sha 10b5587ccddd26a17fa793c68d2a84d0d29dfffc

Merge pull request #1325 from draveness/feature/update-test-section-in-taint-node-by-condition feat(scheduling): update existing tests section

view details

byonggon chun

commit sha 2de9f67521ecd38bfccb4ad79000038659266728

Update huge pages KEP for container isolation of huge pages Signed-off-by: Byonggon Chun <bg.chun@samsung.com>

view details

Matt Farina

commit sha 738af2c50cf34f699fd261d23368eb8a149e8e7e

Adding Janet Kuo to the SIG Apps owners

view details

push time in 9 days

push eventbrahmaroutu/test-infra

Roman Mohr

commit sha b60c88ea6db76f1c6820491259543b96fe3eadc6

Make bazel cache config in bootstrap image configurable

view details

Pavithra Ramesh

commit sha 7bb7d078b735c9a9f1e0dec6e8f6b28a230820d7

re-enable stubdomains test with node-cache fix indent

view details

Vince Prignano

commit sha 61489888e1fbaa590285a4660002355df9cbcfe9

Build release-0.2 CAPI branch Signed-off-by: Vince Prignano <vincepri@vmware.com>

view details

Hongkai Liu

commit sha c3620c2ee6d9397f7adde90e8628893126d3ec81

Add job_namespace label into prow job metrics

view details

Ernest Wong

commit sha 7371a1e574c7bacd4f7f49efc37c93e95bd46ca5

Add azurefile-csi-driver-config

view details

Ernest Wong

commit sha 95391a3a39516656e50797ca1fb66516d21cc1f9

Add feiskyer in OWNERS

view details

Ernest Wong

commit sha b5574913825f0f3cc724fe87dc2e1d5db5dbc3c6

Add an option to test Azure Disk CSI Driver

view details

Travis Clarke

commit sha d0f6859f0499f198ca978a8a806f82daf69e947f

Introduce terraform for creating "maintained" clusters

view details

Oleg Loewen

commit sha eb6325fadd820f631582b83b232d98e0bc029df9

add gardener testgrid tabs for k8s v1.16

view details

Peter Rifel

commit sha c3aa4e89e06b719ea845ec3d7f83ac86a4e726ef

Update AMIs used by Kops periodic jobs

view details

Petr Muller

commit sha ace1e2cbb7758dbfe3d64b9db276880c9e848cdd

Revert "branchprotector: explicit protect:false should result in bp removal"

view details

Cole Wagner

commit sha de798b2a6e6a693acbc5e976bb0c1d15c8ee5a10

Make pj-on-kind.sh use container images for mkpj and mkpod.

view details

Travis Clarke

commit sha 733fff6a261425e5f77913f80b6fde00f851c53d

Add docs for obtaining Slack access token

view details

prameshj

commit sha 5813eed2442b44c103c2a35874e2e7ba88f3b371

Include nodelocaldns scale tests in CI

view details

Kubernetes Prow Robot

commit sha b778d6be921dc495139c9a4d3dabf753551c048f

Merge pull request #14583 from clarketm/slack-reporter Add docs for obtaining Slack access token

view details

Clayton Coleman

commit sha 8682d3837044f247bb3f733686185c441f23d241

testgrid: Update OpenShift informing jobs Add a number of informing jobs to the configuration.

view details

Cole Wagner

commit sha d254983e36abe6582bbdaca2c0b5b824e5e4f5f1

Add a container image promoter manifest and job for Prow.

view details

Christoph Blecker

commit sha f6e04172672fac04aa2f0d2e5ddd1cbf95bdd74c

Add goose plugin

view details

Erick Fejta

commit sha ef5eca27fd8443a02ed649e5925a6989f6483605

Buildifier format .bzl files

view details

Jakub Pierewoj

commit sha 7a96a7c5d717734895203510b75cbeb80ed24434

Remove sig-scalability separate storage test jobs Storage tests are being ran in a single suite. Perfdash already supports viewing results from suite runs, so these separate jobs can be safely removed.

view details

push time in 22 days

Pull request review commentkubernetes/test-infra

Adding support for handling events from Issues

 type githubClient interface { 	CreateProjectCard(columnID int, projectCard github.ProjectCard) (*github.ProjectCard, error) } -func handlePR(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, pe github.PullRequestEvent) error {-	// Only respond to label add or issue/PR open events-	if pe.Action != github.PullRequestActionOpened &&-		pe.Action != github.PullRequestActionReopened &&-		pe.Action != github.PullRequestActionLabeled {+type eventData struct {+	id     int+	number int+	isPR   bool+	org    string+	repo   string+	state  string+	labels []github.Label+	remove bool+}++type DuplicateCard struct {+	projectName string+	issueURL    string+}++func (m *DuplicateCard) Error() string {+	return fmt.Sprintf(issueAlreadyInProject, m.issueURL, m.projectName)+}++func handleIssueRequest(pc plugins.Agent, ie github.IssueEvent) error {

Thanks for the review. I did misunderstood this, I agree now that Issue event is generated for all PR's and I changed the code to just handle Issue event. Please review.

brahmaroutu

comment created time in 22 days

Pull request review commentkubernetes/test-infra

Adding support for handling events from Issues

 type githubClient interface { 	CreateProjectCard(columnID int, projectCard github.ProjectCard) (*github.ProjectCard, error) } -func handlePR(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, pe github.PullRequestEvent) error {-	// Only respond to label add or issue/PR open events-	if pe.Action != github.PullRequestActionOpened &&-		pe.Action != github.PullRequestActionReopened &&-		pe.Action != github.PullRequestActionLabeled {+type eventData struct {+	id     int+	number int+	isPR   bool+	org    string+	repo   string+	state  string+	labels []github.Label+	remove bool+}++type DuplicateCard struct {+	projectName string+	issueURL    string+}++func (m *DuplicateCard) Error() string {+	return fmt.Sprintf(issueAlreadyInProject, m.issueURL, m.projectName)+}++func handleIssueRequest(pc plugins.Agent, ie github.IssueEvent) error {+	if !handleIssueActions[ie.Action] {+		return nil+	}+	eventData := eventData{ie.Issue.ID, ie.Issue.Number, false, ie.Repo.Owner.Login, ie.Repo.Name, ie.Issue.State, ie.Issue.Labels, false}+	if ie.Action == github.IssueActionUnlabeled {+		eventData.remove = true+	}++	return handle(pc.GitHubClient, pc.PluginConfig.ProjectManager, pc.Logger, eventData)+}++func handlePullRequest(pc plugins.Agent, pe github.PullRequestEvent) error {+	if !handlePRActions[pe.Action] { 		return nil 	}+	eventData := eventData{pe.PullRequest.ID, pe.Number, true, pe.Repo.Owner.Login, pe.Repo.Name, pe.PullRequest.State, []github.Label{}, false}+	if pe.Action == github.PullRequestActionUnlabeled {+		eventData.remove = true+	}++	return handle(pc.GitHubClient, pc.PluginConfig.ProjectManager, pc.Logger, eventData)+}++func handle(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, e eventData) error {+ 	// Get any ManagedProjects that match this PR-	matchedColumnIDs := getMatchingColumnIDs(gc, projectManager.OrgRepos, pe, log)+	matchedColumnIDs := getMatchingColumnIDs(gc, projectManager.OrgRepos, e, log)  	// For each ManagedColumn that matches this PR, add this PR to that Project Column 	// All the matchedColumnID are valid column ids and the checked to see if the project card 	// we are adding is not already part of the project and thus avoiding duplication. 	for _, matchedColumnID := range matchedColumnIDs {-		err := addPRToColumn(gc, matchedColumnID, pe)+		err := addPRToColumn(gc, matchedColumnID, e) 		if err != nil { 			log.WithError(err).WithFields(logrus.Fields{-				"pullRequestNumber": pe.Number,-				"matchedColumnID":   matchedColumnID,+				"issueNumber":     e.number,

Fixed.

brahmaroutu

comment created time in 22 days

Pull request review commentkubernetes/test-infra

Adding support for handling events from Issues

 type githubClient interface { 	CreateProjectCard(columnID int, projectCard github.ProjectCard) (*github.ProjectCard, error) } -func handlePR(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, pe github.PullRequestEvent) error {-	// Only respond to label add or issue/PR open events-	if pe.Action != github.PullRequestActionOpened &&-		pe.Action != github.PullRequestActionReopened &&-		pe.Action != github.PullRequestActionLabeled {+type eventData struct {+	id     int+	number int+	isPR   bool+	org    string+	repo   string+	state  string+	labels []github.Label+	remove bool+}++type DuplicateCard struct {+	projectName string+	issueURL    string+}++func (m *DuplicateCard) Error() string {+	return fmt.Sprintf(issueAlreadyInProject, m.issueURL, m.projectName)+}++func handleIssueRequest(pc plugins.Agent, ie github.IssueEvent) error {+	if !handleIssueActions[ie.Action] {+		return nil+	}+	eventData := eventData{ie.Issue.ID, ie.Issue.Number, false, ie.Repo.Owner.Login, ie.Repo.Name, ie.Issue.State, ie.Issue.Labels, false}+	if ie.Action == github.IssueActionUnlabeled {+		eventData.remove = true

Fixed.

brahmaroutu

comment created time in 22 days

Pull request review commentkubernetes/test-infra

Adding support for handling events from Issues

 type githubClient interface { 	CreateProjectCard(columnID int, projectCard github.ProjectCard) (*github.ProjectCard, error) } -func handlePR(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, pe github.PullRequestEvent) error {-	// Only respond to label add or issue/PR open events-	if pe.Action != github.PullRequestActionOpened &&-		pe.Action != github.PullRequestActionReopened &&-		pe.Action != github.PullRequestActionLabeled {+type eventData struct {+	id     int+	number int+	isPR   bool+	org    string+	repo   string+	state  string+	labels []github.Label+	remove bool+}++type DuplicateCard struct {+	projectName string+	issueURL    string+}++func (m *DuplicateCard) Error() string {+	return fmt.Sprintf(issueAlreadyInProject, m.issueURL, m.projectName)+}++func handleIssueRequest(pc plugins.Agent, ie github.IssueEvent) error {+	if !handleIssueActions[ie.Action] {+		return nil+	}+	eventData := eventData{ie.Issue.ID, ie.Issue.Number, false, ie.Repo.Owner.Login, ie.Repo.Name, ie.Issue.State, ie.Issue.Labels, false}+	if ie.Action == github.IssueActionUnlabeled {+		eventData.remove = true+	}++	return handle(pc.GitHubClient, pc.PluginConfig.ProjectManager, pc.Logger, eventData)+}++func handlePullRequest(pc plugins.Agent, pe github.PullRequestEvent) error {+	if !handlePRActions[pe.Action] { 		return nil 	}+	eventData := eventData{pe.PullRequest.ID, pe.Number, true, pe.Repo.Owner.Login, pe.Repo.Name, pe.PullRequest.State, []github.Label{}, false}

Fixed.

brahmaroutu

comment created time in 22 days

push eventbrahmaroutu/test-infra

Roman Mohr

commit sha b60c88ea6db76f1c6820491259543b96fe3eadc6

Make bazel cache config in bootstrap image configurable

view details

Daniel Bastos

commit sha 052ebc3cd59a67902980d5fed9ccbf192e74221e

Configure prow job for multi-tenancy/hnc

view details

Ace Eldeib

commit sha 4a718b8222bd0c605587d6dda30887475273a355

add: kubebuilder to prow

view details

Jakub Pierewoj

commit sha 72f3e133e69643e8926ea793b51dd1aafdeecc30

Use main cluster kubeconfig in kubemark dump-logs Logexporter pods in kubemark should be created in the main (non-kubemark) cluster. To achieve this, we set kubeconfig to target main cluster for the dump-logs. After log dumping it finished, kubeconfig will target kubecmark cluster again. Testing: * ran kubetest locally, verified that logexporter pods are deployed to the main cluster

view details

Petr Muller

commit sha 0d8f318a48c3d2edeae11ce4fdda8826777c82a6

peribolos: Dump config data for repositories in the org

view details

Petr Muller

commit sha 4ed668c8d048987a366d278098418bc6b4d9ad64

github: Add CreateRepo method

view details

Benjamin Elder

commit sha 22ed584c85d85647da540560bcb2363f8d538656

fix greenhouse runbook url formatting

view details

Nguyen Hai Truong

commit sha aed10eb4c7e9189dde1d31c8860240a80bd623d3

Adding label for Vietnamese language Adding a label for the Vietnamese translation of our docs. Ref: kubernetes/website/#16965 Signed-off-by: Nguyen Hai Truong <truongnh@vn.fujitsu.com>

view details

Petr Muller

commit sha 0be6cd94ceebe0060b75f2734d07d009eeec299c

peribolos: basic repo creation functionality

view details

Travis Clarke

commit sha eaa3723d6277c072d7e5cb6ab0fcb4bd2374a441

Use local, custom "pip.bzl" for "pip_import"

view details

Travis Clarke

commit sha dbb345d5d1d65d8d3a489f0863ac04510d0542a5

Start linting "py3" code w/ pylint

view details

Travis Clarke

commit sha 88294634d646346513296253295ceff1f94df7b8

Lint "experiment"

view details

Travis Clarke

commit sha 27b749eb3857e29b86426226c09d2a8cc37bce10

Lint "kettle"

view details

Benjamin Elder

commit sha f1eb2c3e39333e56bd78dc7a196d6add57db4d02

switch kind to krte

view details

John Howard

commit sha 737d3ae50174c5988d3994b1c69a9948c23149c6

Update Istio testgrid

view details

Yu Liao

commit sha 00df29b3b2cecb409ee30c66c594ff3ada8355fc

switched to use release for build

view details

Kubernetes Prow Robot

commit sha fb021157972b35722e3721fa20e81c8b73376cfb

Merge pull request #14818 from BenTheElder/BenTheElder-patch-1 fix greenhouse runbook url formatting

view details

Kubernetes Prow Robot

commit sha 6503d61d1946d707884ff654dc9833353e5ebbf3

Merge pull request #14837 from BenTheElder/use-krte switch kind to krte

view details

Travis Clarke

commit sha 2d5e55fc4920b6d84c2542bfc8c50d2a799b19e0

Lint "triage"

view details

Travis Clarke

commit sha 571dc15579cf9f609d1e5ee436608c8fe5265181

Lint "metrics"

view details

push time in 22 days

create barnchbrahmaroutu/enhancements

branch : csi-conformance

created branch time in a month

push eventbrahmaroutu/test-infra

Pavithra Ramesh

commit sha 7bb7d078b735c9a9f1e0dec6e8f6b28a230820d7

re-enable stubdomains test with node-cache fix indent

view details

Vince Prignano

commit sha 61489888e1fbaa590285a4660002355df9cbcfe9

Build release-0.2 CAPI branch Signed-off-by: Vince Prignano <vincepri@vmware.com>

view details

Hongkai Liu

commit sha c3620c2ee6d9397f7adde90e8628893126d3ec81

Add job_namespace label into prow job metrics

view details

Ernest Wong

commit sha 7371a1e574c7bacd4f7f49efc37c93e95bd46ca5

Add azurefile-csi-driver-config

view details

Ernest Wong

commit sha 95391a3a39516656e50797ca1fb66516d21cc1f9

Add feiskyer in OWNERS

view details

Ernest Wong

commit sha b5574913825f0f3cc724fe87dc2e1d5db5dbc3c6

Add an option to test Azure Disk CSI Driver

view details

Travis Clarke

commit sha d0f6859f0499f198ca978a8a806f82daf69e947f

Introduce terraform for creating "maintained" clusters

view details

Oleg Loewen

commit sha eb6325fadd820f631582b83b232d98e0bc029df9

add gardener testgrid tabs for k8s v1.16

view details

Peter Rifel

commit sha c3aa4e89e06b719ea845ec3d7f83ac86a4e726ef

Update AMIs used by Kops periodic jobs

view details

Petr Muller

commit sha ace1e2cbb7758dbfe3d64b9db276880c9e848cdd

Revert "branchprotector: explicit protect:false should result in bp removal"

view details

Cole Wagner

commit sha de798b2a6e6a693acbc5e976bb0c1d15c8ee5a10

Make pj-on-kind.sh use container images for mkpj and mkpod.

view details

Travis Clarke

commit sha 733fff6a261425e5f77913f80b6fde00f851c53d

Add docs for obtaining Slack access token

view details

prameshj

commit sha 5813eed2442b44c103c2a35874e2e7ba88f3b371

Include nodelocaldns scale tests in CI

view details

Kubernetes Prow Robot

commit sha b778d6be921dc495139c9a4d3dabf753551c048f

Merge pull request #14583 from clarketm/slack-reporter Add docs for obtaining Slack access token

view details

Clayton Coleman

commit sha 8682d3837044f247bb3f733686185c441f23d241

testgrid: Update OpenShift informing jobs Add a number of informing jobs to the configuration.

view details

Cole Wagner

commit sha d254983e36abe6582bbdaca2c0b5b824e5e4f5f1

Add a container image promoter manifest and job for Prow.

view details

Christoph Blecker

commit sha f6e04172672fac04aa2f0d2e5ddd1cbf95bdd74c

Add goose plugin

view details

Erick Fejta

commit sha ef5eca27fd8443a02ed649e5925a6989f6483605

Buildifier format .bzl files

view details

Jakub Pierewoj

commit sha 7a96a7c5d717734895203510b75cbeb80ed24434

Remove sig-scalability separate storage test jobs Storage tests are being ran in a single suite. Perfdash already supports viewing results from suite runs, so these separate jobs can be safely removed.

view details

Erick Fejta

commit sha b02104e4a7706b982891c759f3b3d86ce15ca59e

Delete some unused repos

view details

push time in a month

push eventbrahmaroutu/enhancements

Michelle Au

commit sha c4b378ed48fdfa6f78d6a07a2fff9393b9f65c68

Add kep boilerplate and missing sections

view details

Patrick Lang

commit sha ef67fcb7f70788249214506c54b7e82624378ff5

Adding note on conformance

view details

andrewsykim

commit sha 6449e3bed88af212b375506ad7eeed85f500bf53

keps/sig-cloud-provider: clean up KEP-0002 and update KEP-0013

view details

Andrew Kim

commit sha def972536b2a357bf640cd8f88c23d3cc8924611

rename KEPs with draft dates instead of KEP numbers

view details

Deep Debroy

commit sha ab52ebb45b9ae28ecd768f0a4deb4ab2b49729ff

Remove schema for credspec and fix NetBIOS name in examples Signed-off-by: Deep Debroy <ddebroy@docker.com>

view details

Deep Debroy

commit sha dec1a9a74594a150e9ac64a91941728231f4e6e1

Update schema for credspec to type object Signed-off-by: Deep Debroy <ddebroy@docker.com>

view details

Kubernetes Prow Robot

commit sha bbcb2a9b7c8439320c46f1cfa9741752943abea9

Merge pull request #715 from marpaia/graduation-is-a-kep Add stage graduation to the list of issues that require a KEP

view details

Stephen Augustus

commit sha 233a03cc3873bcc250258b4db85eddcb6b1fe85a

Delineate owners of KEP reviews and KEP process ownership Signed-off-by: Stephen Augustus <saugustus@vmware.com>

view details

Michael Michael

commit sha 79ce009d7f88ef0415e5d6b6f85e9d2e4c582a2d

Update 20190103-windows-node-support.md

view details

Michael Michael

commit sha 5f739430b11c50f4da64f40300e74d81aa5b3792

Update 20190103-windows-node-support.md

view details

fabriziopandini

commit sha 05ab36335b1b673a85bc3d9bfe18d5bf4ec46519

second round of comments

view details

fabriziopandini

commit sha 50909d3c931136c987ac626ce62fc78250ec7b7e

nit

view details

Kubernetes Prow Robot

commit sha 2602dd6702b8717481b6d2e7135b8c4c344ba9d5

Merge pull request #722 from ddebroy/gmsa3 Add feedback in KEP for GMSA support in Kubernetes

view details

Michael Michael

commit sha eedb967815e768b1274903f1fb18fbd5d6a2f518

Update 20190103-windows-node-support.md

view details

Michael Michael

commit sha d940cb52b6c1db129686f475d31953e17b75ca0a

Update 20190103-windows-node-support.md

view details

Michael Michael

commit sha 0a5d6947c4d7069341b06e92e761e2ea9e32555e

Update 20190103-windows-node-support.md

view details

Deep Debroy

commit sha 2e8e8d2623bf1ff6ef957966b8be036e7c7e38cf

Fix header formatting Signed-off-by: Deep Debroy <ddebroy@docker.com>

view details

Leah Hanson

commit sha ff1a31e5155cb61041f82951c0a0c377ec31ae94

Update keps/sig-windows/20190103-windows-node-support.md Co-Authored-By: michmike <michmike@users.noreply.github.com>

view details

Kubernetes Prow Robot

commit sha 9ceceaa9ec1e3f17ec3fe46c3469acead45c2d2c

Merge pull request #731 from ddebroy/formatting1 Fix header formatting for GMSA KEP

view details

Michael Michael

commit sha b13160c726ddd423cb484399a3604012cce2f035

Update 20190103-windows-node-support.md

view details

push time in a month

push eventbrahmaroutu/kubernetes

Kubernetes Prow Robot

commit sha a9e5c4d6e415171c7568d7dbdd0dfecd2b5137ad

Merge pull request #81968 from mtaufen/node-csr-hash derive node CSR hashes from public keys

view details

Kubernetes Prow Robot

commit sha c80d2c228353e78c9b85bb43bddbf5f2917be4ba

Merge pull request #82019 from liggitt/admission-discovery-e2e Add discovery docs webhook e2e test

view details

Haowei Cai

commit sha c81d69952c157922f2a35c6e02ce03ec3782e95e

webhook-e2e: add denying CR update test case, check CR patch and mutation results

view details

Joe Betz

commit sha 68bafe4404c7c877055f104e55af0d9a8b169cf1

Promote admission webhook e2e tests to conformance

view details

Han Kang

commit sha aa1b2d6d35c92a31be17357fc66cfc1eca8a67e0

add /livez as a liveness endpoint for kube-apiserver go fmt make func private refactor config_test Two primary refactorings: 1. config test checkPath method is now each a distinct test run (which makes it easier to see what is actually failing) 2. TestNewWithDelegate's root path check now parses the json output and does a comparison against a list of expected paths (no more whitespace and ordering issues when updating this test, yay). go fmt modify and simplify existing integration test for readyz/livez simplify integration test set default rbac policy rules for livez rename a few functions and the entrypoint command line argument (and etcetera) simplify interface for installing readyz and livez and make auto-register completion a bootstrapped check untangle some of the nested functions, restructure the code

view details

Haowei Cai

commit sha 714dced0d1c7fbb703fa55c39a071a8a97db9176

add webhook rejection metrics

view details

Haowei Cai

commit sha 71d7477c2187c0f956b90b7b55e8beee449229a2

test

view details

Haowei Cai

commit sha 620f5f2c587971be50cb27bb2a2d35209b3dc058

wire up the webhook rejection metrics in webhook handlers

view details

Kubernetes Prow Robot

commit sha efaacf786a3d04a9ee3fdc167fc2162221d95dfd

Merge pull request #73405 from wozniakjan/namespace_status_conditions Add namespace status conditions

view details

Kubernetes Prow Robot

commit sha 8a4edd938187ab0b4f384954fc29a4b2cee2a4f9

Merge pull request #79614 from verb/debug-api-docs Improve API documentation for ephemeral containers

view details

Kubernetes Prow Robot

commit sha e0e7fc2201662243a04b8ba6e9bb8f527c14f46c

Merge pull request #80027 from ramineni/staging-openstack-provider Move Openstack provider to staging

view details

Kubernetes Prow Robot

commit sha 3e7e12dac83c90cc9fee1c50cb9d4460a9e14d59

Merge pull request #80485 from khenidak/lb-dualstack-support Azure support for dualstack LB services

view details

Kubernetes Prow Robot

commit sha 4495d09282265964ae217ab9976c4c4ff5945b7b

Merge pull request #81430 from robscott/endpointslice-proxy Adding EndpointSlice support for kube-proxy ipvs and iptables proxiers

view details

Jing Xu

commit sha 3b7e696c2f5e71f0cc717342d099bf4e223f94fd

Fix Windows disk usage metric measurement This PR will fix issue #81088. The current fs_windows utility reports the whole file system usage instead of specific file path. This PR fix this and walk the dir tree under the file path and collect the disk usage. Change-Id: I502ccf0af4bd07be69b61be043be616660499e4d

view details

Matthias Bertschy

commit sha e4d26f845e1e11ec75ce3a395ff0fc691347f3cf

startupProbe: API changes

view details

Matthias Bertschy

commit sha 323f99ea8c4faf44090b7554fbfaad2d25120b65

startupProbe: Kubelet changes

view details

Matthias Bertschy

commit sha 1a08ea5984b695f55bbd555605d6191d1025fa8e

startupProbe: Test changes

view details

Matthias Bertschy

commit sha a042a4b0ee3e0fc27b0a4711202d66743af246e1

startupProbe: make update

view details

Pavithra Ramesh

commit sha c09c8abc3c8f76bb06688fd6646e0692f7d0c460

Added support for ILB Global Access Uses beta api when global access is enabled and ga api otherwise Deprecate the older load-balancer-type annotation Unit test to verify global access Also added tests to verify new and old load-balancer-type annotations Addressed review comments, staticcheck fixes fixed typo

view details

Rob Scott

commit sha d618452a979e49a94c517793c9cac0208d477768

Adding EndpointsAdapter for apiserver EndpointSlice support

view details

push time in a month

push eventbrahmaroutu/test-infra

maryyliu

commit sha ec17a07364f9e55fa6656bee917f88c6eb74b0ef

Update README.md clustered failures info removed the clustered failures bullet point from video info

view details

Alexey Volkov

commit sha bb1052799191fb59e6999adbf3123f04285a1882

Limit KF Pipelines postsubmit tests to the master branch

view details

Travis Clarke

commit sha 8dc8dcc48bf5c5e73196ad647693ea4e1aa6061e

frontend: deck config snippet implementation

view details

Travis Clarke

commit sha 6699060850f30f0b11f3069701eb86c6676285ed

backend: deck config snippet implementation

view details

Travis Clarke

commit sha 6c573ac3583cd8a79a1442afc706c6ee28f77159

deps: deck config snippet implementation

view details

Stephen Augustus

commit sha 7feee39850387e4ed9c0b1d8f54ea4d28f204532

capi: Add image pushing job for capz Signed-off-by: Stephen Augustus <saugustus@vmware.com>

view details

Ernest Wong

commit sha ae016956b263e4aaa9acf9722954646cf20ca778

Initial commit

view details

Ernest Wong

commit sha 61340b313c34e6527fca22857c66986652540b47

Add env vars to E2E job

view details

Ernest Wong

commit sha 73a94bb6e200dabb4c0a2b45165efa82434084ac

Fix azure.go

view details

Ernest Wong

commit sha b69121a56f7b782d115d368ce36272e9bd826260

Enable Docker in Docker

view details

Ernest Wong

commit sha e7fc5295fa49d74e574a81fe2d0baf19bf1d2869

Minor cleanup

view details

Ernest Wong

commit sha f60cafd1ead9ae9f1da9a587ab06eafb8f900131

Move job configuration to a separate PR

view details

Ernest Wong

commit sha 7484d81c8b3d43bc2a8d1b53776cd9912473ab68

Fix typo

view details

Cole Wagner

commit sha 8f2eeee2db873ca0dc22d8c6cca959d60cc72a68

Revert "Revert "Make elide_skipped_contexts default to true and add deprecation warning."" This reverts commit 65011b62bb018afd84abe223180c71388503f511.

view details

Mateusz Szostok

commit sha 3f3c82fb1256d40025219617740c48ca9b171835

Add Service Catalog pipeline for checking migration scenario

view details

Cole Wagner

commit sha 291f2cc9a9eaf26f4fdd592237d5409877c2e914

Make autobumper ignore existing PRs that have `lgtm` and `approved` labels.

view details

Cole Wagner

commit sha 62948d73cd6a10c8245799263079f5c9edeb7177

Fix TriggerFor() defaulting and add unit tests.

view details

Lantao Liu

commit sha 98aa3ae1bf9cecd37f86396368d971150fb8acc1

Add missing release/1.3 verify test for containerd/cri. Signed-off-by: Lantao Liu <lantaol@google.com>

view details

Kubernetes Prow Robot

commit sha 3a266d53699339ef4b94a3dce8493bd5b51b8533

Merge pull request #14488 from Random-Liu/add-release-1.3-cri-verify Add missing release/1.3 verify test for containerd/cri.

view details

Russell Bryant

commit sha e44ec7a2fc3e68c930ab01f695bdf499e3b5c3cc

prow/cluster/starter: plank needs to patch prowjobs. I just stood up prow using the "tackle" utility. The plank Role created was not sufficient. The "echo-test" job was not running. This was because plank was emitting errors in its log about not being able to patch the prowjob. Manually adding this to the Role fixed the problem for me.

view details

push time in a month

push eventbrahmaroutu/test-infra

maryyliu

commit sha ec17a07364f9e55fa6656bee917f88c6eb74b0ef

Update README.md clustered failures info removed the clustered failures bullet point from video info

view details

Alexey Volkov

commit sha bb1052799191fb59e6999adbf3123f04285a1882

Limit KF Pipelines postsubmit tests to the master branch

view details

Travis Clarke

commit sha 8dc8dcc48bf5c5e73196ad647693ea4e1aa6061e

frontend: deck config snippet implementation

view details

Travis Clarke

commit sha 6699060850f30f0b11f3069701eb86c6676285ed

backend: deck config snippet implementation

view details

Travis Clarke

commit sha 6c573ac3583cd8a79a1442afc706c6ee28f77159

deps: deck config snippet implementation

view details

Stephen Augustus

commit sha 7feee39850387e4ed9c0b1d8f54ea4d28f204532

capi: Add image pushing job for capz Signed-off-by: Stephen Augustus <saugustus@vmware.com>

view details

Ernest Wong

commit sha ae016956b263e4aaa9acf9722954646cf20ca778

Initial commit

view details

Ernest Wong

commit sha 61340b313c34e6527fca22857c66986652540b47

Add env vars to E2E job

view details

Ernest Wong

commit sha 73a94bb6e200dabb4c0a2b45165efa82434084ac

Fix azure.go

view details

Ernest Wong

commit sha b69121a56f7b782d115d368ce36272e9bd826260

Enable Docker in Docker

view details

Ernest Wong

commit sha e7fc5295fa49d74e574a81fe2d0baf19bf1d2869

Minor cleanup

view details

Ernest Wong

commit sha f60cafd1ead9ae9f1da9a587ab06eafb8f900131

Move job configuration to a separate PR

view details

Ernest Wong

commit sha 7484d81c8b3d43bc2a8d1b53776cd9912473ab68

Fix typo

view details

Cole Wagner

commit sha 8f2eeee2db873ca0dc22d8c6cca959d60cc72a68

Revert "Revert "Make elide_skipped_contexts default to true and add deprecation warning."" This reverts commit 65011b62bb018afd84abe223180c71388503f511.

view details

Mateusz Szostok

commit sha 3f3c82fb1256d40025219617740c48ca9b171835

Add Service Catalog pipeline for checking migration scenario

view details

Cole Wagner

commit sha 291f2cc9a9eaf26f4fdd592237d5409877c2e914

Make autobumper ignore existing PRs that have `lgtm` and `approved` labels.

view details

Cole Wagner

commit sha 62948d73cd6a10c8245799263079f5c9edeb7177

Fix TriggerFor() defaulting and add unit tests.

view details

Lantao Liu

commit sha 98aa3ae1bf9cecd37f86396368d971150fb8acc1

Add missing release/1.3 verify test for containerd/cri. Signed-off-by: Lantao Liu <lantaol@google.com>

view details

Kubernetes Prow Robot

commit sha 3a266d53699339ef4b94a3dce8493bd5b51b8533

Merge pull request #14488 from Random-Liu/add-release-1.3-cri-verify Add missing release/1.3 verify test for containerd/cri.

view details

Russell Bryant

commit sha e44ec7a2fc3e68c930ab01f695bdf499e3b5c3cc

prow/cluster/starter: plank needs to patch prowjobs. I just stood up prow using the "tackle" utility. The plank Role created was not sufficient. The "echo-test" job was not running. This was because plank was emitting errors in its log about not being able to patch the prowjob. Manually adding this to the Role fixed the problem for me.

view details

push time in a month

pull request commentkubernetes/test-infra

Adding support for handling events from Issues

/assign @cjwagner /assign @stevekuznetsov

brahmaroutu

comment created time in a month

pull request commentkubernetes/test-infra

Adding support for handling events from Issues

@stevekuznetsov @cjwagner Please approve and review this PR ASAP.

brahmaroutu

comment created time in a month

PR opened kubernetes/test-infra

Adding support for handling events from Issues

This PR addresses automatic handling of Issue events to add Issues to respective project boards when configured. This PR extends the #12326 for Issues as the original PR only addresses Pull Requests.

area/conformance sig/testing

+227 -212

0 comment

2 changed files

pr created time in a month

push eventbrahmaroutu/test-infra

Srini Brahmaroutu

commit sha ae581acd5cc3a4875760d90adf444bf4b4b1d5a3

Adding support for handling events from Issues

view details

push time in a month

push eventbrahmaroutu/test-infra

Srini Brahmaroutu

commit sha 8b6fdd5e68fdf6647cd3ba068a6fa43ed7262885

Adding support for handling events from Issues

view details

push time in a month

create barnchbrahmaroutu/test-infra

branch : project_automation_issues

created branch time in a month

push eventbrahmaroutu/test-infra

Sen Lu

commit sha b4862428c3eea95ebef48ce85a98a2dfbbf68fe5

Use patch instead of replace for prowjobs in plank

view details

Andy Goldstein

commit sha 29aac0003ea43d24a381f2857eb5abeb36adb2cd

Enable GCB for CABPK Signed-off-by: Andy Goldstein <goldsteina@vmware.com>

view details

Andrew Block

commit sha fb613dd7ae48cb245f7bccab96d6fa70681a0d06

Changed GitHub team permission struct

view details

Erick Fejta

commit sha 8d4c488c7b72fdadecdcad56c94585d4ddcf62af

Add bazel, service account presets for pull-repo-infra-tests

view details

Matt Matejczyk

commit sha c9093880f09b4753fc54efa31f638b220ffe96be

Temporarily disable jobs in GCE 5K performance See https://github.com/kubernetes/kubernetes/issues/82818#issuecomment-534003465

view details

Kubernetes Prow Robot

commit sha 5514c863b0dbcdb2cebb8d8c711c70d5117e3494

Merge pull request #14438 from mm4tt/disable_jobs_5k Temporarily disable jobs in GCE 5K performance

view details

Adelina Tuvenie

commit sha afb9ece3ed33cc00407e7fede36c0479ae389185

Update sig-windows-config.yaml Use versioned kubekins images for release branches.

view details

Kubernetes Prow Robot

commit sha 2fbac1a1d6d6383de38d53d25a217e466a65652b

Merge pull request #14441 from adelina-t/patch-33 Update sig-windows-config.yaml

view details

Kubernetes Prow Robot

commit sha 3b9f18e5438261df5619a0b84c419375436bb8ac

Merge pull request #14413 from ncdc/cabpk-gcb Enable GCB for CABPK

view details

Davanum Srinivas

commit sha c61145ed21ab396d562d8a0b36cb49e1e9d29dd0

add conformance test for gcp provider - pull-cluster-api-provider-gcp-make-conformance Change-Id: I41bb65ba82574ff08dd84f97c15d89fe4697b45d

view details

Kubernetes Prow Robot

commit sha 61e2ea0d380f6318a6e71db1d3c0415d1b4f672f

Merge pull request #14442 from dims/add-pull-cluster-api-provider-gcp-make-conformance add conformance test for gcp provider - pull-cluster-api-provider-gcp-make-conformance

view details

Kubernetes Prow Robot

commit sha 0674bf7a88536cdff7dea09bd20fdf87a6042c0f

Merge pull request #14436 from sabre1041/permission-omitempty Changed GitHub team permission struct

view details

Nikhita Raghunath

commit sha 36a7bac995ddd1dd4bcb0095cb4d50a3175c5a53

Remove lgtm_acts_as_approve option for ip-masq-agent

view details

Kubernetes Prow Robot

commit sha 8aaad4b5b8255387707ca2e70cfd02815ce52617

Merge pull request #14439 from nikhita/ip-masq-agent Remove lgtm_acts_as_approve option for ip-masq-agent

view details

Sen Lu

commit sha 1b694b9ddd548d24e0966679bf96d7ccd8989396

add more crier logs for debugging

view details

Kubernetes Prow Robot

commit sha 8cc13001c254cef1d88b13f5f9d5d1eaf05f84d0

Merge pull request #14444 from krzyzacy/more-logs add more crier logs for debugging

view details

Kubernetes Prow Robot

commit sha 6ed529434aa2355bc1c25be3f480cdb3b06155b6

Merge pull request #14437 from fejta/fancy Add bazel, service account presets for pull-repo-infra-tests

view details

Cole Wagner

commit sha 7090938084d2017bcb2d76fd7662789486dfb672

Make elide_skipped_contexts default to true and add deprecation warning.

view details

Kubernetes Prow Robot

commit sha f7387634f694d57b94fc07d778cfa42ee1c0ee03

Merge pull request #14447 from cjwagner/elide-elide_skipped_contexts Make elide_skipped_contexts default to true and add deprecation warning.

view details

Sen Lu

commit sha 898344e935eac021225c9e730890fbb160e53f4e

We need to copy the controller into the stack

view details

push time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

 func validateRequireMatchingLabel(rs []RequireMatchingLabel) error { 	return nil } +func validateProjectManager(pm ProjectManager) error {++	projectConfig := pm+	if len(projectConfig.OrgRepos) == 0 {+		return fmt.Errorf("The project-manager plugin configuration is empty")+	}++	for orgRepoName, managedOrgRepo := range pm.OrgRepos {+		if len(managedOrgRepo.Projects) == 0 {+			return fmt.Errorf("Org/repo: %s, has no projects configured", orgRepoName)+		}+		var labelSets [][]string+		for projectName, managedProject := range managedOrgRepo.Projects {+			if len(managedProject.Columns) == 0 {+				return fmt.Errorf("Org/repo: %s, project %s, has no columns configured", orgRepoName, projectName)+			}+			for _, managedColumn := range managedProject.Columns {+				if managedColumn.ID == nil && (len(managedColumn.Name) == 0) {+					return fmt.Errorf("Org/repo: %s, project %s, column %v, has no name/id configured", orgRepoName, projectName, managedColumn)+				}+				if len(managedColumn.Labels) == 0 {+					return fmt.Errorf("Org/repo: %s, project %s, column %s, has no labels configured", orgRepoName, projectName, managedColumn.Name)+				}+				if len(managedColumn.Org) == 0 {+					return fmt.Errorf("Org/repo: %s, project %s, column %s, has no org configured", orgRepoName, projectName, managedColumn.Name)

I have changed the code in getMatchingColumnIDs to ignore the column if Org is empty. The label matching logic with return false if the labels are empty on the column.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"errors"+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++var (+	failedToAddProjectCard = "Failed to add project card for the issue"+	issueAlreadyInProject  = "The issue %d already assigned to the project %s"+)++/* Sample projectmanager configuration+org/repos:+      org1/repo1:+        projects:+          test_project:+            columns:+              - id: 0+                name: triage+                state: open+                org:  org1+                labels:+                  - area/conformance+                    area/sig-testing+              - name: triage+                state: open+                org:  org1+                labels:+                - area/conformance+                  area/sig-testing+*/++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := config.ProjectManager+	if len(projectConfig.OrgRepos) == 0 {+		pluginHelp := &pluginhelp.PluginHelp{+			Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+			Config:      map[string]string{},+		}+		return pluginHelp, nil+	}++	configString := map[string]string{}+	repoDescr := ""+	for orgRepoName, managedOrgRepo := range config.ProjectManager.OrgRepos {+		for projectName, managedProject := range managedOrgRepo.Projects {+			for _, managedColumn := range managedProject.Columns {+				repoDescr = fmt.Sprintf("%s\nPR/Issues org: %s, with matching labels: %s will be added to the project: %s\n", repoDescr, managedColumn.Org, managedColumn.Labels, projectName)

Fixed handler, added State into the printout.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

 func validateRequireMatchingLabel(rs []RequireMatchingLabel) error { 	return nil } +func validateProjectManager(pm ProjectManager) error {++	projectConfig := pm+	if len(projectConfig.OrgRepos) == 0 {+		return fmt.Errorf("The project-manager plugin configuration is empty")+	}++	for orgRepoName, managedOrgRepo := range pm.OrgRepos {+		if len(managedOrgRepo.Projects) == 0 {+			return fmt.Errorf("Org/repo: %s, has no projects configured", orgRepoName)+		}+		var labelSets [][]string+		for projectName, managedProject := range managedOrgRepo.Projects {+			if len(managedProject.Columns) == 0 {+				return fmt.Errorf("Org/repo: %s, project %s, has no columns configured", orgRepoName, projectName)+			}+			for _, managedColumn := range managedProject.Columns {+				if managedColumn.ID == nil && (len(managedColumn.Name) == 0) {+					return fmt.Errorf("Org/repo: %s, project %s, column %v, has no name/id configured", orgRepoName, projectName, managedColumn)+				}+				if len(managedColumn.Labels) == 0 {+					return fmt.Errorf("Org/repo: %s, project %s, column %s, has no labels configured", orgRepoName, projectName, managedColumn.Name)+				}+				if len(managedColumn.Org) == 0 {+					return fmt.Errorf("Org/repo: %s, project %s, column %s, has no org configured", orgRepoName, projectName, managedColumn.Name)+				}+				s_set := sets.NewString(managedColumn.Labels...)+				for _, labels := range labelSets {+					if s_set.Equal(sets.NewString(labels...)) {+						return fmt.Errorf("Org/repo: %s, project %s, column %s has same labels configured as another column", orgRepoName, projectName, managedColumn.Name)

Fixed

brahmaroutu

comment created time in 2 months

push eventbrahmaroutu/test-infra

Srini Brahmaroutu

commit sha 590e36d06c6195250a917121a59f1a7bb7f5c628

Provide automated way of updating repo project boards.

view details

push time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

 func validateRequireMatchingLabel(rs []RequireMatchingLabel) error { 	return nil } +func validateProjectManager(pm ProjectManager) error {++	projectConfig := pm+	if len(projectConfig.OrgRepos) == 0 {+		return fmt.Errorf("The project-manager plugin configuration is empty")

Fixed

brahmaroutu

comment created time in 2 months

push eventbrahmaroutu/test-infra

Srini Brahmaroutu

commit sha 211b3597d00ca0330080a4610a14c58a3444c622

Provide automated way of updating repo project boards.

view details

push time in 2 months

push eventbrahmaroutu/test-infra

Srini Brahmaroutu

commit sha 95343ba573a6cbadcb1a6f533f5382021caea7d9

Provide automated way of updating repo project boards.

view details

push time in 2 months

push eventbrahmaroutu/test-infra

Eric Wolinetz

commit sha b20050b8e61027c1232ee7de6612b41fc31f940c

Adding aws e2e proxy dashboards for 4.2

view details

Cole Wagner

commit sha 21b2f1e5936069e3dc00cfd1e34efc88947c2c06

Deck: Improve handler logging and fix plugin-agent related bugs.

view details

Yang Lu

commit sha 9cd8918927a327ea386ce3578930093b59a0b664

Automate windows jobs landing on SIG Release informing board

view details

Benjamin Elder

commit sha b04711de47aa0a6b65343b448ee0055dcf2d316b

remove kubernetes-security jobs

view details

Benjamin Elder

commit sha b47921393459e02d38ca3a56883894c50a039f61

disable trigger for kubernetes-security

view details

Kubernetes Prow Robot

commit sha 1d09d4b3843ceee6d50271f718d914507dd724ef

Merge pull request #14423 from BenTheElder/no-security remove k-s/k

view details

Yang Lu

commit sha 58fdbfca1e1f5729f42c0f959beffced77a1c675

remove -k8s in job name

view details

Kubernetes Prow Robot

commit sha c8941d19219269f025278ea98a229b7e9c1a4acb

Merge pull request #14329 from YangLu1031/master Automate windows jobs landing on SIG Release informing board

view details

Cole Wagner

commit sha 2d918b69dafa9d1cb92c4f7be4bad27687473c77

Make unknown plugin validation optional and avoid in Deck.

view details

Cole Wagner

commit sha a1f2768fb0bf0daba9b5681a61fc3debe28317fd

Move the plugin imports into their own package so checkconfig doesn't import hook.

view details

Travis Clarke

commit sha a7b784971705e3f6b10f2dd913953249ddd8217f

Simple script to create a build project and cluster

view details

Kubernetes Prow Robot

commit sha dcbb5efbeac364ee33142c5018a9efb1d545cd70

Merge pull request #14415 from cjwagner/plugin-validation Improvements to plugin config validation, plugin imports, and serving plugin config from Deck.

view details

Erick Fejta

commit sha 126dfd2eeba010ec340ba1b957bb009ecbd3885d

Add repo-infra prow presubmit

view details

Kubernetes Prow Robot

commit sha eb418193e0cfc589d2027334183aad7b97a55e5b

Merge pull request #14431 from fejta/repo Add repo-infra prow presubmit

view details

Erick Fejta

commit sha ccf44ba9634fc6a67c973ede2c389ba3c2dd8417

Make travis optional on repo-infra

view details

Kubernetes Prow Robot

commit sha 07c66a368da5c5490de6357aab8ea43690d20060

Merge pull request #14433 from fejta/fancy Make travis optional on repo-infra

view details

Kubernetes Prow Robot

commit sha 924053df52f642d89f3eaab26e622414f60ebd2f

Merge pull request #14377 from clarketm/create-build-project Simple script to create a build project and cluster

view details

Erick Fejta

commit sha 3f363ec8635e5c24a41f8fca956438b16927a279

Update to latest repo-infra commit

view details

Kubernetes Prow Robot

commit sha d4ea51ce1a31ff74456af110a4b2af3302f9eb31

Merge pull request #14434 from fejta/cm Update to latest repo-infra commit

view details

Kubernetes Prow Robot

commit sha 6db3ab49b7f75614cd90e882a3d48e296d68972f

Merge pull request #14414 from ewolinetz/aws_e2e_proxy_canary Adding aws e2e proxy dashboards for 4.2

view details

push time in 2 months

push eventbrahmaroutu/test-infra

Eric Wolinetz

commit sha b20050b8e61027c1232ee7de6612b41fc31f940c

Adding aws e2e proxy dashboards for 4.2

view details

Cole Wagner

commit sha 21b2f1e5936069e3dc00cfd1e34efc88947c2c06

Deck: Improve handler logging and fix plugin-agent related bugs.

view details

Yang Lu

commit sha 9cd8918927a327ea386ce3578930093b59a0b664

Automate windows jobs landing on SIG Release informing board

view details

Benjamin Elder

commit sha b04711de47aa0a6b65343b448ee0055dcf2d316b

remove kubernetes-security jobs

view details

Benjamin Elder

commit sha b47921393459e02d38ca3a56883894c50a039f61

disable trigger for kubernetes-security

view details

Kubernetes Prow Robot

commit sha 1d09d4b3843ceee6d50271f718d914507dd724ef

Merge pull request #14423 from BenTheElder/no-security remove k-s/k

view details

Yang Lu

commit sha 58fdbfca1e1f5729f42c0f959beffced77a1c675

remove -k8s in job name

view details

Kubernetes Prow Robot

commit sha c8941d19219269f025278ea98a229b7e9c1a4acb

Merge pull request #14329 from YangLu1031/master Automate windows jobs landing on SIG Release informing board

view details

Cole Wagner

commit sha 2d918b69dafa9d1cb92c4f7be4bad27687473c77

Make unknown plugin validation optional and avoid in Deck.

view details

Cole Wagner

commit sha a1f2768fb0bf0daba9b5681a61fc3debe28317fd

Move the plugin imports into their own package so checkconfig doesn't import hook.

view details

Travis Clarke

commit sha a7b784971705e3f6b10f2dd913953249ddd8217f

Simple script to create a build project and cluster

view details

Kubernetes Prow Robot

commit sha dcbb5efbeac364ee33142c5018a9efb1d545cd70

Merge pull request #14415 from cjwagner/plugin-validation Improvements to plugin config validation, plugin imports, and serving plugin config from Deck.

view details

Erick Fejta

commit sha 126dfd2eeba010ec340ba1b957bb009ecbd3885d

Add repo-infra prow presubmit

view details

Kubernetes Prow Robot

commit sha eb418193e0cfc589d2027334183aad7b97a55e5b

Merge pull request #14431 from fejta/repo Add repo-infra prow presubmit

view details

Erick Fejta

commit sha ccf44ba9634fc6a67c973ede2c389ba3c2dd8417

Make travis optional on repo-infra

view details

Kubernetes Prow Robot

commit sha 07c66a368da5c5490de6357aab8ea43690d20060

Merge pull request #14433 from fejta/fancy Make travis optional on repo-infra

view details

Kubernetes Prow Robot

commit sha 924053df52f642d89f3eaab26e622414f60ebd2f

Merge pull request #14377 from clarketm/create-build-project Simple script to create a build project and cluster

view details

Erick Fejta

commit sha 3f363ec8635e5c24a41f8fca956438b16927a279

Update to latest repo-infra commit

view details

Kubernetes Prow Robot

commit sha d4ea51ce1a31ff74456af110a4b2af3302f9eb31

Merge pull request #14434 from fejta/cm Update to latest repo-infra commit

view details

Kubernetes Prow Robot

commit sha 6db3ab49b7f75614cd90e882a3d48e296d68972f

Merge pull request #14414 from ewolinetz/aws_e2e_proxy_canary Adding aws e2e proxy dashboards for 4.2

view details

push time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

 func HasLabel(label string, issueLabels []Label) bool { 	return false } +// hasLabels checks if all labels are in the github.label set "issueLabels"+func HasLabels(labels []string, issueLabels []Label) bool {+	for _, label := range labels {+		if HasLabel(label, issueLabels) {+			return true

fixed, added a test case with more than one label to match.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"errors"+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++var (+	invalidOrgRepo         = "The provided org/repo format is invalid %s"+	mustHaveProject        = "Each org/repo should be configured with project and columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveColumns        = "Each project must be configured with columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveLabels         = "Each column should have associated labels to assign issues/PRs with the specified labels to that column"+	haveLabelConflicts     = "Same label cannot be specified under two columns in the same project, this causes conflict when adding the project card"+	needsColumnIDorName    = "Atleast ID or Name of the column must be supplied to identify the column"+	needsValidOrg          = "The issue or PR event owner's login should match the org specified here to make this configuration valid"+	issueAlreadyInProject  = "The issue %d already assigned to the project %s"+	failedToAddProjectCard = "Failed to add project card for the issue"+	emptyConfig            = "ProjectManager configuration is Empty, please use the following format to add project manager configuration"+	sampleConfig           = `+     	    org/repos: +              org1/repo1:+                projects:+                  test_project:+                    columns:+                      - id: 0+                        name: triage+                        state: open+                        org:  org1+                        labels: +                          - area/conformance+                            area/sig-testing+                      - name: triage+                        state: open+                        org:  org1+                        labels: +                        - area/conformance+                          area/sig-testing+         `+)++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func isDup(label string, labels []string) bool {+	for _, l := range labels {+		if strings.ToLower(l) == strings.ToLower(label) {+			return true+		}+	}+	return false+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := config.ProjectManager+	if len(projectConfig.OrgRepos) == 0 {+		pluginHelp := &pluginhelp.PluginHelp{+			Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+			Config:      map[string]string{"Config": sampleConfig},+		}+		return pluginHelp, nil+	}++	configString := map[string]string{}+	configErr := ""+	for orgRepoName, managedOrgRepo := range config.ProjectManager.OrgRepos {+		orgRepoParts := strings.Split(orgRepoName, "/")+		if len(orgRepoParts) != 2 && len(orgRepoParts) != 1 {+			configString[orgRepoName] = fmt.Sprintf(invalidOrgRepo, orgRepoName)

I moved validation here. Please review.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"errors"+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++var (+	invalidOrgRepo         = "The provided org/repo format is invalid %s"+	mustHaveProject        = "Each org/repo should be configured with project and columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveColumns        = "Each project must be configured with columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveLabels         = "Each column should have associated labels to assign issues/PRs with the specified labels to that column"+	haveLabelConflicts     = "Same label cannot be specified under two columns in the same project, this causes conflict when adding the project card"+	needsColumnIDorName    = "Atleast ID or Name of the column must be supplied to identify the column"+	needsValidOrg          = "The issue or PR event owner's login should match the org specified here to make this configuration valid"+	issueAlreadyInProject  = "The issue %d already assigned to the project %s"+	failedToAddProjectCard = "Failed to add project card for the issue"+	emptyConfig            = "ProjectManager configuration is Empty, please use the following format to add project manager configuration"+	sampleConfig           = `+     	    org/repos: +              org1/repo1:+                projects:+                  test_project:+                    columns:+                      - id: 0+                        name: triage+                        state: open+                        org:  org1+                        labels: +                          - area/conformance+                            area/sig-testing+                      - name: triage+                        state: open+                        org:  org1+                        labels: +                        - area/conformance+                          area/sig-testing+         `+)++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func isDup(label string, labels []string) bool {+	for _, l := range labels {+		if strings.ToLower(l) == strings.ToLower(label) {+			return true+		}+	}+	return false+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := config.ProjectManager+	if len(projectConfig.OrgRepos) == 0 {+		pluginHelp := &pluginhelp.PluginHelp{+			Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+			Config:      map[string]string{"Config": sampleConfig},

fixed.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"errors"+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++var (+	invalidOrgRepo         = "The provided org/repo format is invalid %s"+	mustHaveProject        = "Each org/repo should be configured with project and columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveColumns        = "Each project must be configured with columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveLabels         = "Each column should have associated labels to assign issues/PRs with the specified labels to that column"+	haveLabelConflicts     = "Same label cannot be specified under two columns in the same project, this causes conflict when adding the project card"+	needsColumnIDorName    = "Atleast ID or Name of the column must be supplied to identify the column"+	needsValidOrg          = "The issue or PR event owner's login should match the org specified here to make this configuration valid"+	issueAlreadyInProject  = "The issue %d already assigned to the project %s"+	failedToAddProjectCard = "Failed to add project card for the issue"+	emptyConfig            = "ProjectManager configuration is Empty, please use the following format to add project manager configuration"+	sampleConfig           = `+     	    org/repos: +              org1/repo1:+                projects:+                  test_project:+                    columns:+                      - id: 0+                        name: triage+                        state: open+                        org:  org1+                        labels: +                          - area/conformance+                            area/sig-testing+                      - name: triage+                        state: open+                        org:  org1+                        labels: +                        - area/conformance+                          area/sig-testing+         `+)++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func isDup(label string, labels []string) bool {+	for _, l := range labels {+		if strings.ToLower(l) == strings.ToLower(label) {+			return true+		}+	}+	return false+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := config.ProjectManager+	if len(projectConfig.OrgRepos) == 0 {+		pluginHelp := &pluginhelp.PluginHelp{+			Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+			Config:      map[string]string{"Config": sampleConfig},+		}+		return pluginHelp, nil+	}++	configString := map[string]string{}+	configErr := ""+	for orgRepoName, managedOrgRepo := range config.ProjectManager.OrgRepos {+		orgRepoParts := strings.Split(orgRepoName, "/")+		if len(orgRepoParts) != 2 && len(orgRepoParts) != 1 {+			configString[orgRepoName] = fmt.Sprintf(invalidOrgRepo, orgRepoName)+		}+		repoConfig := ""+		if len(managedOrgRepo.Projects) == 0 {+			configErr = mustHaveProject+		}+		for projectName, managedProject := range managedOrgRepo.Projects {+			if len(managedProject.Columns) == 0 {+				configErr = mustHaveColumns+				continue+			}+			repoConfig = fmt.Sprintf("projects: {%s %s: { columns: [", repoConfig, projectName)

Redid the code, see if that works.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"errors"+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++var (+	invalidOrgRepo         = "The provided org/repo format is invalid %s"+	mustHaveProject        = "Each org/repo should be configured with project and columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveColumns        = "Each project must be configured with columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveLabels         = "Each column should have associated labels to assign issues/PRs with the specified labels to that column"+	haveLabelConflicts     = "Same label cannot be specified under two columns in the same project, this causes conflict when adding the project card"+	needsColumnIDorName    = "Atleast ID or Name of the column must be supplied to identify the column"+	needsValidOrg          = "The issue or PR event owner's login should match the org specified here to make this configuration valid"+	issueAlreadyInProject  = "The issue %d already assigned to the project %s"+	failedToAddProjectCard = "Failed to add project card for the issue"+	emptyConfig            = "ProjectManager configuration is Empty, please use the following format to add project manager configuration"+	sampleConfig           = `+     	    org/repos: +              org1/repo1:+                projects:+                  test_project:+                    columns:+                      - id: 0+                        name: triage+                        state: open+                        org:  org1+                        labels: +                          - area/conformance+                            area/sig-testing+                      - name: triage+                        state: open+                        org:  org1+                        labels: +                        - area/conformance+                          area/sig-testing+         `+)++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func isDup(label string, labels []string) bool {+	for _, l := range labels {+		if strings.ToLower(l) == strings.ToLower(label) {+			return true+		}+	}+	return false+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := config.ProjectManager+	if len(projectConfig.OrgRepos) == 0 {+		pluginHelp := &pluginhelp.PluginHelp{+			Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+			Config:      map[string]string{"Config": sampleConfig},+		}+		return pluginHelp, nil+	}++	configString := map[string]string{}+	configErr := ""+	for orgRepoName, managedOrgRepo := range config.ProjectManager.OrgRepos {+		orgRepoParts := strings.Split(orgRepoName, "/")+		if len(orgRepoParts) != 2 && len(orgRepoParts) != 1 {+			configString[orgRepoName] = fmt.Sprintf(invalidOrgRepo, orgRepoName)+		}+		repoConfig := ""+		if len(managedOrgRepo.Projects) == 0 {+			configErr = mustHaveProject+		}+		for projectName, managedProject := range managedOrgRepo.Projects {+			if len(managedProject.Columns) == 0 {+				configErr = mustHaveColumns+				continue+			}+			repoConfig = fmt.Sprintf("projects: {%s %s: { columns: [", repoConfig, projectName)+			usedLabels := []string{}+			for _, managedColumn := range managedProject.Columns {+				if len(managedColumn.Labels) == 0 {+					configErr = mustHaveLabels+					continue+				}+				if managedColumn.ID == nil && (len(managedColumn.Name) == 0) {+					configErr = needsColumnIDorName+					continue+				}+				if len(managedColumn.State) == 0 {+					managedColumn.State = "open"+				}+				if len(managedColumn.Org) == 0 {+					configErr = needsValidOrg+					continue+				}+				repoConfig = fmt.Sprintf("%s {id: \"%d\", name: \"%s\", state: \"%s\", org: \"%s\" labels: [", repoConfig, managedColumn.ID, managedColumn.Name, managedColumn.State, managedColumn.Org)+				for i, label := range managedColumn.Labels {+					if isDup(label, usedLabels) {+						configErr = haveLabelConflicts+					} else {+						usedLabels = append(usedLabels, label)+					}+					repoConfig = fmt.Sprintf("%s \"%s\"", repoConfig, label)+					if i+1 < len(managedColumn.Labels) {+						repoConfig = fmt.Sprintf("%s,", repoConfig)+					}+				}+				repoConfig = fmt.Sprintf("%s ] }", repoConfig)+			}+			repoConfig = fmt.Sprintf("%s ] }", repoConfig)+		}+		if len(configErr) > 0 {+			configString[orgRepoName] = configErr+		} else {+			configString[orgRepoName] = repoConfig+		}+	}++	pluginHelp := &pluginhelp.PluginHelp{+		Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+		Config:      configString,+	}+	return pluginHelp, nil+}++func handlePullRequest(pc plugins.Agent, pe github.PullRequestEvent) error {+	return handlePR(pc.GitHubClient, pc.PluginConfig.ProjectManager, pc.Logger, pe)+}++// Strict subset of *github.Client methods.+type githubClient interface {+	GetIssueLabels(org, repo string, number int) ([]github.Label, error)+	GetRepoProjects(owner, repo string) ([]github.Project, error)+	GetOrgProjects(org string) ([]github.Project, error)+	GetProjectColumns(projectID int) ([]github.ProjectColumn, error)+	GetColumnProjectCards(columnID int) ([]github.ProjectCard, error)+	CreateProjectCard(columnID int, projectCard github.ProjectCard) (*github.ProjectCard, error)+}++func handlePR(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, pe github.PullRequestEvent) error {+	// Only respond to label add or issue/PR open events+	if pe.Action != github.PullRequestActionOpened &&+		pe.Action != github.PullRequestActionReopened &&+		pe.Action != github.PullRequestActionLabeled {+		return nil+	}+	// Get any ManagedProjects that match this PR+	matchedColumnIDs := getMatchingColumnIDs(gc, projectManager.OrgRepos, pe, log)++	// For each ManagedColumn that matches this PR, add this PR to that Project Column+	// All the matchedColumnID are valid column ids and the checked to see if the project card+	// we are adding is not already part of the project and thus avoiding duplication.+	for _, matchedColumnID := range matchedColumnIDs {+		err := addPRToColumn(gc, matchedColumnID, pe)+		if err != nil {+			log.WithError(err).WithFields(logrus.Fields{+				"pullRequestNumber": pe.Number,+				"matchedColumnID":   matchedColumnID,+			}).Error(failedToAddProjectCard)+			return err+		}+	}+	return nil+}++func getMatchingColumnIDs(gc githubClient, orgRepos map[string]plugins.ManagedOrgRepo, pe github.PullRequestEvent, log *logrus.Entry) []int {+	var matchedColumnIDs []int+	// Don't use GetIssueLabels unless it's required and keep track of whether the labels have been fetched to avoid unnecessary API usage.+	var labels []github.Label+	// If labels are not yet fetched then get them as they are now required

fixed

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"errors"+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++var (+	invalidOrgRepo         = "The provided org/repo format is invalid %s"+	mustHaveProject        = "Each org/repo should be configured with project and columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveColumns        = "Each project must be configured with columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveLabels         = "Each column should have associated labels to assign issues/PRs with the specified labels to that column"+	haveLabelConflicts     = "Same label cannot be specified under two columns in the same project, this causes conflict when adding the project card"+	needsColumnIDorName    = "Atleast ID or Name of the column must be supplied to identify the column"+	needsValidOrg          = "The issue or PR event owner's login should match the org specified here to make this configuration valid"+	issueAlreadyInProject  = "The issue %d already assigned to the project %s"+	failedToAddProjectCard = "Failed to add project card for the issue"+	emptyConfig            = "ProjectManager configuration is Empty, please use the following format to add project manager configuration"+	sampleConfig           = `+     	    org/repos: +              org1/repo1:+                projects:+                  test_project:+                    columns:+                      - id: 0+                        name: triage+                        state: open+                        org:  org1+                        labels: +                          - area/conformance+                            area/sig-testing+                      - name: triage+                        state: open+                        org:  org1+                        labels: +                        - area/conformance+                          area/sig-testing+         `+)++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func isDup(label string, labels []string) bool {+	for _, l := range labels {+		if strings.ToLower(l) == strings.ToLower(label) {+			return true+		}+	}+	return false+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := config.ProjectManager+	if len(projectConfig.OrgRepos) == 0 {+		pluginHelp := &pluginhelp.PluginHelp{+			Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+			Config:      map[string]string{"Config": sampleConfig},+		}+		return pluginHelp, nil+	}++	configString := map[string]string{}+	configErr := ""+	for orgRepoName, managedOrgRepo := range config.ProjectManager.OrgRepos {+		orgRepoParts := strings.Split(orgRepoName, "/")+		if len(orgRepoParts) != 2 && len(orgRepoParts) != 1 {+			configString[orgRepoName] = fmt.Sprintf(invalidOrgRepo, orgRepoName)+		}+		repoConfig := ""+		if len(managedOrgRepo.Projects) == 0 {+			configErr = mustHaveProject+		}+		for projectName, managedProject := range managedOrgRepo.Projects {+			if len(managedProject.Columns) == 0 {+				configErr = mustHaveColumns+				continue+			}+			repoConfig = fmt.Sprintf("projects: {%s %s: { columns: [", repoConfig, projectName)+			usedLabels := []string{}+			for _, managedColumn := range managedProject.Columns {+				if len(managedColumn.Labels) == 0 {+					configErr = mustHaveLabels+					continue+				}+				if managedColumn.ID == nil && (len(managedColumn.Name) == 0) {+					configErr = needsColumnIDorName+					continue+				}+				if len(managedColumn.State) == 0 {+					managedColumn.State = "open"+				}+				if len(managedColumn.Org) == 0 {+					configErr = needsValidOrg+					continue+				}+				repoConfig = fmt.Sprintf("%s {id: \"%d\", name: \"%s\", state: \"%s\", org: \"%s\" labels: [", repoConfig, managedColumn.ID, managedColumn.Name, managedColumn.State, managedColumn.Org)+				for i, label := range managedColumn.Labels {+					if isDup(label, usedLabels) {+						configErr = haveLabelConflicts+					} else {+						usedLabels = append(usedLabels, label)+					}+					repoConfig = fmt.Sprintf("%s \"%s\"", repoConfig, label)+					if i+1 < len(managedColumn.Labels) {+						repoConfig = fmt.Sprintf("%s,", repoConfig)+					}+				}+				repoConfig = fmt.Sprintf("%s ] }", repoConfig)+			}+			repoConfig = fmt.Sprintf("%s ] }", repoConfig)+		}+		if len(configErr) > 0 {+			configString[orgRepoName] = configErr+		} else {+			configString[orgRepoName] = repoConfig+		}+	}++	pluginHelp := &pluginhelp.PluginHelp{+		Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+		Config:      configString,+	}+	return pluginHelp, nil+}++func handlePullRequest(pc plugins.Agent, pe github.PullRequestEvent) error {+	return handlePR(pc.GitHubClient, pc.PluginConfig.ProjectManager, pc.Logger, pe)+}++// Strict subset of *github.Client methods.+type githubClient interface {+	GetIssueLabels(org, repo string, number int) ([]github.Label, error)+	GetRepoProjects(owner, repo string) ([]github.Project, error)+	GetOrgProjects(org string) ([]github.Project, error)+	GetProjectColumns(projectID int) ([]github.ProjectColumn, error)+	GetColumnProjectCards(columnID int) ([]github.ProjectCard, error)+	CreateProjectCard(columnID int, projectCard github.ProjectCard) (*github.ProjectCard, error)+}++func handlePR(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, pe github.PullRequestEvent) error {+	// Only respond to label add or issue/PR open events+	if pe.Action != github.PullRequestActionOpened &&+		pe.Action != github.PullRequestActionReopened &&+		pe.Action != github.PullRequestActionLabeled {+		return nil+	}+	// Get any ManagedProjects that match this PR+	matchedColumnIDs := getMatchingColumnIDs(gc, projectManager.OrgRepos, pe, log)++	// For each ManagedColumn that matches this PR, add this PR to that Project Column+	// All the matchedColumnID are valid column ids and the checked to see if the project card+	// we are adding is not already part of the project and thus avoiding duplication.+	for _, matchedColumnID := range matchedColumnIDs {+		err := addPRToColumn(gc, matchedColumnID, pe)+		if err != nil {+			log.WithError(err).WithFields(logrus.Fields{+				"pullRequestNumber": pe.Number,+				"matchedColumnID":   matchedColumnID,+			}).Error(failedToAddProjectCard)+			return err+		}+	}+	return nil+}++func getMatchingColumnIDs(gc githubClient, orgRepos map[string]plugins.ManagedOrgRepo, pe github.PullRequestEvent, log *logrus.Entry) []int {+	var matchedColumnIDs []int+	// Don't use GetIssueLabels unless it's required and keep track of whether the labels have been fetched to avoid unnecessary API usage.+	var labels []github.Label+	// If labels are not yet fetched then get them as they are now required+	// GetIssueLabels works for PRs as they are considered issues in the API+	var err error+	labels, err = gc.GetIssueLabels(pe.Repo.Owner.Login, pe.Repo.Name, pe.Number)+	if err != nil {+		log.Infof("Error geting labels on the issue %d, ignoring processing the event", pe.Number)+		return nil+	}++	issueURL := fmt.Sprintf("https://api.github.com/repos/%s/%s/issues/%v", pe.Repo.Owner.Login, pe.Repo.Name, pe.Number)+	for orgRepoName, managedOrgRepo := range orgRepos {+		for projectName, managedProject := range managedOrgRepo.Projects {+			for _, managedColumn := range managedProject.Columns {+				if managedColumn.Org != "" && managedColumn.Org != pe.Repo.Owner.Login {+					continue+				}+				if managedColumn.State != "" && managedColumn.State != pe.PullRequest.State {+					continue+				}++				// if labels do not match we continue to the next project+				if !github.HasLabels(managedColumn.Labels, labels) {+					continue+				}++				columnID := managedColumn.ID+				// Currently this assumes columnID having a value if 0 means it is unset+				// While it's highly unlikely that an actual project would have an ID of 0, given that+				// these IDs are global across GitHub, this doesn't seem like an ideal solution.+				if columnID == nil {+					var err error+					columnID, err = getColumnID(gc, orgRepoName, projectName, managedColumn.Name, issueURL)+					if err != nil {+						log.Infof("Cannot add the issue: %d to the project: %s, column: %s, error: %s", pe.Number, projectName, managedColumn.Name, err)+						break+					}+				}+				matchedColumnIDs = append(matchedColumnIDs, *columnID)+				// if the configuration allows to match multiple columns within the same+				// project, we will only take the first column match from the list+				break+			}+		}+	}+	return matchedColumnIDs+}++// getColumnID returns a column id only if the issue if the project and column name provided are valid+// and the issue is not already in the project+func getColumnID(gc githubClient, orgRepoName, projectName, columnName, issueURL string) (*int, error) {+	var projects []github.Project+	var err error+	orgRepoParts := strings.Split(orgRepoName, "/")+	switch len(orgRepoParts) {+	case 2:+		projects, err = gc.GetRepoProjects(orgRepoParts[0], orgRepoParts[1])+	case 1:+		projects, err = gc.GetOrgProjects(orgRepoParts[0])+	default:+		return nil, fmt.Errorf("could not determine org or org/repo from %s", orgRepoName)+	}++	if err != nil {+		return nil, err+	}++	for _, project := range projects {+		if project.Name == projectName {+			columns, err := gc.GetProjectColumns(project.ID)+			if err != nil {+				return nil, err+			}++			for _, column := range columns {+				cards, err := gc.GetColumnProjectCards(column.ID)+				if err != nil {+					return nil, err+				}++				for _, card := range cards {+					if card.ContentURL == issueURL {+						return nil, errors.New(fmt.Sprintf(issueAlreadyInProject, issueURL, projectName))+					}+				}+			}+			for _, column := range columns {+				if column.Name == columnName {+					return &column.ID, nil+				}+			}+			return nil, fmt.Errorf("could not find column %s in project %s", columnName, projectName)+		}+	}+	return nil, fmt.Errorf("could not find project %s in org/repo %s", projectName, orgRepoName)+}++func addPRToColumn(gc githubClient, columnID int, pe github.PullRequestEvent) error {+	// Create project card and add this PR+	projectCard := github.ProjectCard{+		ContentType: "PullRequest",+		ContentID:   pe.PullRequest.ID,+	}+	_, err := gc.CreateProjectCard(columnID, projectCard)+	if err != nil {+		return err+	}+	return nil

done

brahmaroutu

comment created time in 2 months

push eventbrahmaroutu/test-infra

Hrishikesh Barman

commit sha 8cb0a57abd350ac4cdb06fe8fbfff6a292c4d5e3

Updated config-bootstrapper docs Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>

view details

Hrishikesh Barman

commit sha 3e36fffc0fd939bc2bf221de0780ce805e452db2

added requested changes and usage Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>

view details

Nikhita Raghunath

commit sha 5d731b5d34739315dcbb538580d0ef8bf4815dfa

retitle: enable allow_closed_issues option

view details

Arash Deshmeh

commit sha d43e10a91a75be4ddffc802588cd3e2e181b8a13

Add RepoPermissions to github User type The field permissions has been added to the github User type, thus included in the results returned from the ListCollaborators method. This is required by the branch protector to check the validity of the restrictions section of branch protection requests. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Arash Deshmeh

commit sha aa4a6acf68fbec29b05e3c18869f701c811277ce

Add ListRepoTeams to GitHub client Add Permission field to Team and add the capability to return the list of teams with access to a repository from GitHub client. This is needed by branch protector to validate branch protection requests before sending them. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Arash Deshmeh

commit sha 776308ab94ae3955768f63be9bf155b565354115

Validate branch protection requests for user/team authorization Branch protector verifies that any teams or collaborators specified in restrictions section of the branch protection request have either write or admin access to the repository. Requests with unauthorized collaborators or teams will be dropped before being submitted to github. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Arash Deshmeh

commit sha c9d6dff90c756b496f4cc4d44d4eee3342e5cbfd

Use a feature flag for branchprotector request verification The feature to check whether a collaborator/team specified in the restrictions section is authorized for the target branch is now hidden behind a feature flag to avoid API token usage if the feature is not needed. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Travis Clarke

commit sha 1dc1dcb6dc56043dddd07d1f2643156332d36a60

deck data->prowjobs refactor bazel

view details

Travis Clarke

commit sha 643f32caca4e5ec9d48c59f0b1ea20b75b6a372c

deck data->prowjobs refactor html

view details

Travis Clarke

commit sha 5488ba21fb520020bcd2c64059c3b25fbe63222a

deck data->prowjobs refactor sh

view details

Travis Clarke

commit sha 440e4a74075ac76c2fe4bd97b0d24a84783ac452

deck data->prowjobs refactor FE ts

view details

Travis Clarke

commit sha 448f6c5d0ec3e4123eb4bd32a7e893ea8b37918f

deck data->prowjobs refactor BE go

view details

Travis Clarke

commit sha 1fb8bded3b29e6e493aaf74cd2e58215bbc7d2b1

Revive logging in Plank

view details

Justin SB

commit sha 3709f61c4ac28b87ec4858b4245441d213b3dc45

kops pr: Add verify-gomod job Confirms `go mod tidy` has been run

view details

Sean Chase

commit sha 6f098210194b9319aec73d4fbd08ff9f18839504

Shard Testgrid Config: Gardener

view details

Alvaro Aleman

commit sha 6755f0a606ba4cc2d5d9c452ed9c20dedda43993

Pull-controller-runtime-test: Request 4 CPUs

view details

Travis Clarke

commit sha 10248c005062a9152f2da55fb48f45e19e034ae2

Bypass unknown key

view details

Travis Clarke

commit sha 7ad51a600dff9a7e1d6d07069f43b7e279d997d3

Preserve current location w/ query params on github redirect

view details

Hongkai Liu

commit sha 1f2af1e399b2d667fa9ffddfc69921c5ef6f5977

Make 2 more functions in autobumper public Those 2 functions can be used for more general cases by removing the dependency of `images` which is obtained from `UpdateReferences`.

view details

Travis Clarke

commit sha 90be3d69899244e3e16b12f5e08d8645dae09075

Update unit tests for "annotate_owners"

view details

push time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"errors"+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++var (+	invalidOrgRepo         = "The provided org/repo format is invalid %s"+	mustHaveProject        = "Each org/repo should be configured with project and columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveColumns        = "Each project must be configured with columns with associated labels for plugin to assign issues/PRs with the specified labels to that column"+	mustHaveLabels         = "Each column should have associated labels to assign issues/PRs with the specified labels to that column"+	haveLabelConflicts     = "Same label cannot be specified under two columns in the same project, this causes conflict when adding the project card"+	needsColumnIDorName    = "Atleast ID or Name of the column must be supplied to identify the column"+	needsValidOrg          = "The issue or PR event owner's login should match the org specified here to make this configuration valid"+	issueAlreadyInProject  = "The issue %d already assigned to the project %s"+	failedToAddProjectCard = "Failed to add project card for the issue"+	emptyConfig            = "ProjectManager configuration is Empty, please use the following format to add project manager configuration"+	sampleConfig           = `+     	    org/repos: +              org1/repo1:+                projects:+                  test_project:+                    columns:+                      - id: 0+                        name: triage+                        state: open+                        org:  org1+                        labels: +                          - area/conformance+                            area/sig-testing+                      - name: triage+                        state: open+                        org:  org1+                        labels: +                        - area/conformance+                          area/sig-testing+         `+)++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func isDup(label string, labels []string) bool {+	for _, l := range labels {+		if strings.ToLower(l) == strings.ToLower(label) {+			return true+		}+	}+	return false+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := config.ProjectManager+	if len(projectConfig.OrgRepos) == 0 {+		pluginHelp := &pluginhelp.PluginHelp{+			Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+			Config:      map[string]string{"Config": sampleConfig},+		}+		return pluginHelp, nil+	}++	configString := map[string]string{}+	configErr := ""+	for orgRepoName, managedOrgRepo := range config.ProjectManager.OrgRepos {+		orgRepoParts := strings.Split(orgRepoName, "/")+		if len(orgRepoParts) != 2 && len(orgRepoParts) != 1 {+			configString[orgRepoName] = fmt.Sprintf(invalidOrgRepo, orgRepoName)+		}+		repoConfig := ""+		if len(managedOrgRepo.Projects) == 0 {+			configErr = mustHaveProject+		}+		for projectName, managedProject := range managedOrgRepo.Projects {+			if len(managedProject.Columns) == 0 {+				configErr = mustHaveColumns+				continue+			}+			repoConfig = fmt.Sprintf("projects: {%s %s: { columns: [", repoConfig, projectName)+			usedLabels := []string{}+			for _, managedColumn := range managedProject.Columns {+				if len(managedColumn.Labels) == 0 {+					configErr = mustHaveLabels+					continue+				}+				if managedColumn.ID == nil && (len(managedColumn.Name) == 0) {+					configErr = needsColumnIDorName+					continue+				}+				if len(managedColumn.State) == 0 {+					managedColumn.State = "open"+				}+				if len(managedColumn.Org) == 0 {+					configErr = needsValidOrg+					continue+				}+				repoConfig = fmt.Sprintf("%s {id: \"%d\", name: \"%s\", state: \"%s\", org: \"%s\" labels: [", repoConfig, managedColumn.ID, managedColumn.Name, managedColumn.State, managedColumn.Org)+				for i, label := range managedColumn.Labels {+					if isDup(label, usedLabels) {+						configErr = haveLabelConflicts+					} else {+						usedLabels = append(usedLabels, label)+					}+					repoConfig = fmt.Sprintf("%s \"%s\"", repoConfig, label)+					if i+1 < len(managedColumn.Labels) {+						repoConfig = fmt.Sprintf("%s,", repoConfig)+					}+				}+				repoConfig = fmt.Sprintf("%s ] }", repoConfig)+			}+			repoConfig = fmt.Sprintf("%s ] }", repoConfig)+		}+		if len(configErr) > 0 {+			configString[orgRepoName] = configErr+		} else {+			configString[orgRepoName] = repoConfig+		}+	}++	pluginHelp := &pluginhelp.PluginHelp{+		Description: "The project-manager plugin automatically adds Pull Requests to specified GitHub Project Columns, if the label on the PR matches with configured project and the column.",+		Config:      configString,+	}+	return pluginHelp, nil+}++func handlePullRequest(pc plugins.Agent, pe github.PullRequestEvent) error {+	return handlePR(pc.GitHubClient, pc.PluginConfig.ProjectManager, pc.Logger, pe)+}++// Strict subset of *github.Client methods.+type githubClient interface {+	GetIssueLabels(org, repo string, number int) ([]github.Label, error)+	GetRepoProjects(owner, repo string) ([]github.Project, error)+	GetOrgProjects(org string) ([]github.Project, error)+	GetProjectColumns(projectID int) ([]github.ProjectColumn, error)+	GetColumnProjectCards(columnID int) ([]github.ProjectCard, error)+	CreateProjectCard(columnID int, projectCard github.ProjectCard) (*github.ProjectCard, error)+}++func handlePR(gc githubClient, projectManager plugins.ProjectManager, log *logrus.Entry, pe github.PullRequestEvent) error {+	// Only respond to label add or issue/PR open events+	if pe.Action != github.PullRequestActionOpened &&+		pe.Action != github.PullRequestActionReopened &&+		pe.Action != github.PullRequestActionLabeled {+		return nil+	}+	// Get any ManagedProjects that match this PR+	matchedColumnIDs := getMatchingColumnIDs(gc, projectManager.OrgRepos, pe, log)++	// For each ManagedColumn that matches this PR, add this PR to that Project Column+	// All the matchedColumnID are valid column ids and the checked to see if the project card+	// we are adding is not already part of the project and thus avoiding duplication.+	for _, matchedColumnID := range matchedColumnIDs {+		err := addPRToColumn(gc, matchedColumnID, pe)+		if err != nil {+			log.WithError(err).WithFields(logrus.Fields{+				"pullRequestNumber": pe.Number,+				"matchedColumnID":   matchedColumnID,+			}).Error(failedToAddProjectCard)+			return err+		}+	}+	return nil+}++func getMatchingColumnIDs(gc githubClient, orgRepos map[string]plugins.ManagedOrgRepo, pe github.PullRequestEvent, log *logrus.Entry) []int {+	var matchedColumnIDs []int+	// Don't use GetIssueLabels unless it's required and keep track of whether the labels have been fetched to avoid unnecessary API usage.+	var labels []github.Label+	// If labels are not yet fetched then get them as they are now required+	// GetIssueLabels works for PRs as they are considered issues in the API+	var err error+	labels, err = gc.GetIssueLabels(pe.Repo.Owner.Login, pe.Repo.Name, pe.Number)+	if err != nil {+		log.Infof("Error geting labels on the issue %d, ignoring processing the event", pe.Number)+		return nil+	}++	issueURL := fmt.Sprintf("https://api.github.com/repos/%s/%s/issues/%v", pe.Repo.Owner.Login, pe.Repo.Name, pe.Number)+	for orgRepoName, managedOrgRepo := range orgRepos {+		for projectName, managedProject := range managedOrgRepo.Projects {+			for _, managedColumn := range managedProject.Columns {+				if managedColumn.Org != "" && managedColumn.Org != pe.Repo.Owner.Login {+					continue+				}+				if managedColumn.State != "" && managedColumn.State != pe.PullRequest.State {+					continue+				}++				// if labels do not match we continue to the next project+				if !github.HasLabels(managedColumn.Labels, labels) {+					continue+				}++				columnID := managedColumn.ID+				// Currently this assumes columnID having a value if 0 means it is unset+				// While it's highly unlikely that an actual project would have an ID of 0, given that+				// these IDs are global across GitHub, this doesn't seem like an ideal solution.+				if columnID == nil {+					var err error+					columnID, err = getColumnID(gc, orgRepoName, projectName, managedColumn.Name, issueURL)+					if err != nil {+						log.Infof("Cannot add the issue: %d to the project: %s, column: %s, error: %s", pe.Number, projectName, managedColumn.Name, err)+						break+					}+				}+				matchedColumnIDs = append(matchedColumnIDs, *columnID)+				// if the configuration allows to match multiple columns within the same+				// project, we will only take the first column match from the list+				break+			}+		}+	}+	return matchedColumnIDs+}++// getColumnID returns a column id only if the issue if the project and column name provided are valid+// and the issue is not already in the project+func getColumnID(gc githubClient, orgRepoName, projectName, columnName, issueURL string) (*int, error) {+	var projects []github.Project+	var err error+	orgRepoParts := strings.Split(orgRepoName, "/")+	switch len(orgRepoParts) {+	case 2:+		projects, err = gc.GetRepoProjects(orgRepoParts[0], orgRepoParts[1])+	case 1:+		projects, err = gc.GetOrgProjects(orgRepoParts[0])+	default:+		return nil, fmt.Errorf("could not determine org or org/repo from %s", orgRepoName)+	}++	if err != nil {+		return nil, err+	}++	for _, project := range projects {+		if project.Name == projectName {+			columns, err := gc.GetProjectColumns(project.ID)+			if err != nil {+				return nil, err+			}++			for _, column := range columns {+				cards, err := gc.GetColumnProjectCards(column.ID)+				if err != nil {+					return nil, err+				}++				for _, card := range cards {+					if card.ContentURL == issueURL {+						return nil, errors.New(fmt.Sprintf(issueAlreadyInProject, issueURL, projectName))

getColumnID either return a valid columnID or an error explaining why it could not return a valid columnID. Do you expect caller to check for nil on columnID instead of an error?

brahmaroutu

comment created time in 2 months

push eventbrahmaroutu/test-infra

Hrishikesh Barman

commit sha 8cb0a57abd350ac4cdb06fe8fbfff6a292c4d5e3

Updated config-bootstrapper docs Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>

view details

Hrishikesh Barman

commit sha 3e36fffc0fd939bc2bf221de0780ce805e452db2

added requested changes and usage Signed-off-by: Hrishikesh Barman <hrishikeshbman@gmail.com>

view details

Nikhita Raghunath

commit sha 5d731b5d34739315dcbb538580d0ef8bf4815dfa

retitle: enable allow_closed_issues option

view details

Arash Deshmeh

commit sha d43e10a91a75be4ddffc802588cd3e2e181b8a13

Add RepoPermissions to github User type The field permissions has been added to the github User type, thus included in the results returned from the ListCollaborators method. This is required by the branch protector to check the validity of the restrictions section of branch protection requests. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Arash Deshmeh

commit sha aa4a6acf68fbec29b05e3c18869f701c811277ce

Add ListRepoTeams to GitHub client Add Permission field to Team and add the capability to return the list of teams with access to a repository from GitHub client. This is needed by branch protector to validate branch protection requests before sending them. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Arash Deshmeh

commit sha 776308ab94ae3955768f63be9bf155b565354115

Validate branch protection requests for user/team authorization Branch protector verifies that any teams or collaborators specified in restrictions section of the branch protection request have either write or admin access to the repository. Requests with unauthorized collaborators or teams will be dropped before being submitted to github. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Arash Deshmeh

commit sha c9d6dff90c756b496f4cc4d44d4eee3342e5cbfd

Use a feature flag for branchprotector request verification The feature to check whether a collaborator/team specified in the restrictions section is authorized for the target branch is now hidden behind a feature flag to avoid API token usage if the feature is not needed. Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>

view details

Travis Clarke

commit sha 1dc1dcb6dc56043dddd07d1f2643156332d36a60

deck data->prowjobs refactor bazel

view details

Travis Clarke

commit sha 643f32caca4e5ec9d48c59f0b1ea20b75b6a372c

deck data->prowjobs refactor html

view details

Travis Clarke

commit sha 5488ba21fb520020bcd2c64059c3b25fbe63222a

deck data->prowjobs refactor sh

view details

Travis Clarke

commit sha 440e4a74075ac76c2fe4bd97b0d24a84783ac452

deck data->prowjobs refactor FE ts

view details

Travis Clarke

commit sha 448f6c5d0ec3e4123eb4bd32a7e893ea8b37918f

deck data->prowjobs refactor BE go

view details

Travis Clarke

commit sha 1fb8bded3b29e6e493aaf74cd2e58215bbc7d2b1

Revive logging in Plank

view details

Justin SB

commit sha 3709f61c4ac28b87ec4858b4245441d213b3dc45

kops pr: Add verify-gomod job Confirms `go mod tidy` has been run

view details

Sean Chase

commit sha 6f098210194b9319aec73d4fbd08ff9f18839504

Shard Testgrid Config: Gardener

view details

Alvaro Aleman

commit sha 6755f0a606ba4cc2d5d9c452ed9c20dedda43993

Pull-controller-runtime-test: Request 4 CPUs

view details

Travis Clarke

commit sha 10248c005062a9152f2da55fb48f45e19e034ae2

Bypass unknown key

view details

Travis Clarke

commit sha 7ad51a600dff9a7e1d6d07069f43b7e279d997d3

Preserve current location w/ query params on github redirect

view details

Hongkai Liu

commit sha 1f2af1e399b2d667fa9ffddfc69921c5ef6f5977

Make 2 more functions in autobumper public Those 2 functions can be used for more general cases by removing the dependency of `images` which is obtained from `UpdateReferences`.

view details

Travis Clarke

commit sha 90be3d69899244e3e16b12f5e08d8645dae09075

Update unit tests for "annotate_owners"

view details

push time in 2 months

pull request commentkubernetes/test-infra

Provide automated way of updating repo project boards.

@cjwagner Can you please review.

brahmaroutu

comment created time in 2 months

push eventbrahmaroutu/test-infra

Srini Brahmaroutu

commit sha 10abd1d0d3b971c0cdae1ec56bac4b3c3af92cc4

Provide automated way of updating repo project boards.

view details

push time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++// Package projectmanager is a plugin to auto add pull requests to project boards based on specified conditions+package projectmanager++import (+	"fmt"+	"strings"++	"github.com/sirupsen/logrus"++	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/pluginhelp"+	"k8s.io/test-infra/prow/plugins"+)++const (+	pluginName = "project-manager"+)++// TODO Create a new handler for issues, look in hook/server.go+// TODO Handle Label deletion, pr/issue should be removed from the project when label criteria does  not meet+// TODO Pr/issue state change, pr/iisue is on project board only if its state is listed in the configuration+func init() {+	plugins.RegisterPullRequestHandler(pluginName, handlePullRequest, helpProvider)+}++func helpProvider(config *plugins.Configuration, enabledRepos []string) (*pluginhelp.PluginHelp, error) {+	projectConfig := map[string]string{}+	var configString string+	for orgRepoName, managedOrgRepo := range config.ProjectManager.OrgRepos {+		configString = fmt.Sprintf("%s %s: { projects: {", configString, orgRepoName)+		for projectName, managedProject := range managedOrgRepo.Projects {+			configString := fmt.Sprintf("%s %s: { columns: [", configString, projectName)

Please check the new iteration, hopefully addressed these concerns

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

 type ProjectRepoConfig struct { 	ProjectColumnMap map[string]string `json:"repo_default_column_map,omitempty"` } +// ProjectManager represents the config for the ProjectManager plugin, holding top+// level config options, configuration is a hierarchial structure with top level element+// being org/repo with the list of projects as its children

Fixed

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

 func (f *FakeClient) CreateProjectCard(columnID int, projectCard github.ProjectC 	}  	for project, columnIDMap := range f.ColumnIDMap {+		for id := range columnIDMap {+			// Make sure that we behave same as github API+			// Create project will generate an error when the card already exist in the project+			if _, exists := columnIDMap[columnID]; exists {+				card, err := f.GetColumnProjectCard(id, projectCard.ContentURL)+				if err == nil && card != nil && *card == projectCard {

There can be only one project card per issue/PR and since we are looking through all columns in a project to see if there exists a projectCard we should be safe once this check passes. If you are worried about collision due to concurrency, we will have a failure from the CreateCard api itself.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

 func (f *FakeClient) CreateProjectCard(columnID int, projectCard github.ProjectC 	}  	for project, columnIDMap := range f.ColumnIDMap {+		for id := range columnIDMap {+			// Make sure that we behave same as github API+			// Create project will generate an error when the card already exist in the project+			if _, exists := columnIDMap[columnID]; exists {

fixedtrue, fixed.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++package projectmanager++import (+	"fmt"+	"testing"++	"github.com/sirupsen/logrus"+	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/github/fakegithub"+	"k8s.io/test-infra/prow/plugins"+)++func TestHandlePR(t *testing.T) {+	columnID := new(int)+	*columnID = 1+	columnIDMap := map[string]map[int]string{+		"testProject": {+			00001: "testColumn",+			00002: "testColumn2",+		},+		"testProject2": {+			00003: "testColumn",+			00004: "testColumn2",+		},+	}+	labels := []string{"otherOrg/someRepo#1:label1", "otherOrg/someRepo#1:label2", "otherOrg/someRepo#2:label1", "otherOrg2/someRepo#1:label1"}+	cases := []struct {+		name                string+		gc                  *fakegithub.FakeClient+		projectManager      plugins.ProjectManager+		pe                  github.PullRequestEvent+		expectedColumnCards map[int][]github.ProjectCard+		expectedError       error+	}{+		{+			name: "add pull request to project column with no columnID",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				2: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request to project column with only columnID",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				// Note that repoProjects and ProjectColumns are empty so the columnID cannot be looked up using repo, project and column names+				// This means if the project_manager plugin is not using the columnID specified in the config this test will fail+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										ID:     columnID,+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				1: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "don't add pull request with incorrect labels",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{},+			expectedError:       fmt.Errorf("could not find column %s in project %s", "testColumn", "testProject"),

Changed the test name, I changed code to not return error but ignore adding the PR to the project if that makes sense. It is possible to drop columns from projects after we configure and there is possibility that we cannot add the project card, we should ignore and log the details.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++package projectmanager++import (+	"fmt"+	"testing"++	"github.com/sirupsen/logrus"+	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/github/fakegithub"+	"k8s.io/test-infra/prow/plugins"+)++func TestHandlePR(t *testing.T) {+	columnID := new(int)+	*columnID = 1+	columnIDMap := map[string]map[int]string{+		"testProject": {+			00001: "testColumn",+			00002: "testColumn2",+		},+		"testProject2": {+			00003: "testColumn",+			00004: "testColumn2",+		},+	}+	labels := []string{"otherOrg/someRepo#1:label1", "otherOrg/someRepo#1:label2", "otherOrg/someRepo#2:label1", "otherOrg2/someRepo#1:label1"}+	cases := []struct {+		name                string+		gc                  *fakegithub.FakeClient+		projectManager      plugins.ProjectManager+		pe                  github.PullRequestEvent+		expectedColumnCards map[int][]github.ProjectCard+		expectedError       error+	}{+		{+			name: "add pull request to project column with no columnID",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				2: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request to project column with only columnID",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				// Note that repoProjects and ProjectColumns are empty so the columnID cannot be looked up using repo, project and column names+				// This means if the project_manager plugin is not using the columnID specified in the config this test will fail+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										ID:     columnID,+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				1: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "don't add pull request with incorrect labels",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{},+			expectedError:       fmt.Errorf("could not find column %s in project %s", "testColumn", "testProject"),+		},+		{+			name: "add pull request using column name in multirepo",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+					"testOrg/testRepo2": {+						{+							Name: "testProject2",+							ID:   2,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+					"testOrg/testRepo2": {+						Projects: map[string]plugins.ManagedProject{+							"testProject2": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg2",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg2",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				4: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request using column name in multirepo to multiple projects",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+					"testOrg/testRepo2": {+						{+							Name: "testProject2",+							ID:   2,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1"},+									},+								},+							},+						},+					},+					"testOrg/testRepo2": {+						Projects: map[string]plugins.ManagedProject{+							"testProject2": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				4: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+				1: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request using column name to multiple columns in a project should fail",

The fix currently is to not throw errors if we fail to add a project card, instead we log the issue why we failed to add and proceed.

brahmaroutu

comment created time in 2 months

Pull request review commentkubernetes/test-infra

Provide automated way of updating repo project boards.

+/*+Copyright 2019 The Kubernetes Authors.++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.+*/++package projectmanager++import (+	"fmt"+	"testing"++	"github.com/sirupsen/logrus"+	"k8s.io/test-infra/prow/github"+	"k8s.io/test-infra/prow/github/fakegithub"+	"k8s.io/test-infra/prow/plugins"+)++func TestHandlePR(t *testing.T) {+	columnID := new(int)+	*columnID = 1+	columnIDMap := map[string]map[int]string{+		"testProject": {+			00001: "testColumn",+			00002: "testColumn2",+		},+		"testProject2": {+			00003: "testColumn",+			00004: "testColumn2",+		},+	}+	labels := []string{"otherOrg/someRepo#1:label1", "otherOrg/someRepo#1:label2", "otherOrg/someRepo#2:label1", "otherOrg2/someRepo#1:label1"}+	cases := []struct {+		name                string+		gc                  *fakegithub.FakeClient+		projectManager      plugins.ProjectManager+		pe                  github.PullRequestEvent+		expectedColumnCards map[int][]github.ProjectCard+		expectedError       error+	}{+		{+			name: "add pull request to project column with no columnID",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				2: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request to project column with only columnID",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				// Note that repoProjects and ProjectColumns are empty so the columnID cannot be looked up using repo, project and column names+				// This means if the project_manager plugin is not using the columnID specified in the config this test will fail+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										ID:     columnID,+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				1: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "don't add pull request with incorrect labels",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{},+			expectedError:       fmt.Errorf("could not find column %s in project %s", "testColumn", "testProject"),+		},+		{+			name: "add pull request using column name in multirepo",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+					"testOrg/testRepo2": {+						{+							Name: "testProject2",+							ID:   2,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+					"testOrg/testRepo2": {+						Projects: map[string]plugins.ManagedProject{+							"testProject2": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg2",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg2",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				4: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request using column name in multirepo to multiple projects",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+					"testOrg/testRepo2": {+						{+							Name: "testProject2",+							ID:   2,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1"},+									},+								},+							},+						},+					},+					"testOrg/testRepo2": {+						Projects: map[string]plugins.ManagedProject{+							"testProject2": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				4: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+				1: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request using column name to multiple columns in a project should fail",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/testRepo": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg/testRepo": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				1: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+		{+			name: "add pull request using column name into org and repo projects",+			gc: &fakegithub.FakeClient{+				IssueLabelsAdded:   labels,+				IssueLabelsRemoved: []string{},+				RepoProjects: map[string][]github.Project{+					"testOrg/*": {+						{+							Name: "testProject",+							ID:   1,+						},+					},+					"testOrg/testRepo2": {+						{+							Name: "testProject2",+							ID:   2,+						},+					},+				},+				OrgProjects: map[string][]github.Project{},+				ProjectColumnsMap: map[string][]github.ProjectColumn{+					"testProject": {+						{+							Name: "testColumn2",+							ID:   2,+						},+						{+							Name: "testColumn",+							ID:   1,+						},+					},+					"testProject2": {+						{+							Name: "testColumn2",+							ID:   4,+						},+						{+							Name: "testColumn",+							ID:   3,+						},+					},+				},+				ColumnCardsMap: map[int][]github.ProjectCard{},+				ColumnIDMap:    columnIDMap,+			},+			projectManager: plugins.ProjectManager{+				OrgRepos: map[string]plugins.ManagedOrgRepo{+					"testOrg": {+						Projects: map[string]plugins.ManagedProject{+							"testProject": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1"},+									},+								},+							},+						},+					},+					"testOrg/testRepo2": {+						Projects: map[string]plugins.ManagedProject{+							"testProject2": {+								Columns: []plugins.ManagedColumn{+									{+										Name:   "testColumn2",+										State:  "open",+										Org:    "otherOrg",+										Labels: []string{"label1", "label2"},+									},+								},+							},+						},+					},+				},+			},+			pe: github.PullRequestEvent{+				Action: github.PullRequestActionOpened,+				Number: 1,+				PullRequest: github.PullRequest{+					ID:    2,+					State: "open",+				},+				Repo: github.Repo{+					Name: "someRepo",+					Owner: github.User{+						Login: "otherOrg",+					},+				},+			},+			expectedColumnCards: map[int][]github.ProjectCard{+				4: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+				1: {+					{+						ContentID:   2,+						ContentType: "PullRequest",+					},+				},+			},+		},+	}+	for _, c := range cases {+		t.Run(c.name, func(t *testing.T) {+			err := handlePR(c.gc, c.projectManager, logrus.NewEntry(logrus.New()), c.pe)+			if err != nil {+				if c.expectedError != nil && c.expectedError.Error() == err.Error() {+					return+				}+				t.Fatalf("handlePR error: %v", err)+			}

fixed.

brahmaroutu

comment created time in 2 months

push eventbrahmaroutu/test-infra

Mateusz Szostok

commit sha c57d932a349a72303148b7502d13e3e910a05f60

Split the xbuild job for the Service Catalog images

view details

Antonio Ojea

commit sha dc4d1de65d8538c6532443ad2f9ec6e5e7ad44c0

Set up kind jobs for 1.15 release

view details

Cole Wagner

commit sha 53b6b0a976b3394c4606d37bba25cecec50be062

Allow mkpod to autogenerate buildID when 'snowflake' is specified.

view details

Marko Mudrinić

commit sha 89fe6f6090b5152b18ce059d0d26653479043b03

Add an option to skip DCO check for trusted users

view details

Matthew Wong

commit sha 6ba396402e34e07fad207e7a8f60104469cda452

Add AWS EFS CSI driver prow job

view details

Sean Chase

commit sha 5bd162cf7f531523aef65966eae2b6d42d24cfc7

Enforcement of single-default in Configurator

view details

Rohit Jaini

commit sha d500e71205f83bfaf7e8b46c18e2783ab8d3d2e6

Azure Stack related changes.

view details

Rohit Jaini

commit sha 98fb06758e198335c29a5f14e9564641828e22d1

Address formatting issues.

view details

Rohit Jaini

commit sha bf1620bcbd1595550419feef12fcaa21e07dce8f

Address formatting issue.

view details

Krzysztof Siedlecki

commit sha 2732373a5e003db2eb365525ef35dca48f336294

adding missing kubemark test flags

view details

Travis Clarke

commit sha a9bd224cf4ba7cd859d0f399190b0831a533dea7

add "yaml.v3" vendor dependency

view details

Travis Clarke

commit sha 8d8ee742e7d259895b6cb7b6974c9ca2a0693305

define prow "config-src" to ensure "config.go" source file is available

view details

Cole Wagner

commit sha 8aa5063a936eeb0453c7b03d265b6c9e9092adba

Add local output mode to pod utilities.

view details

Cole Wagner

commit sha 1a9b9743b93a8cc385c051c89c1bba65ab9470f9

Add support for local pods to mkpod and include a script for running local pods with kind.

view details

Nikhita Raghunath

commit sha ff290e0b952e0de4bac7213ea53972137dd1099a

Add label for sig-usability

view details

Matthias Bertschy

commit sha 4d57b9f65f432ce9d5247f8ffe2329fdb37ef020

Use httptest for grumpy cat image in tests

view details

Nikhita Raghunath

commit sha f9cb83a9f63068e81e1c45dbce19d3a13feb9979

Update CoCC label to committee/code-of-conduct To stay consistent with other SIG/WG/UG/Committee labels.

view details

Kubernetes Prow Robot

commit sha cf69342a0364f3a31106ebb31b332a7ee821d1ef

Merge pull request #13678 from matthyx/cat-tests Use httptest for grumpy cat image in tests

view details

Kubernetes Prow Robot

commit sha 67ae2706fae88872de58908d0f04801de0af8f1d

Merge pull request #13636 from chases2/configurator-default Enforcement of single-default in Configurator

view details

Cole Wagner

commit sha e57d6671d0084569da7416a6f411a10a6869ac25

Make general and k8s specific versions of pj-on-kind.sh. Also switches to building mkpj and mkpod with go instead of bazel.

view details

push time in 2 months

push eventbrahmaroutu/test-infra

Cosmin Cojocar

commit sha ebe56e4d5e71fd586a6f60e0017647fc9c0b7e88

Make sure in the pipeline controller that the in-cluster and default cluster alias do not point to the same cluster when all contexts are allowed Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>

view details

Cosmin Cojocar

commit sha a8d2e8662a26c2681ebf644c0be5b85f044e3112

Make sure in the build controller that the in-cluster and default cluster alias do not point to the same cluster when all contexts are allowed Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>

view details

Cosmin Cojocar

commit sha 2950daecfe0365053ea709aed2b19da3ec8092b8

Remove alays the InClusterContext since the controller maps it to DefaultClusterAlias Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>

view details

Mateusz Szostok

commit sha c57d932a349a72303148b7502d13e3e910a05f60

Split the xbuild job for the Service Catalog images

view details

Stephen Augustus

commit sha f9b2560fc974eb0300c088e74a6b6aa40245bc10

sig-release: Add/update jobs for building debs/rpms Signed-off-by: Stephen Augustus <saugustus@vmware.com>

view details

Antonio Ojea

commit sha dc4d1de65d8538c6532443ad2f9ec6e5e7ad44c0

Set up kind jobs for 1.15 release

view details

Cole Wagner

commit sha 53b6b0a976b3394c4606d37bba25cecec50be062

Allow mkpod to autogenerate buildID when 'snowflake' is specified.

view details

Miranda Christ

commit sha 4bc4791b40fa5ceea9e14cf56e44721439cdf8a6

Reduce use of query params for /rerun

view details

Miranda Christ

commit sha 43ebd67f257345612b1a5f58de80e7ac354e39c0

Fix cookie related bug

view details

Alvaro Aleman

commit sha c0ddc2f4ec3b28ce9e2c0623d3c3023c2ddb51d5

Revert "Clean up pods whose ProwJob is in aborted state" This reverts commit 3718d95a58b9099de2e3ee247622bd5602a0dd86. This is supposed to be configured with Planks `AllowCancellations` setting.

view details

Marko Mudrinić

commit sha 89fe6f6090b5152b18ce059d0d26653479043b03

Add an option to skip DCO check for trusted users

view details

Aaron Crickenberger

commit sha bd382a7bb34753f23dc1842873fe13e0dd5ad5f7

Add area/github-management to kubernetes/test-infra I'd like to track what peribolos work the github-manage subproject does and does not have on its radar

view details

mtail

commit sha 3d5d9a8ff124687ce360336fff7b71cd4208dc81

Add support for labels to trigger cherry pick semantics. - For use in Istio, this makes it possible to trigger auto-cherry-pick semantics based on labels applied to a PR. The specific labels have the form action/charrypick-to-XXX where XXX is the name of a branch.

view details

mtail

commit sha f8b811c9f891eeb658026fe7ea50922c52386828

Support both comments and labels at the same time.

view details

mtail

commit sha cc5f166a9061c4ec99e3fbfb9fac67ab6f0cbf54

Address more feedback.

view details

Sebastien Vas

commit sha e836db2ea49d5a62a409de3d66b159de09e711f5

Fix Mason to DRLC migration and Performance Improvements Fix Boskos Sync to not delete resources when upgrading from previous mason resources to DRLC. We now consider types from current and new configuration to define if DRLC needs to be removed. Removed updates during sync unless necessary, ie configuration change, and updated to improve data type usage for performance improvements.

view details

Sebastien Vas

commit sha b761e167758b23d0b1840e9ef18bd6c129f359e7

Add a test for migration and update existing ones.

view details

Kubernetes Prow Robot

commit sha 3fcdcc18e0b10352f5c75bdd49ef35ee03bf5e25

Merge pull request #13479 from mirandachrist/deck2 Reduce use of query params for /rerun

view details

mtail

commit sha 2659ee50dfee2d768f2f13a6dc571854903b5528

Address feedback.

view details

Kubernetes Prow Robot

commit sha 29f098a422c361e7ab812ac85c3ed6a698a0c9a5

Merge pull request #13549 from geeknoid/master Add support for labels to trigger cherry pick semantics.

view details

push time in 2 months

delete branch brahmaroutu/kubernetes

delete branch : nfs_metrics

delete time in 3 months

create barnchbrahmaroutu/kubernetes

branch : conf_releasebuild2

created branch time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_serviceaccount

delete time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_sched

delete time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_node

delete time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_network

delete time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_kubectl

delete time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_common

delete time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_apps

delete time in 3 months

delete branch brahmaroutu/kubernetes

delete branch : conf_CRD

delete time in 3 months

pull request commentkubernetes/test-infra

Provide automated way of updating repo project boards.

@cjwagner @stevekuznetsov Can you please review. I would like to get this functionality in ASAP.

brahmaroutu

comment created time in 3 months

more