Skip to content

Update dependency on grafana/e2e to latest commit#3260

Merged
56quarters merged 1 commit intomainfrom
56quarters/e2e-update
Oct 19, 2022
Merged

Update dependency on grafana/e2e to latest commit#3260
56quarters merged 1 commit intomainfrom
56quarters/e2e-update

Conversation

@56quarters
Copy link
Copy Markdown
Contributor

Signed-off-by: Nick Pillitteri [email protected]

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@56quarters 56quarters marked this pull request as ready for review October 19, 2022 14:56
@56quarters 56quarters requested a review from a team as a code owner October 19, 2022 14:56
@56quarters
Copy link
Copy Markdown
Contributor Author

Previous version of e2e, 2c8db587f293, referenced commit a5a8ad4c33a0 of dskit which doesn't exist (it was a commit in a branch since merged to main). This is currently blocking the job that updates the version of Mimir in GEM.

@56quarters 56quarters merged commit 4b13804 into main Oct 19, 2022
@56quarters 56quarters deleted the 56quarters/e2e-update branch October 19, 2022 15:17
tcp13equals2 added a commit that referenced this pull request Dec 10, 2025
…#13398)

#### What this PR does

This PR adds support for the `anchored` and `smoothed` range selector
modifiers into the Mimir query engine.

ie `eval instant at 60s metric[1m] anchored` or `eval instant at 60s
metric[1m] smoothed`

This is the equivalent implementation to
[prometheus/pull/16457](prometheus/prometheus#16457
) and the original proposal for this extension can be [found
here](prometheus/proposals#52).

A new CLI argument has been added to enable these extensions;

```-query-frontend.enabled-promql-extended-range-selectors=smoothed,anchored```

The `experimental_functions.go` middleware has been extended (and renamed) to also manage the tenant access to use these extensions. As part of adding support for this, the error messages when a function/aggregate/modifier is not enabled has been updated to correctly identify if the denied keyword is a function, aggregate or extended range modifier.

#### Which issue(s) this PR fixes or relates to

Fixes #3260

#### Checklist

- [ x] Tests updated.
- [ ] Documentation added.
- [x ] `CHANGELOG.md` updated - the order of entries should be `[CHANGE]`, `[FEATURE]`, `[ENHANCEMENT]`, `[BUGFIX]`. If changelog entry is not needed, please add the `changelog-not-needed` label to the PR.
- [x ] [`about-versioning.md`](https://github.com/grafana/mimir/blob/main/docs/sources/mimir/configure/about-versioning.md) updated with experimental features.



Notes to reviewers;

* there is a prometheus PR which will need to be merged and vendored into mimir - prometheus/prometheus#17479. This is not a blocker, but once merged will enable full use of upstream test files.

The other note is to call attention the oddity in the use of `smoothed` ranges in rate/increase functions.

Prometheus calculates the range boundary values differently when the range is used in one of these functions. In the prometheus implementation, the entire matrix is re-walked to do these different calculations. See https://github.com/prometheus/prometheus/blob/main/promql/functions.go#L128-L173

To avoid this, you will see that I pre-calculate these alternate values on the range boundary and pass these along with the step data. These are interpolated calculations and it would seem more efficient to pre-calculate these and not use them rather then to have to later re-walk the data. 

I also did not attempt to determine if the parent of the range vector was a rate/increase function and use this to decide which boundary point calculation to use. The reason for this was in case this range vector result was ever cached / re-used then this implementation may be confusing.  


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Adds MQE support for experimental `smoothed` and `anchored` range selector modifiers with per-tenant enablement, updated planning/execution, and docs/flags.
> 
> - **MQE/Execution**:
>   - Implement extended range selector modifiers `smoothed` and `anchored` in range and instant selectors, including extended-boundary handling and smoothed basis points for rate/increase.
>   - Update rate/increase/delta logic to honor modifiers; disallow with native histograms; validate modifier-function compatibility.
>   - Enable parser extended-range selectors in frontend/querier; clone `Anchored`/`Smoothed` in AST.
> - **Planning/Protocol**:
>   - Propagate modifier flags through planning (core proto), raise minimum plan version to `V4`.
>   - Add planner errors for unsupported functions with these modifiers.
> - **Middleware/Gating**:
>   - Replace experimental functions middleware with unified experimental features middleware to gate functions, aggregations, and extended range modifiers; improve error messages per feature type.
> - **Config/CLI/Docs**:
>   - Add `-query-frontend.enabled-promql-extended-range-selectors` (per-tenant) with defaults, help text, config descriptor, and operations defaults.
>   - Update docs (`about-versioning`, configuration parameters) and CHANGELOG entries.
> - **Tests/Benchmarks**:
>   - Add extensive unit/plan tests, testdata, and benchmark cases for new modifiers.
> 
> <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 49b1131. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Taylor C <[email protected]>
Co-authored-by: Charles Korn <[email protected]>
Co-authored-by: Charles Korn <[email protected]>
Co-authored-by: Nick Pillitteri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants