Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added experimental features flag #4679

Merged
merged 7 commits into from
Sep 23, 2021
Merged

Conversation

metonymic-smokey
Copy link
Contributor

@metonymic-smokey metonymic-smokey commented Sep 19, 2021

Signed-off-by: metonymic-smokey ahuja.aditi@gmail.com

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Fixes #4022
This PR adds an --enable-feature flag to query, similar to Prom's --enable-features flag.
The features that can be currently turned on are enabling negative offset and @ modifier.

Verification

image

@metonymic-smokey
Copy link
Contributor Author

@yeya24 @bwplotka this is the first draft of the PR.
Please let me know if I should add this change to the changelog and if there is something I could improve here.
Thanks!

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Please update the changelog and add a doc about feature flags. You can add this to different components. https://github.com/thanos-io/thanos/tree/main/docs/components

cmd/thanos/query.go Outdated Show resolved Hide resolved
cmd/thanos/query.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
cmd/thanos/query.go Outdated Show resolved Hide resolved
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr looks good to me once the docs CI issue is fixed. @thanos-io/thanos-maintainers Does this experimental flags design look good?

bwplotka
bwplotka previously approved these changes Sep 20, 2021
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nits only, otherwise LGTM, thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
cmd/thanos/query.go Outdated Show resolved Hide resolved
cmd/thanos/query.go Outdated Show resolved Hide resolved
Signed-off-by: metonymic-smokey <ahuja.aditi@gmail.com>
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
cmd/thanos/query.go Show resolved Hide resolved
Signed-off-by: metonymic-smokey <ahuja.aditi@gmail.com>
Signed-off-by: metonymic-smokey <ahuja.aditi@gmail.com>
bwplotka
bwplotka previously approved these changes Sep 23, 2021
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit, otherwise LGTM! Thanks 💪🏽

cmd/thanos/query.go Outdated Show resolved Hide resolved
Signed-off-by: metonymic-smokey <ahuja.aditi@gmail.com>
GiedriusS
GiedriusS previously approved these changes Sep 23, 2021
@metonymic-smokey
Copy link
Contributor Author

Running make docs locally, should have this docs test passing by then.

bwplotka
bwplotka previously approved these changes Sep 23, 2021
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, make docs to be run

Signed-off-by: metonymic-smokey <ahuja.aditi@gmail.com>
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yeya24 yeya24 enabled auto-merge (squash) September 23, 2021 17:25
@yeya24 yeya24 merged commit 8229b45 into thanos-io:main Sep 23, 2021
@yeya24 yeya24 mentioned this pull request Sep 23, 2021
@zhongpengqun
Copy link

zhongpengqun commented Dec 16, 2021

spec:
  containers:
  - args:
    - query
    - --http-address=0.0.0.0:9090
    - --store=rdoss-thanos-sidecar.svc.eng.xxxx.com:10901
    - --store=rdoss-thanos-store.svc.eng.xxxx.com:10901
    - --query.lookback-delta=2h
    - --enable-feature=promql-at-modifier
    image: xxxx.com/dockerhub-proxy-cache/thanosio/thanos:v0.24.0-rc.1
    imagePullPolicy: IfNotPresent
    livenessProbe:
      failureThreshold: 3
      httpGet:
        path: /-/healthy
        port: 9090
        scheme: HTTP
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 1

Hi, i want to add the parameter --enable-feature=promql-at-modifier
so i run command kubectl edit pod/rdoss-thanos-query-675d49c7b8-fqc7g
and add the parameter to test if is it OK,

but it denied to save which means the flag is illegal.

I have no idea why, please help me.

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.

Negative offset with flag --enable-feature=promql-negative-offset
5 participants