dora-metrics / pelorus

Automate the measurement of organizational behavior
https://pelorus.readthedocs.io/
Apache License 2.0
245 stars 83 forks source link

Fixed issue with projects field in the failuretime exporter using Azure DevOps #1122

Closed jkmattatall closed 7 months ago

jkmattatall commented 10 months ago

Problem: If an Azure DevOps server has a project name with a space in it ("Test Project" for example), the projects variable in _exporters/failure/collector_azuredevops.py separates the project into two, causing it not to pick up the project. In the documentation the environment variable for projects asks for a "comma separated list of strings" here, yet a space causes it to be separated as well.

Example: The project "Test Project" would be separated into ["Test", "Project"], meaning "Test Project" would never be picked up by the failuretime exporter. Whereas we would want it to be separated to ["Test Project"].

Solution: Use the provided comma_separated function to properly separate the projects provided to the failuretime exporter.

openshift-ci[bot] commented 10 months ago

Hi @jkmattatall. Thanks for your PR.

I'm waiting for a dora-metrics member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
jkmattatall commented 10 months ago

/retest

jkmattatall commented 10 months ago

/retest

jkmattatall commented 10 months ago

/test 4.13-e2e-openshift

github-actions[bot] commented 10 months ago

Test images available! ๐Ÿงช๐Ÿš€ To test operator with them, run

operator-sdk run bundle \
quay.io/pelorus/rc-pelorus-operator-bundle:vpr1122-7762c97 \
--namespace test-pelorus-operator

To clean up environment afterwards, run

operator-sdk cleanup pelorus-operator --namespace test-pelorus-operator
jkmattatall commented 10 months ago

/retest

jkmattatall commented 10 months ago

@mateusoliveira43 Hey there! Looking for some assistance with this PR and I noticed you were the one who worked on most/all of the code I'm looking at.

From my view, the change I made only makes it so that whitespaces are allowed within project names for the Azure DevOps failuretime exporter specifically. I've checked the Jira failuretime exporter files (where the OpenShift job seems to be failing), and it seems like there's no reference to the collector_azure_devops.py file, which means no reference to the change I made.

It seems like the comma_or_whitespace_separated() and comma_separated() methods both have the same input/output types, the change shouldn't make any difference in building besides in testing. However, in the Azure DevOps failuretime exporter test files, it seems like all projects variables aren't whitespace separated anyways, therefore the output should be the same.

Either I am missing something or the build would be borked anyways without my change. Thanks!

Edit: Looks like perhaps by default tests will fail? I'm unable to find a relation from my changes to the test failure.

openshift-ci[bot] commented 10 months ago

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

:memo: Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci[bot] commented 10 months ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign etsauer for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/dora-metrics/pelorus/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
github-actions[bot] commented 10 months ago

Test images available! ๐Ÿงช๐Ÿš€ To test operator with them, run

operator-sdk run bundle \
quay.io/pelorus/rc-pelorus-operator-bundle:vpr1122-563fd5d \
--namespace test-pelorus-operator

To clean up environment afterwards, run

operator-sdk cleanup pelorus-operator --namespace test-pelorus-operator
openshift-ci[bot] commented 10 months ago

@jkmattatall: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/4.13-e2e-openshift 68ea0d57000242f1ff7a21d58e73c9bcd2519b8f link true /test 4.13-e2e-openshift

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).