Skip to content

Commit

Permalink
Revert "Merge pull request kubernetes#20790 from fejta/bazel"
Browse files Browse the repository at this point in the history
This reverts commit 2032a07, reversing
changes made to 76ffa49.
  • Loading branch information
alvaroaleman committed Feb 9, 2021
1 parent 054b6f3 commit e20f295
Show file tree
Hide file tree
Showing 32 changed files with 3,422 additions and 3,643 deletions.
6 changes: 4 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
common --experimental_allow_incremental_repository_updates

# populate env used for stamping builds etc
build --workspace_status_command=./hack/print-workspace-status.sh
run --workspace_status_command=./hack/print-workspace-status.sh

# https://github.com/kubernetes/test-infra/issues/13140
build --incompatible_disable_deprecated_attr_params=false
query --incompatible_disable_deprecated_attr_params=false

# enable data race detection
test --features=race --test_output=errors

Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.1
3.1.0
13 changes: 9 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,23 @@ load("@io_bazel_rules_k8s//k8s:k8s.bzl", "k8s_repositories")

k8s_repositories()

# TODO(fejta): node repositories
load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")

yarn_install(
name = "npm",
# Updating yarn.lock? Set frozen_lockfile=False,
frozen_lockfile = True,
package_json = "//:package.json",
quiet = True,
yarn_lock = "//:yarn.lock",
)

load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")

install_bazel_dependencies()

load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")

ts_setup_workspace()

load("@rules_python//python:pip.bzl", "pip_import")

pip_import(
Expand Down
32 changes: 0 additions & 32 deletions def/ts.bzl

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
github.com/andygrunwald/go-gerrit v0.0.0-20190120104749-174420ebee6c
github.com/andygrunwald/go-jira v1.13.0
github.com/aws/aws-sdk-go v1.31.12
github.com/bazelbuild/buildtools v0.0.0-20200922170545-10384511ce98
github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89
github.com/blang/semver v3.5.1+incompatible
github.com/bwmarrin/snowflake v0.0.0
github.com/clarketm/json v1.13.4
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ github.com/aws/aws-sdk-go v1.31.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZve
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89 h1:3B/ZE1a6eEJ/4Jf/M6RM2KBouN8yKCUcMmXzSyWqa3g=
github.com/bazelbuild/buildtools v0.0.0-20190917191645-69366ca98f89/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
github.com/bazelbuild/buildtools v0.0.0-20200922170545-10384511ce98 h1:OhVnC5zU5QHQ+DUSmgOTPqPnJnrlFmrh2S0HKeHmpbw=
github.com/bazelbuild/buildtools v0.0.0-20200922170545-10384511ce98/go.mod h1:5JP0TXzWDHXv8qvxRC4InIazwdyDseBDbzESUMKk1yU=
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
Expand Down
6 changes: 4 additions & 2 deletions gopherage/cmd/html/static/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package(default_visibility = ["//visibility:public"])

load("//def:ts.bzl", "jasmine_node_test", "rollup_bundle", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test")
load("@npm_bazel_typescript//:index.bzl", "ts_library")

ts_library(
name = "utils",
Expand All @@ -21,7 +23,6 @@ jasmine_node_test(
srcs = [
":utils_test_lib",
],
templated_args = ["--bazel_patch_module_resolver"],
deps = [
"@npm//jasmine",
],
Expand All @@ -47,6 +48,7 @@ ts_library(

rollup_bundle(
name = "zz.browser_bundle",
enable_code_splitting = False,
entry_point = ":browser.ts",
deps = [
":browser",
Expand Down
5 changes: 3 additions & 2 deletions hack/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@py3_deps//:requirements.bzl", "requirement")
load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary", "nodejs_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "nodejs_test")

package(default_visibility = ["//visibility:public"])

Expand Down Expand Up @@ -258,7 +258,7 @@ sh_binary(
name = "update-gopherage",
srcs = ["update-gopherage.sh"],
data = [
"//gopherage/cmd/html/static:browser_bundle.es2015.js",
"//gopherage/cmd/html/static:zz.browser_bundle.es2015.js",
],
)

Expand All @@ -267,6 +267,7 @@ sh_test(
srcs = ["verify-gopherage.sh"],
data = [
"//gopherage/cmd/html/static:browser_bundle.es2015.js",
"//gopherage/cmd/html/static:zz.browser_bundle.es2015.js",
],
tags = ["lint"],
)
Expand Down
3 changes: 0 additions & 3 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ listergen=$PWD/$4
go_bindata=$PWD/$5
do_clean=${6:-}

# Ensure correct go binary is on path
PATH=$go_sdk/bin:${PATH:-}

cleanup() {
if [[ -n ${fake_gopath:-} ]]; then chmod u+rwx -R $fake_gopath && rm -rf $fake_gopath; fi
if [[ -n ${TEMP_GOCACHE:-} ]]; then rm -rf $TEMP_GOCACHE; fi
Expand Down
3 changes: 1 addition & 2 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ if ! command -v bazel &>/dev/null; then
exit 1
fi

bazel=$(command -v bazelisk || command -v bazel)
set -o xtrace
"$bazel" run @io_k8s_repo_infra//hack:update-deps -- "$@"
bazel run @io_k8s_repo_infra//hack:update-deps -- "$@"
10 changes: 5 additions & 5 deletions load.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def repositories():
if not native.existing_rule("io_k8s_repo_infra"):
http_archive(
name = "io_k8s_repo_infra",
sha256 = "2f30f87259fed7262d9b95b2665e3d3ecd928d174a4f0356063bc99056b6f84c",
strip_prefix = "repo-infra-0.2.0",
strip_prefix = "repo-infra-0.1.3",
sha256 = "46933bedbd22bc6a26ec6116d0d3e1475ad6b23447648d19abd6493241323311",
urls = [
"https://github.com/kubernetes/repo-infra/archive/v0.2.0.tar.gz",
"https://github.com/kubernetes/repo-infra/archive/v0.1.3.tar.gz",
],
)

Expand All @@ -43,8 +43,8 @@ def repositories():
# https://github.com/bazelbuild/rules_nodejs
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "dd4dc46066e2ce034cba0c81aa3e862b27e8e8d95871f567359f7a534cccb666",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.1.0/rules_nodejs-3.1.0.tar.gz"],
sha256 = "9abd649b74317c9c135f4810636aaa838d5bea4913bfa93a85c2f52a919fdaf3",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.36.0/rules_nodejs-0.36.0.tar.gz"],
)

# Python setup
Expand Down
19 changes: 4 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,17 @@
"moment": "^2.22.2",
"pako": "^1.0.10"
},
"bazel-update-info": {
"WORKSPACE": "NB: set frozen_lockfile = False"
},
"devDependencies": {
"@bazel/bazelisk": "^1.5.0",
"@bazel/jasmine": "3.1.0",
"@bazel/rollup": "^3.1.0",
"@bazel/terser": "^3.1.0",
"@bazel/typescript": "^3.1.0",
"@rollup/plugin-commonjs": "14.0.0",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "8.4.0",
"@bazel/bazel": "0.27.0",
"@bazel/jasmine": "0.36.0",
"@bazel/typescript": "0.36.0",
"@types/color": "^3.0.0",
"@types/google.visualization": "^0.0.43",
"@types/gtag.js": "^0.0.0",
"@types/jasmine": "~3.3.13",
"@types/pako": "^1.0.1",
"jasmine": "~3.4.0",
"rollup": "2.3.4",
"rollup-plugin-amd": "4.0.0",
"terser": "4.4.0",
"tslint": "^5.12.1",
"typescript": "^3.7.5"
"typescript": ">=2.8 <2.9"
}
}
15 changes: 0 additions & 15 deletions prow/cmd/deck/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,6 @@ container_image(
],
)

sh_test(
name = "validate-static-files",
srcs = [
"validate-static-files.sh",
],
args = [
"$(locations :templates)",
"$(locations //prow/cmd/deck/static)",
],
data = [
":templates",
"//prow/cmd/deck/static",
],
)

go_binary(
name = NAME,
data = [
Expand Down
29 changes: 19 additions & 10 deletions prow/cmd/deck/static/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package(default_visibility = ["//visibility:public"])

load("//def:ts.bzl", "jasmine_node_test", "rollup_bundle", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
load("@npm_bazel_jasmine//:index.bzl", "jasmine_node_test")
load("@npm_bazel_typescript//:index.bzl", "ts_library")

ts_library(
name = "api",
Expand Down Expand Up @@ -53,14 +55,14 @@ jasmine_node_test(
srcs = [
":prow_test_lib",
],
templated_args = ["--bazel_patch_module_resolver"],
deps = [
"@npm//jasmine",
],
)

rollup_bundle(
name = "prow_bundle",
enable_code_splitting = False,
entry_point = ":prow/prow.ts",
deps = [
":prow",
Expand All @@ -79,6 +81,7 @@ ts_library(

rollup_bundle(
name = "plugin_help_bundle",
enable_code_splitting = False,
entry_point = ":plugin-help/plugin-help.ts",
deps = [
":plugin_help",
Expand All @@ -98,6 +101,7 @@ ts_library(

rollup_bundle(
name = "pr_bundle",
enable_code_splitting = False,
entry_point = "pr/pr.ts",
deps = [
":pr",
Expand All @@ -117,6 +121,7 @@ ts_library(

rollup_bundle(
name = "tide_bundle",
enable_code_splitting = False,
entry_point = ":tide/tide.ts",
deps = [
":tide",
Expand All @@ -136,6 +141,7 @@ ts_library(

rollup_bundle(
name = "tide_history_bundle",
enable_code_splitting = False,
entry_point = ":tide-history/tide-history.ts",
deps = [
":tide_history",
Expand All @@ -154,6 +160,7 @@ ts_library(

rollup_bundle(
name = "command_help_bundle",
enable_code_splitting = False,
entry_point = ":command-help/command-help.ts",
deps = [
":command_help",
Expand Down Expand Up @@ -185,6 +192,7 @@ ts_library(

rollup_bundle(
name = "spyglass_bundle",
enable_code_splitting = False,
entry_point = ":spyglass/spyglass.ts",
deps = [
":spyglass",
Expand All @@ -194,6 +202,7 @@ rollup_bundle(

rollup_bundle(
name = "spyglass_lens_bundle",
enable_code_splitting = False,
entry_point = ":spyglass/lens.ts",
deps = [
":spyglass_common",
Expand Down Expand Up @@ -232,14 +241,14 @@ filegroup(
filegroup(
name = "all-scripts",
srcs = [
":command_help_bundle.min",
":plugin_help_bundle.min",
":pr_bundle.min",
":prow_bundle.min",
":spyglass_bundle.min",
":spyglass_lens_bundle.min",
":tide_bundle.min",
":tide_history_bundle.min",
":command_help_bundle",
":plugin_help_bundle",
":pr_bundle",
":prow_bundle",
":spyglass_bundle",
":spyglass_lens_bundle",
":tide_bundle",
":tide_history_bundle",
],
)

Expand Down
2 changes: 1 addition & 1 deletion prow/cmd/deck/static/pr/pr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ window.onload = () => {
window.location.search = "?query=" + encodeURIComponent(searchQuery);
}
const request = createXMLHTTPRequest((r) => {
const prData = JSON.parse(r.responseText) as UserData;
const prData = JSON.parse(r.responseText);
redraw(prData);
loadProgress(false);
}, () => {
Expand Down
2 changes: 1 addition & 1 deletion prow/cmd/deck/static/prow/prow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ function redraw(fz: FuzzySearch, pushState: boolean = true): void {
const rerunStatus = getParameterByName("rerun");
const modal = document.getElementById('rerun')!;
const rerunCommand = document.getElementById('rerun-content')!;
window.onclick = (event: any) => {
window.onclick = (event) => {
if (event.target === modal) {
modal.style.display = "none";
}
Expand Down
Loading

0 comments on commit e20f295

Please sign in to comment.