bazelbuild / rules_k8s

This repository contains rules for interacting with Kubernetes configurations / clusters.
Apache License 2.0
291 stars 136 forks source link

Windows compatibility changes #651

Closed luna-duclos closed 2 years ago

luna-duclos commented 3 years ago

This set of changes adds windows compatibility. The current code is not windows compatible because it directly uses executable bash scripts, which doesn't work on windows (it expects executables).

The fix is not overly difficult, and simply requires us to add sh_binary wrappers to the scripts and to adjust the guess_runfiles functions accordingly.

k8s-ci-robot commented 3 years ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: luna-duclos To complete the pull request process, please assign michelle192837 after the PR has been reviewed. You can assign the PR to them by writing /assign @michelle192837 in a comment when ready.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/bazelbuild/rules_k8s/blob/master/OWNERS)** 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 commented 3 years ago

Hi @luna-duclos. Thanks for your PR.

I'm waiting for a bazelbuild 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](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.
fejta commented 3 years ago

/ok-to-test

fejta commented 3 years ago

Please rebase when you get the chance

luna-duclos commented 3 years ago

@fejta Change has been rebased

fejta commented 3 years ago

Looks like this change breaks on linux

luna-duclos commented 3 years ago

It works for me, I dont think the current CI failures are related to my code at all, they appear in other branches too, no ?

fejta commented 3 years ago

Tests pass at head. The build failures are on account of your PR

On Sat, May 8, 2021, 07:00 Luna Duclos @.***> wrote:

It works for me, I dont think the current CI failures are related to my code at all, they appear in other branches too, no ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bazelbuild/rules_k8s/pull/651#issuecomment-835375226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHFSNIKOC6QXVQMFECE3O3TMU7XVANCNFSM43KJH7GA .

fejta commented 3 years ago

(I realize that all the other open PRs are also failing tests, but that is because we merged all the ones that pass tests :) see https://github.com/bazelbuild/rules_k8s/pulls?q=is%3Apr+is%3Aclosed)

So please do look into these failures when you get the chance!

ERROR: /home/prow/go/src/github.com/bazelbuild/rules_k8s/examples/hellohttp/java/BUILD:30:11: //examples/hellohttp/java:staging.create.script: no such attribute 'args' in '_k8s_object_create' rule

I suspect changing things from an executable to a script is having unintended side effects. I suspect you'll be able to repro on your machine by actually building all targets (bazelisk build -- ... -//images/gcloud-bazel:gcloud_push -//images/gcloud-bazel:gcloud_installer -//images/gcloud-bazel:gcloud_install -//images/gcloud-bazel:gcloud-layer as per the buildkite details

fejta commented 2 years ago

/retest

k8s-ci-robot commented 2 years ago

@luna-duclos: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-rules-k8s-e2e af2499ad095dacb5a6c40716e03f156e11204265 link true /test pull-rules-k8s-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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).
fejta commented 2 years ago

Would you like to try and fix up this PR or close it?

fejta commented 2 years ago

Please rebase and reopen if you're still interested in this