Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user group ID for each buildpack step #451

Merged
merged 1 commit into from
Oct 29, 2020
Merged

Add user group ID for each buildpack step #451

merged 1 commit into from
Oct 29, 2020

Conversation

xiujuan95
Copy link
Contributor

Fix issue: #450

Now, paketo builder image is consuming lifecycle 0.9.2 version. When switch to 0.9.2, restore step failed because exec as user 1000:1000: operation not permitted.

About this issue, I discuss with community and go through changes between lifecycle 0.9.1 and 0.9.2. Role error has been bubbled up. Before this error indeed exists, but just doesn't been thrown out. So we should specify the group ID, otherwise, each step will fail because exec as user 1000:1000: operation not permitted.

I have verified and this solution works.

Besides, below change just a revert operation for this pr :

git diff --quiet -- ':(exclude)go.mod' ':(exclude)go.sum' ':(exclude)vendor/*'

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 28, 2020
@openshift-ci-robot
Copy link

Hi @xiujuan95. Thanks for your PR.

I'm waiting for a shipwright-io 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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@xiujuan95
Copy link
Contributor Author

@zhangtbj Pls also help review, thanks!

@zhangtbj
Copy link
Contributor

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 28, 2020
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 28, 2020
@SaschaSchwarze0
Copy link
Member

@xiujuan95 the build is now red with the git diff back in.

@xiujuan95
Copy link
Contributor Author

@SaschaSchwarze0 Yes, do you have any clue about this? I don't have one. I am trying to figure out it.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2020
@xiujuan95
Copy link
Contributor Author

@adambkaplan Please help review this PR, especially for these modifications in below files:

pkg/controller/fakes/client.go
pkg/controller/fakes/manager.go
pkg/controller/fakes/status_writer.go

These changes appear when I run hack/generate-fakes.sh script. If I don't modify above three files, then git diff --quiet -- ':(exclude)go.mod' ':(exclude)go.sum' ':(exclude)vendor/*' will exit with 1. This is causing my travis failed.

Actually, I have a question about make generate.
According to this command, I think some new code changes should be generated after run make generate command.

However, against command git diff --quiet -- ':(exclude)go.mod' ':(exclude)go.sum' ':(exclude)vendor/*', new code changes are not expected. Because if there has any code changes, then this command will exit with 1.

Isn't this a conflict?

Not sure if I get something wrong? If it's true, pls correct me, thanks in advance!

@SaschaSchwarze0
Copy link
Member

@adambkaplan Please help review this PR, especially for these modifications in below files:

pkg/controller/fakes/client.go
pkg/controller/fakes/manager.go
pkg/controller/fakes/status_writer.go

These changes appear when I run hack/generate-fakes.sh script. If I don't modify above three files, then git diff --quiet -- ':(exclude)go.mod' ':(exclude)go.sum' ':(exclude)vendor/*' will exit with 1. This is causing my travis failed.

Actually, I have a question about make generate.
According to this command, I think some new code changes should be generated after run make generate command.

However, against command git diff --quiet -- ':(exclude)go.mod' ':(exclude)go.sum' ':(exclude)vendor/*', new code changes are not expected. Because if there has any code changes, then this command will exit with 1.

Isn't this a conflict?

Not sure if I get something wrong? If it's true, pls correct me, thanks in advance!

I'll let @adambkaplan do the final clarification. My understanding is that we as developers are supposed to run make generate locally so that the generated files are created/updated and the committed. During the build, the same is run to verify that the developer did that. Means: git diff must not find any changes because the generated files are already up-to-date.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 589082e into shipwright-io:master Oct 29, 2020
@adambkaplan
Copy link
Member

My understanding is that we as developers are supposed to run make generate locally so that the generated files are created/updated and the committed. During the build, the same is run to verify that the developer did that. Means: git diff must not find any changes because the generated files are already up-to-date.

@SaschaSchwarze0 that is correct. make generate ensures our generated code is up to date, and that all code adheres to our coding conventions. make verify runs generate, then checks to see that no code has been altered.

We can improve the experience if make generate needs to be re-run - the exit 1 code from git diff is not helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants