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 multiarch specific fixes to the pipeline tests #3107

Merged
merged 1 commit into from
Aug 18, 2020

Conversation

barthy1
Copy link
Member

@barthy1 barthy1 commented Aug 17, 2020

Changes

Code to run the tests has many amd64 specific images.
Tests fail on non amd64 architecture because of that.
This code provides one place to keep multiarch
specific updates, separated for each architecture.

Multiarch utils do following:

  • replace image names to arch specific ones where it is applicable
  • skip the tests, which fail for non amd64 arch now, based on test name
    and architecture
  • skipping will be applied for e2e and examples tests

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:

Release Notes

Add multiarch specific fixes to the tests

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 17, 2020
@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 17, 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.

@vdemeester
Copy link
Member

/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. needs-ok-to-test Indicates a PR that requires an org member to verify it 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 17, 2020
@vdemeester
Copy link
Member

/kind misc

@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Aug 17, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/multiarch_utils.go Do not exist 75.0%

test/examples_test.go Outdated Show resolved Hide resolved
@@ -50,7 +51,26 @@ func init() {
flag.BoolVar(&skipRootUserTests, "skipRootUserTests", false, "Skip tests that require root user")
}

func excludeForArchitecture(callerLevel int) bool {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

added comment to explain what is going on

test/multiarch_utils.go Outdated Show resolved Hide resolved
@barthy1 barthy1 force-pushed the multi_arch_test_images branch from 6c12e0a to 04fb452 Compare August 17, 2020 15:06
@tekton-robot tekton-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 17, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/multiarch_utils.go Do not exist 75.0%

test/init_test.go Outdated Show resolved Hide resolved
test/multiarch_utils.go Outdated Show resolved Hide resolved
test/init_test.go Outdated Show resolved Hide resolved
test/init_test.go Outdated Show resolved Hide resolved
@barthy1 barthy1 force-pushed the multi_arch_test_images branch from 04fb452 to d594db1 Compare August 17, 2020 21:46
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/multiarch_utils.go Do not exist 75.0%

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

Comment on lines 313 to 311
if IsExcluded(t.Name()) {
t.Skipf("skip for %s architecture", runtime.GOARCH)
}

Copy link
Member

Choose a reason for hiding this comment

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

nit: As this is duplicated a bunch of times, this could even be a function : skipIfExcluded(t.Name()).

Copy link
Member Author

Choose a reason for hiding this comment

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

good point! will do

Copy link
Member Author

Choose a reason for hiding this comment

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

however it will be skipIfExcluded(t), as we need t to skip it

Copy link
Member

Choose a reason for hiding this comment

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

true 😁

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2020
Test code has many amd64 specific images.
Tests fail on non amd64 architecture because of that.
This code provides one place to keep multiarch
specific updates, separated for each architecture.

Multiarch utils do following:
- replace image names to arch specific ones whete it is applicable
- skip the tests, which fail for non amd64 arch now, based on test name
 and architecture
- skipping will be applied for e2e and examples tests

Signed-off-by: Yulia Gaponenko <[email protected]>
@barthy1 barthy1 force-pushed the multi_arch_test_images branch from d594db1 to 15723e4 Compare August 18, 2020 10:22
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2020
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 18, 2020
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/multiarch_utils.go Do not exist 58.8%

@barthy1
Copy link
Member Author

barthy1 commented Aug 18, 2020

/retest

@dlorenc
Copy link
Contributor

dlorenc commented Aug 18, 2020

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dlorenc

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 18, 2020
@tekton-robot tekton-robot merged commit 7d7119a into tektoncd:master Aug 18, 2020
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/misc Categorizes issue or PR as a miscellaneuous one. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants