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

fix TestTaskRunStatus e2e test to run on s390x #3061

Merged
merged 1 commit into from Aug 5, 2020

Conversation

barthy1
Copy link
Member

@barthy1 barthy1 commented Aug 5, 2020

Changes

TestTaskRunStatus test fails for s390x architecture because busybox
image in the code is specified with concrete SHA. SHA is unique for
each image and as a result for s390x case the amd64 image with the SHA
is pulled. Test failed.

Adding s390x specific SHA to s390x build solves this problem.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

Update the TestTaskRunStatus e2e test to work on s390x architectures.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 5, 2020
@tekton-robot tekton-robot requested review from imjasonh and a user August 5, 2020 13:15
@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 5, 2020
@tekton-robot
Copy link
Collaborator

Hi @barthy1. Thanks for your PR.

I'm waiting for a tektoncd 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.

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 5, 2020
@ghost
Copy link

ghost commented Aug 5, 2020

/ok-to-test

@tekton-robot tekton-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 Aug 5, 2020
@tekton-robot tekton-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 5, 2020
@barthy1
Copy link
Member Author

barthy1 commented Aug 5, 2020

Hi @sbwsg
I am new in this repo. I've got several reports about failing tests for this PR. But now I can see that only check-pr-has-kind-label failed. Is it good state for PR or I need to have a look at something?

Extra question, which golang tools or built-in make targets I need to use to verify my code? I used gofmt and got failed test with gocritic :(

@ghost
Copy link

ghost commented Aug 5, 2020

/kind feature

@tekton-robot tekton-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 5, 2020
@ghost
Copy link

ghost commented Aug 5, 2020

Hi @barthy1 thanks for the contribution!

It looks like all the tests are passing now and I've added a kind label. It would be great to add the following:

  1. Update commit message and PR description to match commit message format

  2. Add a release note to your PR description:

    Update the TestTaskRunStatus e2e test to work on s390x architectures.
    

@ghost
Copy link

ghost commented Aug 5, 2020

Also, just connecting the dots here, this looks related to #856

@ghost
Copy link

ghost commented Aug 5, 2020

Ah, sorry, missed the second part of your question:

Extra question, which golang tools or built-in make targets I need to use to verify my code? I used gofmt and got failed test with gocritic :(

I'm not familiar with gocritic unfortunately. Normally I just run make fmt and make golangci-lint. @vdemeester is there a way to run gocritic using the makefile?

@tekton-robot tekton-robot removed the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 5, 2020
TestTaskRunStatus test fails for s390x architecture because busybox
image in the code is specified with concrete SHA. SHA is unique for
each image and as a result for s390x case the amd64 image with the SHA
is pulled. Test failed.

Adding s390x specific SHA to s390x build solves this problem.

Signed-off-by: Yulia Gaponenko <yulia.gaponenko1@de.ibm.com>
@barthy1
Copy link
Member Author

barthy1 commented Aug 5, 2020

hey @sbwsg, thanks for the input.

  • I updated the PR as per your comments (hopefully)
  • make fmt + make golangci-lint is what I need here, thank you
  • fyi I've opened generic issue for future s390x fixes in pipeline repo s390x related fixes for tekton pipeline #3064. It's part of s390x activity to have Tekton running on Z.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbwsg

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2020
@vdemeester
Copy link
Member

Ah, sorry, missed the second part of your question:

Extra question, which golang tools or built-in make targets I need to use to verify my code? I used gofmt and got failed test with gocritic :(

I'm not familiar with gocritic unfortunately. Normally I just run make fmt and make golangci-lint. @vdemeester is there a way to run gocritic using the makefile?

It is doable 🙃 😝

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2020
@tekton-robot tekton-robot merged commit cb85f1d into tektoncd:master Aug 5, 2020
@@ -126,13 +127,17 @@ func TestTaskRunStatus(t *testing.T) {
taskRunName := "status-taskrun"

fqImageName := "busybox@sha256:895ab622e92e18d6b461d671081757af7dbaa3b00e3e28e12505af7817f73649"
if runtime.GOARCH == "s390x" {
fqImageName = "busybox@sha256:4f47c01fa91355af2865ac10fef5bf6ec9c7f42ad2321377c21e844427972977"
Copy link
Member

Choose a reason for hiding this comment

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

We have quite a lot of places that uses the busybox image around, maybe we can have a common function which could be extended easily for other architectures if needed ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fix is required only for places where busybox sha is specified directly. I identified 1 piece of code for e2e tests(fixed by this PR), and 2 pieces for examples.
Just busybox image is multi-arched, and expectation here, that if you have image: busybox statement it should run on all architectures without modifications.
Anyway, it's a good point for other cases (and can be applied even here), where image name for amd64 will be different to s390x or ppx64le names. Thank you for feedback, I will work on this extension.

Copy link
Member

Choose a reason for hiding this comment

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

awesome thank you! 🙇

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. kind/feature Categorizes issue or PR as related to a new feature. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants