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

FieldOptions: Revert scalable unit option as we already support this via custom prefix/suffixes #81893

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

torkelo
Copy link
Member

@torkelo torkelo commented Feb 5, 2024

reverts #79411

Does not work for the majority of units that scale, feels like adding another standard option that will show up in 99% of panels is not great solution for an issue with only 2 👍 , we have support custom suffix/prefix via the standard unit option for anyone who wants to just get a suffix or prefix

@torkelo torkelo requested review from joshhunt, L-M-K-B and Ukochka and removed request for a team February 5, 2024 14:47
@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.4.x milestone Feb 5, 2024
@torkelo torkelo requested review from dprokop, nmarrs and Develer and removed request for grafanabot, imatwawana, joshhunt, L-M-K-B and Ukochka February 5, 2024 14:47
@torkelo torkelo added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes and removed type/docs area/frontend labels Feb 5, 2024
@torkelo torkelo added backport v10.3.x Mark PR for automatic backport to v10.3.x and removed type/docs area/frontend labels Feb 5, 2024
@torkelo torkelo added add to changelog and removed no-changelog Skip including change in changelog/release notes labels Feb 5, 2024
@torkelo torkelo changed the title StandardFieldOptions: Revert scalable unit option FieldOptions: Revert scalable unit option as we already support this via custom prefix/suffixes Feb 5, 2024
Copy link
Contributor

This PR must be merged before a backport PR will be created.

@grafana grafana deleted a comment from grafana-delivery-bot bot Feb 5, 2024
@grafana-pr-automation
Copy link

⚠️   Possible breaking changes (md version)   ⚠️

grafana-data

Removals

FieldConfig.unitScale
/home/runner/work/grafana/grafana/base/grafana-data/dist/index.d.ts
unitScale?: boolean;


Read our guideline
Console output

@grafana-pr-automation grafana-pr-automation bot added the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Feb 5, 2024
@grafana-pr-automation grafana-pr-automation bot requested review from a team and jackw and removed request for a team February 5, 2024 15:05
Copy link
Contributor

@nmarrs nmarrs left a comment

Choose a reason for hiding this comment

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

I understand your point on adding this option is probably too heavy handed approach given amount of upvotes on the original issue.

Regarding the workaround using custom units I think this may be a little obscure / hard to discover for users, especially when the unit is already supported by grafana but to get their desired scaling behavior they must add it as a custom unit - this seems a little counterintuitive at least to me 🤷🏻‍♂️ I would argue that the new option that was added is easier to discover. It feels like this option with some modification / improvement could be a more straightforward way to manage this for users

Is removing this option the only path forward here? I understand that in its current state it is also causing confusion for users as it doesn't apply to most units but maybe that's something that's solvable with renaming (I.e. "Metric unit auto scaling", we could even list out supported units as part of the option UI in a tooltip or something)

I will defer to you on this - if we do end up removing this I suggest that we add a section in docs underneath units section about the current custom unit workaround. We will also need to update the 10.3 what's new content to remove mention of this feature

@torkelo torkelo merged commit 1fe32ce into main Feb 5, 2024
22 of 23 checks passed
@torkelo torkelo deleted the revert-scalable-units branch February 5, 2024 15:42
Copy link
Contributor

The backport to v10.3.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-81893-to-v10.3.x origin/v10.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 1fe32ce36ead4f27a8c56d7789beb8b11a17d7ae

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-81893-to-v10.3.x
# Create the PR body template
PR_BODY=$(gh pr view 81893 --json body --template 'Backport 1fe32ce36ead4f27a8c56d7789beb8b11a17d7ae from #81893{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v10.3.x] FieldOptions: Revert scalable unit option as we already support this via custom prefix/suffixes " --body-file - --label "type/docs" --label "area/frontend" --label "add to changelog" --label "no-backport" --label "levitate breaking change" --label "backport" --base v10.3.x --milestone 10.3.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-81893-to-v10.3.x

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

# Remove the local backport branch
git switch main
git branch -D backport-81893-to-v10.3.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 Feb 5, 2024
Ukochka pushed a commit that referenced this pull request Feb 14, 2024
…via custom prefix/suffixes (#81893)

* StandardFieldOptions: Revert scalable unit option

* forgot to save merge fixes
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/frontend backport v10.3.x Mark PR for automatic backport to v10.3.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. levitate breaking change A label indicating a breaking change and assigned by Levitate. no-backport Skip backport of PR type/docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants