Add set_select to set attr value to a select#1153
Merged
vladmos merged 2 commits intobazelbuild:masterfrom Apr 24, 2023
Merged
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
3ce098f to
83543bf
Compare
Contributor
Author
|
Ready for review. |
Contributor
Author
|
@vladmos @pmbethe09 @meisterT can you please take a look? |
vladmos
reviewed
Apr 11, 2023
edit/buildozer_test.go
Outdated
| func TestCmdSetSelect(t *testing.T) { | ||
| buildFile := `foo( | ||
| name = "foo", | ||
| )` |
Member
There was a problem hiding this comment.
Could you please add other test cases where 1. a select statement already exists, 2. the attribute already exists but not a select statement?
Contributor
Author
There was a problem hiding this comment.
Thanks for the review, ready for another look.
vladmos
approved these changes
Apr 11, 2023
e4a7b29 to
12c84c5
Compare
This code change adds a new command `set_select` which allows setting the value of an attribute to a call to `select` and builds the dict using the KVs passed to it. Example call: ``` set_select <attr> <key_1> <value_1> <key_n> <value_n> ```
12c84c5 to
fd73c9a
Compare
healthy-pod
pushed a commit
to healthy-pod/cockroach
that referenced
this pull request
May 2, 2023
We manage unit tests timeouts at two levels: 1. Bazel timeout, by default [60s,300s,900s,3600s] for [small,medium,large,enormous] targets. 2. Go timeout, set to 5 seconds less than the corresponding Bazel timeout [see cockroachdb#86363]. Previously, unit tests used the same timeouts both when running in `Bazel Essential CI` and elsewhere. As a result, enormous test targets inherited a timeout of 1 hour from Bazel's default timeout. This is way beyond the expected time needed by any test target in `Bazel Essential CI`. We can't change enormous targets to large ones for two reasons: 1. `Enormous` is also used to indicate the resources needed by a test target. 2. `Enormous` test targets may still need the large timeout when running locally. To make this possible, we needed to support setting an `attr` value to a `select` using Buildozer. This was done in bazelbuild/buildtools#1153. This change only affects the timeout of `enormous` test targets. It however makes it simple to customize the timeout of other test sizes if desired in the future. Release note: None Epic: none
healthy-pod
pushed a commit
to healthy-pod/cockroach
that referenced
this pull request
May 2, 2023
We manage unit tests timeouts at two levels: 1. Bazel timeout, by default [60s,300s,900s,3600s] for [small,medium,large,enormous] targets. 2. Go timeout, set to 5 seconds less than the corresponding Bazel timeout [see cockroachdb#86363]. Previously, unit tests used the same timeouts both when running in `Bazel Essential CI` and elsewhere. As a result, enormous test targets inherited a timeout of 1 hour from Bazel's default timeout. This is way beyond the expected time needed by any test target in `Bazel Essential CI`. We can't change enormous targets to large ones for two reasons: 1. `Enormous` is also used to indicate the resources needed by a test target. 2. `Enormous` test targets may still need the large timeout when running locally. To make this possible, we needed to support setting an `attr` value to a `select` using Buildozer. This was done in bazelbuild/buildtools#1153. This change only affects the timeout of `enormous` test targets. It however makes it simple to customize the timeout of other test sizes if desired in the future. Release note: None Epic: none
craig bot
pushed a commit
to cockroachdb/cockroach
that referenced
this pull request
May 6, 2023
102719: *: customize the timeouts used by unit tests in `Bazel Essential CI` r=rickystewart a=healthy-pod We manage unit tests timeouts at two levels: 1. Bazel timeout, by default [60s,300s,900s,3600s] for [small,medium,large,enormous] targets. 2. Go timeout, set to 5 seconds less than the corresponding Bazel timeout [see #86363]. Previously, unit tests used the same timeouts both when running in `Bazel Essential CI` and elsewhere. As a result, enormous test targets inherited a timeout of 1 hour from Bazel's default timeout. This is way beyond the expected time needed by any test target in `Bazel Essential CI`. We can't change enormous targets to large ones for two reasons: 1. `Enormous` is also used to indicate the resources needed by a test target. 2. `Enormous` test targets may still need the large timeout when running locally. To make this possible, we needed to support setting an `attr` value to a `select` using Buildozer. This was done in bazelbuild/buildtools#1153. This change only affects the timeout of `enormous` test targets. It however makes it simple to customize the timeout of other test sizes if desired in the future. Release note: None Epic: none Co-authored-by: healthy-pod <ahmad@cockroachlabs.com>
apattidb
pushed a commit
to databricks/buildtools
that referenced
this pull request
May 10, 2024
This code change adds a new command `set_select` which allows setting the value of an attribute to a call to `select` and builds the dict using the KVs passed to it. Example call: ``` set_select <attr> <key_1> <value_1> <key_n> <value_n> ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code change adds a new command
set_selectwhich allows setting the value of an attribute to a call toselectand builds the dict using the KVs passed to it.Example call: