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

InfluxDB: Fix parsing multiple tags on backend mode #77340

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

itsmylife
Copy link
Contributor

What is this feature?

This is fixing the response when we have multiple tags in the response. Multiple tags must be separated by a comma in the result. This also allows us to be in sync with the frontend mode result.

Why do we need this feature?

To have a proper output

Who is this feature for?

InfluxDB InfluxQL backend mode users

Special notes for your reviewer:

How to test?

  • Run dev environment with feature flag influxdbBackendMigration=true
  • Use this query as an example SELECT "usage_idle" FROM "cpu" WHERE $timeFilter GROUP BY "cpu"::tag, "host"::tag
  • Observe that you get the response (see it on the legend) back as cpu.usage_idle {cpu: cpu3 host: 41c9dcf3b960}
  • Switch to this branch and run the query again
  • Observe that you get the response (see it on the legend) back as cpu.usage_idle {cpu: cpu3, host: 41c9dcf3b960}

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@itsmylife itsmylife merged commit 6b13064 into main Oct 30, 2023
15 checks passed
@itsmylife itsmylife deleted the ismail/influxdb-parsing-multiple-tags branch October 30, 2023 14:45
@grafana-delivery-bot
Copy link
Contributor

The backport to v10.2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-77340-to-v10.2.x origin/v10.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 6b13064cf6a5f544f558783cda8d3a2b7bc7f7e7

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-77340-to-v10.2.x
# Create the PR body template
PR_BODY=$(gh pr view 77340 --json body --template 'Backport 6b13064cf6a5f544f558783cda8d3a2b7bc7f7e7 from #77340{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.2.x] InfluxDB: Fix parsing multiple tags on backend mode" --body-file - --label "type/bug" --label "datasource/InfluxDB" --label "area/backend" --label "add to changelog" --label "backport" --base v10.2.x --milestone 10.2.x --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-77340-to-v10.2.x

# Create a pull request where the `base` branch is `v10.2.x` and the `compare`/`head` branch is `backport-77340-to-v10.2.x`.

# Remove the local backport branch
git switch main
git branch -D backport-77340-to-v10.2.x

@grafana-delivery-bot grafana-delivery-bot bot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label Oct 30, 2023
itsmylife added a commit that referenced this pull request Oct 30, 2023
* Multiple tags separated by comma in the result

* A non-flaky unit test

(cherry picked from commit 6b13064)
itsmylife added a commit that referenced this pull request Oct 30, 2023
InfluxDB: Fix parsing multiple tags on backend mode (#77340)

* Multiple tags separated by comma in the result

* A non-flaky unit test

(cherry picked from commit 6b13064)
ssama88 pushed a commit to ssama88/grafana that referenced this pull request Oct 31, 2023
* Multiple tags separated by comma in the result

* A non-flaky unit test
@aangelisc aangelisc modified the milestones: 10.3.x, 10.2.3 Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend backport v10.2.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. datasource/InfluxDB type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants