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

Run a ingress-gce script #29210

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

code-elinka
Copy link
Contributor

It is tricky to run a list of commands inside
config yamls. To do that it's better to run
a script. The script builds & pushes the e2e-test
image on multiarch.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. area/config Issues or PRs related to code in /config area/jobs sig/network Categorizes an issue or PR as relevant to SIG Network. sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Apr 3, 2023
@k8s-ci-robot k8s-ci-robot requested review from aojea and dims April 3, 2023 12:15
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 3, 2023
@code-elinka
Copy link
Contributor Author

/assign @panslava
/assign @aojea
/assign @swetharepakula

@code-elinka
Copy link
Contributor Author

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Apr 3, 2023
@mmamczur
Copy link

mmamczur commented Apr 3, 2023

looks ok, I don't have permission to approve though

@DamianSawicki
Copy link
Contributor

It seems to me that you have forgotten to add the file hack/run-make-cmd.sh to the commit.

@code-elinka
Copy link
Contributor Author

It seems to me that you have forgotten to add the file hack/run-make-cmd.sh to the commit.

It is a part of another commit: kubernetes/ingress-gce#2046

@DamianSawicki
Copy link
Contributor

I see, thanks for the clarification! I was looking for this file in https://github.com/kubernetes/test-infra/tree/7750f9b325a0ababc84e560e143bc282f6780d9f/hack 😅

@panslava
Copy link

panslava commented Apr 4, 2023

/lgtm

but I am not the owner of this repo

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 4, 2023
@code-elinka
Copy link
Contributor Author

/assign @dims

@dims
Copy link
Member

dims commented Apr 5, 2023

/assign @aojea

- ALL_ARCH=amd64 arm64
- CONTAINER_BINARIES=e2e-test
- --env=ALL_ARCH="amd64 arm64"
- --env=ARCH=$(dpkg --print-architecture)
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is correct, ARCH should define the target arch, not the one the job is running

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you know how to get a target ARCH in the script that test-infra runs?

Copy link
Member

Choose a reason for hiding this comment

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

Ok, then maybe I misunderstood it, why do you need the current arch for crosscompiling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@aojea In the Makefile we see an ARCH = amd64. To override it we need to pass the desired architecture.
Otherwise the script will try to build ALL_ARCH on the same machine. It will fail or, even worse, it will build something on a wrong arch and push a new image that will be hard to debug 🤣

We could change Makefile itself and run the $(dpkg --print-architecture) command inside of it. I am not sure it makes the difference.

but I am also not sure if running --env=ARCH=$(dpkg --print-architecture) will have the same result as running export ARCH=$(dpkg --print-architecture) inside building container

Copy link
Member

Choose a reason for hiding this comment

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

ok, got it, but the infra doesn't have arm workers at this moment so we can omit that step by now, besides is more correct as you say

we can also migrate the job, this will result in something like

  kubernetes/ingress-gce:
  - name: ci-ingress-gce-image-push
    decorate: true
    labels:
      preset-service-account: "true"
      preset-k8s-ssh: "true"
      preset-dind-enabled: "true"
    spec:
      containers:
      - image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20230328-17e539c80f-master
        command:
        - runner.sh
        - hack/run-make-cmd.sh
        securityContext:
          privileged: true
        env:
        - name: ALL_ARCH
          value: "amd64 arm64"
        - name: BINARY
          value: "e2e-test"
    annotations:
      testgrid-dashboards: sig-network-ingress-gce-e2e
      testgrid-tab-name: ingress-gce-image-push
      testgrid-alert-email: kubernetes-sig-network-test-failures@googlegroups.com

It is tricky to run a list of commands inside
config yamls. To do that it's better to run
a script. The script builds & pushes the e2e-test
image on multiarch.

Signed-off-by: Elina Akhmanova <elinka@google.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 12, 2023
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 12, 2023
@aojea
Copy link
Member

aojea commented Apr 12, 2023

/lgtm
/approve

Thanks 🤞

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 12, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, code-elinka

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2023
@k8s-ci-robot k8s-ci-robot merged commit 07797af into kubernetes:master Apr 12, 2023
@k8s-ci-robot
Copy link
Contributor

@code-elinka: Updated the job-config configmap in namespace default at cluster test-infra-trusted using the following files:

  • key ingress-gce-e2e.yaml using file config/jobs/kubernetes/sig-network/ingress-gce-e2e.yaml

In response to this:

It is tricky to run a list of commands inside
config yamls. To do that it's better to run
a script. The script builds & pushes the e2e-test
image on multiarch.

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.

@DamianSawicki
Copy link
Contributor

@code-elinka @aojea You guys should be sleeping now!

@aojea
Copy link
Member

aojea commented Apr 13, 2023

this is the OSS hour XD

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. area/config Issues or PRs related to code in /config area/jobs cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", 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. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants