| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Role previously mandated that all role strings starts with "role/". If the given string doesn't start with the prefix, Role prepends it. This is incorrect, since custom roles have format "projects/X/roles/Y". This PR makes Role a little smarter at prepending: we only prepend if the given string contains no slash; this keeps the previously-valid use valid. Fixes #2687.
|
Cool. Could you link to an official reference for this role behavior? |
Sorry, something went wrong.
|
@vchudnov-g I'm not sure what you mean by "behavior" here. Do you mean how it automatically prepends "roles/"? If so, this is not a "standard behavior". The problem is Roles is trying too hard to be useful. If you run Roles.of("owner"), "owner" is not a valid role but "roles/owner" is, so Roles helpfully prepends. However this makes custom roles impossible. Since custom role is in format "projects/X/roles/Y", calling Roles.of("projects/X/roles/Y") creates role "roles/projects/X/roles/Y". This PR makes it possible to refer to custom roles. Am I understanding you correctly? |
Sorry, something went wrong.
|
That explanation is helpful. My comment was about including a link to an official reference to what you explain about "roles/owner" vs "projects/X/roles/Y", just for documentation purposes. |
Sorry, something went wrong.
| assertEquals("roles/viewer", VIEWER.getValue()); | ||
| assertEquals("roles/editor", EDITOR.getValue()); | ||
| assertEquals("roles/owner", OWNER.getValue()); | ||
| assertThat(VIEWER.getValue()).isEqualTo("roles/viewer"); |
…storage to v3.11.3 (#2863) Co-authored-by: Phong Chuong <147636638+PhongChuong@users.noreply.github.com>
* fix: null field mode inconsistency * chore: update null field mode test name --------- Co-authored-by: PhongChuong <phong.hoa.chuong@gmail.com>
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.opentelemetry:opentelemetry-api](https://togithub.com/open-telemetry/opentelemetry-java) | `1.38.0` -> `1.39.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [io.opentelemetry:opentelemetry-bom](https://togithub.com/open-telemetry/opentelemetry-java) | `1.38.0` -> `1.39.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-java (io.opentelemetry:opentelemetry-api)</summary> ### [`v1.39.0`](https://togithub.com/open-telemetry/opentelemetry-java/blob/HEAD/CHANGELOG.md#Version-1390-2024-06-07) [Compare Source](https://togithub.com/open-telemetry/opentelemetry-java/compare/v1.38.0...v1.39.0) ##### API ##### Incubator - BREAKING: Refactor ExtendedTracer, ExtendedSpanBuilder to reflect incubating API conventions ([#​6497](https://togithub.com/open-telemetry/opentelemetry-java/pull/6497)) ##### SDK ##### Exporter - BREAKING: Serve prometheus metrics only on `/metrics` by default. To restore the previous behavior and serve metrics on all paths, override the default handler as [demonstrated here](https://togithub.com/open-telemetry/opentelemetry-java/blob/main/exporters/prometheus/src/test/java/io/opentelemetry/exporter/prometheus/PrometheusHttpServerTest.java#L251-L259). ([#​6476](https://togithub.com/open-telemetry/opentelemetry-java/pull/6476)) - Make OTLP exporter memory mode API public ([#​6469](https://togithub.com/open-telemetry/opentelemetry-java/pull/6469)) - Speed up OTLP string marshaling using sun.misc.Unsafe ([#​6433](https://togithub.com/open-telemetry/opentelemetry-java/pull/6433)) - Add exporter data classes for experimental profiling signal type. ([#​6374](https://togithub.com/open-telemetry/opentelemetry-java/pull/6374)) - Start prometheus http server with daemon thread ([#​6472](https://togithub.com/open-telemetry/opentelemetry-java/pull/6472)) - Update the Prometheus metrics library and improve how units are included in metric names. ([#​6473](https://togithub.com/open-telemetry/opentelemetry-java/pull/6473)) - Remove android animalsniffer check from prometheus exporter ([#​6478](https://togithub.com/open-telemetry/opentelemetry-java/pull/6478)) ##### Extensions - Load file config YAML using core schema, ensure that env var substitution retains string types. ([#​6436](https://togithub.com/open-telemetry/opentelemetry-java/pull/6436)) - Define dedicated file configuration SPI ComponentProvider ([#​6457](https://togithub.com/open-telemetry/opentelemetry-java/pull/6457)) ##### Tooling - Normalize timestamps and file ordering in jars, making the outputs reproducible ([#​6471](https://togithub.com/open-telemetry/opentelemetry-java/pull/6471)) - GHA for generating the post-release pull request ([#​6449](https://togithub.com/open-telemetry/opentelemetry-java/pull/6449)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/googleapis/sdk-platform-java). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQxMy4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
🤖 I have created a release *beep* *boop* --- <details><summary>2.42.0</summary> ## [2.42.0](googleapis/sdk-platform-java@v2.41.0...v2.42.0) (2024-06-25) ### Features * Allow Adding Client Level Attributes to MetricsTracerFactory ([#2614](googleapis/sdk-platform-java#2614)) ([e254528](googleapis/sdk-platform-java@e254528)) * gapic-generator-java to perform a no-op when no services are detected ([#2460](googleapis/sdk-platform-java#2460)) ([1612391](googleapis/sdk-platform-java@1612391)) * Make Layout Parser generally available in V1 ([30acafa](googleapis/sdk-platform-java@30acafa)) * populate `.repo-metadata.json` from highest version ([#2890](googleapis/sdk-platform-java#2890)) ([3bca9a4](googleapis/sdk-platform-java@3bca9a4)) * push SNAPSHOT versions of the hermetic build docker image ([#2888](googleapis/sdk-platform-java#2888)) ([8bc060b](googleapis/sdk-platform-java@8bc060b)) ### Bug Fixes * **deps:** update the Java code generator (gapic-generator-java) to 1.2.3 ([30acafa](googleapis/sdk-platform-java@30acafa)) * Expose Gax meter name ([#2865](googleapis/sdk-platform-java#2865)) ([2095f4a](googleapis/sdk-platform-java@2095f4a)) * Move the logic of getting systemProductName from static block to static method ([#2874](googleapis/sdk-platform-java#2874)) ([cf67770](googleapis/sdk-platform-java@cf67770)) * Update default Otel Attribute from method_name to method ([#2833](googleapis/sdk-platform-java#2833)) ([a88fdde](googleapis/sdk-platform-java@a88fdde)) ### Dependencies * update dependency com.google.auto.value:auto-value to v1.11.0 ([#2842](googleapis/sdk-platform-java#2842)) ([758bd17](googleapis/sdk-platform-java@758bd17)) * update dependency com.google.auto.value:auto-value-annotations to v1.11.0 ([#2843](googleapis/sdk-platform-java#2843)) ([bce5720](googleapis/sdk-platform-java@bce5720)) * update dependency com.google.cloud:grpc-gcp to v1.6.1 ([#2943](googleapis/sdk-platform-java#2943)) ([cfc6632](googleapis/sdk-platform-java@cfc6632)) * update dependency org.checkerframework:checker-qual to v3.44.0 ([#2848](googleapis/sdk-platform-java#2848)) ([7069aae](googleapis/sdk-platform-java@7069aae)) * update dependency org.easymock:easymock to v5.3.0 ([#2871](googleapis/sdk-platform-java#2871)) ([423167f](googleapis/sdk-platform-java@423167f)) * update google api dependencies ([#2846](googleapis/sdk-platform-java#2846)) ([a3d852e](googleapis/sdk-platform-java@a3d852e)) * update googleapis/java-cloud-bom digest to 17cc5ec ([#2882](googleapis/sdk-platform-java#2882)) ([09e4ea6](googleapis/sdk-platform-java@09e4ea6)) * update netty dependencies to v4.1.111.final ([#2877](googleapis/sdk-platform-java#2877)) ([6430ac2](googleapis/sdk-platform-java@6430ac2)) * update opentelemetry-java monorepo to v1.39.0 ([#2863](googleapis/sdk-platform-java#2863)) ([b0f2946](googleapis/sdk-platform-java@b0f2946)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Joe Wang <joewa@google.com>
The cleanup function used to remove old test databases did not remove the drop protection flag before trying to drop a database.
…#2863) BEGIN_COMMIT_OVERRIDE BEGIN_NESTED_COMMIT chore(storage/v2): Add new preview BidiReadObject API chore(storage/v2): Add new preview appendable Object to BidiWrite API chore(docs): Add IAM information to RPC comments for reference documentation PiperOrigin-RevId: 712942128 Source Link: [googleapis/googleapis@44ad570](googleapis/googleapis@44ad570) END_NESTED_COMMIT END_COMMIT_OVERRIDE --------- Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Role previously mandated that all role strings starts with "role/".
If the given string doesn't start with the prefix, Role prepends it.
This is incorrect, since custom roles have format "projects/X/roles/Y".
This PR makes Role a little smarter at prepending:
we only prepend if the given string contains no slash; this keeps the
previously-valid use valid.
Fixes #2687.