fix: format strings#1004
Closed
jaqx0r wants to merge 666 commits into
Closed
Conversation
chore(deps): update dependency aspect_bazel_lib to v2.22.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.38.0 to 0.39.0. - [Commits](golang/sys@v0.38.0...v0.39.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-version: 0.39.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.38.0 to 1.39.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.38.0...v1.39.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel dependency-version: 1.39.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…x/sys-0.39.0 build(deps): bump golang.org/x/sys from 0.38.0 to 0.39.0
…metry.io/otel-1.39.0 build(deps): bump go.opentelemetry.io/otel from 1.38.0 to 1.39.0
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.38.0 to 1.39.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.38.0...v1.39.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-version: 1.39.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…metry.io/otel/sdk-1.39.0 build(deps): bump go.opentelemetry.io/otel/sdk from 1.38.0 to 1.39.0
…metric/otlpmetricgrpc to v1.39.0
fix(deps): update module go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc to v1.39.0
…l-0.x chore(deps): update bazel-contrib/setup-bazel action to v0.16.0
chore(deps): update dependency rules_pkg to v1.2.0
…tions chore(deps): update github artifact actions (major)
chore(deps): update dependency go to v1.25.5
chore(deps): update dependency aspect_bazel_lib to v2.22.2
go mod tidy.
chore: Upgrade golang/x/tools
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.67.4 to 0.67.5. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](prometheus/common@v0.67.4...v0.67.5) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.67.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…prometheus/common-0.67.5 build(deps): bump github.com/prometheus/common from 0.67.4 to 0.67.5
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.39.0 to 0.40.0. - [Commits](golang/sys@v0.39.0...v0.40.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-version: 0.40.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…x/sys-0.40.0 build(deps): bump golang.org/x/sys from 0.39.0 to 0.40.0
chore(deps): update dependency aspect_bazel_lib to v2.22.4
fix: apply `limit` eviction to hidden metrics (google#837)
…e#725) Fixes google#725 When a log file is rotated and the replacement file has incorrect permissions, the filestream goroutine fails to open the new file and exits without closing the fs.lines channel. This leaves the TailPath goroutine stuck and prevents the tailer from ever re-tailing the file, even after permissions are fixed. Close fs.lines on failure in both the rotation and ESTALE paths so the tailer can clean up the dead logstream and retry later.
fix: close filestream lines channel when rotation reopen fails (google#725)
fix(deps): update opentelemetry-go monorepo to v1.44.0
fix: rate-limit ESTALE reopen and handle ESTALE from stat (google#505)
fix: remove Source from duplicate metric check to prevent dupe after SIGHUP reload (google#636)
fix: allow pattern concatenation to start with id_expr
Issue #191 reported that const patterns could not be used alone as a match condition without a // + prefix. The functional fix was already applied in the checker (rewriting IndexedExpr of type Pattern to PatternExpr), but test coverage was missing. Add checker tests: - const pattern with named capref as cond - const pattern with positional capref as cond - const pattern in a binary expr in cond Add runtime integration tests: - const pattern as match condition with named capref - const pattern as match condition simple
fix(deps): update module github.com/prometheus/common to v0.68.0
test: add coverage for const patterns as standalone match conditions (#191)
Expressions like `getfilename() =~ "x" && /pattern/` previously threw "Redeclaration of capture group 0" because both patterns register numbered caprefs in the same scope. The workaround was to nest the second match in an inner block. This change implements "last pattern match wins" semantics for numbered capture groups only: - When a numbered capref ($0, $1, etc.) is redeclared in the same scope, the checker emits a notice and updates the existing symbol Binding to point to the last pattern PatternExpr node. Named capref redeclaration remains an error (genuinely ambiguous). - Scope.Check skips the redeclaration error for numbered caprefs, which are expected to be multi-defined in chained condition scopes. - A new "Chaining match conditions" subsection in the Programming Guide documents the feature and the "last wins" semantics. - Tests: checker test exercises two numbered capref 0 declarations with `||`; runtime integration test verifies correct execution of `/(\w+)/ && PAT`. Fixes google#190
fix(checker): allow chained match expressions with numbered caprefs
When a named capture group is inside a regex alternation like
`((?P<response_size>\d+)|-)`, the inner group is not matched when the
alternative branch matches (e.g., `-`). Previously, using `$response_size`
in this case returned an empty string that failed `strconv.ParseInt`,
causing a runtime error, and there was no way to test whether a capture
group was defined.
This adds a `defined()` builtin that checks at runtime whether a capture
group was actually matched:
/^[a-z]+ ((?P<response_size>\d+)|-)$/ {
defined($response_size) {
total = $response_size
}
}
Implementation:
- New `Defined` opcode in the VM that checks `m.indices[2*n] != -1`
- Parser: added `"defined"` to the lexer builtins list
- Type system: `defined` accepts any type and returns `Bool`
- Checker: validates argument is a `CaprefTerm`; permits `Bool`-typed
`BuiltinExpr` as a condition in `CondStmt`
- Codegen: `defined()` is handled entirely in `VisitBefore` (returning
`nil` prevents child walking) to avoid emitting the normal `Capref`/`S2i`
bytecode that would error on undefined groups; emits `Push regexIndex` +
`Defined caprefAddr` instead
- Integration test covers both defined and undefined cases
Fixes google#267
feat: add `defined()` builtin to test if a capture group was matched
The const pattern match fix (issue #191) allows const patterns to be used directly as match conditions without the `// +` prefix. Remove the workaround from all example programs: - 3 const definitions: drop `// +` start-of-concat sentinel - 17 match conditions: drop `// +` prefix - 2 =~ RHS expressions: drop `// +` prefix
chore: remove no-longer-needed // + workaround from example programs (#191)
chore(deps): update go toolchain directive to v1.26.4
fix(deps): update module github.com/prometheus/common to v0.68.1
chore(deps): update dependency gazelle to v0.51.1
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.
No description provided.