Repository: kubernetes-sigs/security-profiles-operator
Pull request #356 (2021-03-10 08:48:35)

Add jhrozek to reviewers
#### What type of PR is this?

/kind feature


#### What this PR does / why we need it:
@jhrozek continuous contributions to this project should be honored by
applying the `reviewers` role.
#### Which issue(s) this PR fixes:

<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.

Fixes #

or

None
-->
None
#### Does this PR have test?
None
<!--
If tests aren't applicable just write N/A.
-->

#### Special notes for your reviewer:

Question to @jhrozek: Do you want to be a reviewer for this project?

(You have to be part of the Kubernetes org to be able to do so, which means that this PR can be merged only afterwards)

/hold 
#### Does this PR introduce a user-facing change?

<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

For more information on release notes see: https://git.k8s.io/community/contributors/guide/release-notes.md
-->

```release-note
None
```


k8s-ci-robot: [Keywords](https://help.github.com/articles/closing-issues-using-keywords) which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.

**The list of commits with invalid commit messages**:

- [6f7b3cf](https://github.com/kubernetes-sigs/security-profiles-operator/commits/6f7b3cf2c85640df0f71c551015b95e3ad42e4e7) Add jhrozek to reviewers

<details>

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).
</details>

k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/security-profiles-operator/pull/356#" title="Author self-approved">saschagrunert</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fsecurity-profiles-operator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/security-profiles-operator/blob/master/OWNERS)~~ [saschagrunert]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
k8s-ci-robot: The following users are mentioned in OWNERS file(s) but are untrusted for the following reasons. One way to make the user trusted is to add them as [members](https://git.k8s.io/community/community-membership.md#member) of the kubernetes-sigs org. You can then trigger verification by writing `/verify-owners` in a comment.
- jhrozek
  - User is not a member of the org. Satisfy at least one of these conditions to make the user trusted.
jhrozek: > The following users are mentioned in OWNERS file(s) but are untrusted for the following reasons. One way to make the user trusted is to add them as [members](https://git.k8s.io/community/community-membership.md#member) of the kubernetes-sigs org. You can then trigger verification by writing `/verify-owners` in a comment.
> 
>     * jhrozek
>       
>       * User is not a member of the org. Satisfy at least one of these conditions to make the user trusted.

I received and accepted the invitations to both kubernetes and kubernetes-sigs
JAORMX: /verify-owners
JAORMX: /lgtm
JAORMX: /hold cancel
JAORMX: /verify-owners
k8s-ci-robot: New changes are detected. LGTM label has been removed.
k8s-ci-robot: @saschagrunert: you cannot LGTM your own PR.

<details>

In response to [this](https://github.com/kubernetes-sigs/security-profiles-operator/pull/356#pullrequestreview-609800455):

>/lgtm


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.
</details>
saschagrunert: > @saschagrunert: you cannot LGTM your own PR.

Every time worth a try.
codecov-io: # [Codecov](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/356?src=pr&el=h1) Report
> Merging [#356](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/356?src=pr&el=desc) (e4a87fc) into [master](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/commit/1de6f13d8debddd134ba51a61e87451e9860cac4?el=desc) (1de6f13) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/356/graphs/tree.svg?width=650&height=150&src=pr&token=37VIWSZ1ZT)](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/356?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master     #356   +/-   ##
=======================================
  Coverage   27.65%   27.65%           
=======================================
  Files          10       10           
  Lines         752      752           
=======================================
  Hits          208      208           
  Misses        525      525           
  Partials       19       19           
```

| Flag | Coverage Δ | |
|---|---|---|
| unittests | `27.65% <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.


------

[Continue to review full report at Codecov](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/356?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/356?src=pr&el=footer). Last update [1de6f13...e4a87fc](https://codecov.io/gh/kubernetes-sigs/security-profiles-operator/pull/356?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

k8s-ci-robot: @saschagrunert: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-security-profiles-operator-test-e2e | e4a87fc2a771635aab9a64967fdccfb63221b62d | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_security-profiles-operator/356/pull-security-profiles-operator-test-e2e/1370014298515968000) | `/test pull-security-profiles-operator-test-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=security-profiles-operator&pr=356). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Asaschagrunert). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/security-profiles-operator/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

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).
</details>
<!-- test report -->

Patch:
diff --git a/Makefile b/Makefile
index 0fcbf2c27..4e7e94183 100644
--- a/Makefile
+++ b/Makefile
@@ -174,7 +174,9 @@ vagrant-up: ## Boot the vagrant based test VM
 		$(CONTAINER_RUNTIME) save -o image.tar $(IMAGE); \
 	fi
 	ln -sf hack/ci/Vagrantfile .
-	vagrant up
+	# Retry in case provisioning failed because of some temporarily unavailable
+	# remote resource (like the VM image)
+	vagrant up || vagrant up || vagrant up
 
 # Verification targets
 
diff --git a/OWNERS b/OWNERS
index a246eeca7..dbf20512b 100644
--- a/OWNERS
+++ b/OWNERS
@@ -7,3 +7,4 @@ approvers:
 reviewers:
   - cmurphy
   - JAORMX
+  - jhrozek


Test patch:
diff --git a/test/tc_base_profiles_test.go b/test/tc_base_profiles_test.go
index 3b977b50f..9d491fe0c 100644
--- a/test/tc_base_profiles_test.go
+++ b/test/tc_base_profiles_test.go
@@ -21,6 +21,7 @@ import (
 	"io/ioutil"
 	"os"
 	"strings"
+	"time"
 )
 
 func (e *e2e) testCaseBaseProfile([]string) {
@@ -57,7 +58,6 @@ spec:
   containers:
   - image: quay.io/security-profiles-operator/test-hello-world:latest
     name: hello
-    resources: {}
   securityContext:
     seccompProfile:
       type: Localhost
@@ -78,6 +78,15 @@ spec:
 	e.kubectl("create", "-f", helloProfileFile.Name())
 	defer e.kubectl("delete", "-f", helloProfileFile.Name())
 
+	e.logf("Waiting for profile to be reconciled")
+	for i := 0; i < 20; i++ {
+		output := e.kubectl("get", "sp", "hello")
+		if strings.Contains(output, "hello") {
+			break
+		}
+		time.Sleep(time.Second)
+	}
+
 	e.logf("Creating hello-world pod")
 	helloPodFile, err := ioutil.TempFile(os.TempDir(), "hello-pod*.yaml")
 	e.Nil(err)
@@ -94,16 +103,16 @@ spec:
 	e.logf("Waiting for test pod to be initialized")
 	e.waitFor("condition=initialized", "pod", "hello")
 
-	output := e.kubectl("get", "pod", "hello")
-	for strings.Contains(output, "ContainerCreating") {
-		output = e.kubectl("get", "pod", "hello")
+	e.logf("Waiting for pod to be completed")
+	for i := 0; i < 20; i++ {
+		output := e.kubectl("get", "pod", "hello")
+		if strings.Contains(output, "Completed") {
+			break
+		}
+		time.Sleep(time.Second)
 	}
 
-	e.logf("Testing that container is launched without runtime permission errors")
-	output = e.kubectl("describe", "pod", "hello")
-	e.NotContains(output, "Error: failed to start containerd task")
-
 	e.logf("Testing that container ran successfully")
-	output = e.kubectl("logs", "hello")
+	output := e.kubectl("logs", "hello")
 	e.Contains(output, "Hello from Docker!")
 }