Skip to content

Conversation

@Develer
Copy link
Contributor

@Develer Develer commented Sep 16, 2025

What is this feature?

Deprecates and removes the FormatTime transformation. Format time is now redundant with convertFieldType and has been fully replaced.

What was done:

  • Removed FormatTime transformation implementation
  • Moved TimeFormat tests to convertFieldType
  • Added migration to handle existing usage

Which issue(s) does this PR fix?:

Fixes #105577

Special notes for your reviewer:

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.

Sam's Edit

Ihor told me the Readme for how to write/run these kinds of migrations can now be found here:
apps/dashboard/pkg/migration/README.md

@Develer Develer self-assigned this Sep 16, 2025
@Develer Develer requested review from a team as code owners September 16, 2025 20:53
@Develer Develer requested review from a team as code owners September 16, 2025 20:53
@Develer Develer added the no-backport Skip backport of PR label Sep 16, 2025
@Develer Develer requested review from MissingRoberto, ashharrison90, dprokop, gelicia, jackw, kylebrandt, mdvictor, samsch and spinillos and removed request for a team September 16, 2025 20:53
@github-actions github-actions bot added this to the 12.3.x milestone Sep 16, 2025
@grafana-pr-automation
Copy link
Contributor

grafana-pr-automation bot commented Sep 16, 2025

⚠️   Possible breaking changes (md version)   ⚠️

grafana-data

Removals

DataTransformerID.formatTime
/home/runner/work/grafana/grafana/base/grafana-data/dist/types/transformations/transformers/ids.d.ts
formatTime = "formatTime"


Read our guideline

  • Your pull request merge won't be blocked.

@grafana-pr-automation grafana-pr-automation bot added the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Sep 16, 2025
@grafana-pr-automation grafana-pr-automation bot requested a review from a team September 16, 2025 21:00
@Develer Develer changed the title Transformations: Deprecate format time transformation Transformations: Deprecate FormatTime transformation Sep 16, 2025
@github-actions github-actions bot added the type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project label Sep 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 2025

Copy link
Contributor

@ivanortegaalba ivanortegaalba left a comment

Choose a reason for hiding this comment

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

Make sure you use grafanaBootData.settings.featureToggles.kubernetesDashboards to enable the usage of App Platform to fetch any dashboard by default

Copy link
Contributor

@ivanortegaalba ivanortegaalba left a comment

Choose a reason for hiding this comment

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

After a peer review, we decided:

  1. Ivan will write a README about how to write a schemaVersion migration
  2. Once we have the documentation, we will update this PR with the following:
    1. Implement the migration in the DashboardMigration.ts
    2. Add input with the different scenarios for this migration in the backend

@github-actions
Copy link
Contributor

github-actions bot commented Oct 27, 2025

💻 Deploy preview available (Transformations: Deprecate FormatTime transformation):

@Develer
Copy link
Contributor Author

Develer commented Oct 27, 2025

After a peer review, we decided:

  1. Ivan will write a README about how to write a schemaVersion migration

  2. Once we have the documentation, we will update this PR with the following:

    1. Implement the migration in the DashboardMigration.ts
    2. Add input with the different scenarios for this migration in the backend

@ivanortegaalba, I’m reading the documentation you released a few weeks ago. There’s a statement that if my migration is beyond v42, I need to do a panel-specific migration. My migration is not panel-specific; it’s transformation-related. Does that mean I need to remove my v43 implementation from DashboardMigration.ts?

I just want to confirm that it’s enough to have v43.go, as far as I understand, a backend migration in this case.

@ivanortegaalba
Copy link
Contributor

After a peer review, we decided:

  1. Ivan will write a README about how to write a schemaVersion migration

  2. Once we have the documentation, we will update this PR with the following:

    1. Implement the migration in the DashboardMigration.ts
    2. Add input with the different scenarios for this migration in the backend

@ivanortegaalba, I’m reading the documentation you released a few weeks ago. There’s a statement that if my migration is beyond v42, I need to do a panel-specific migration. My migration is not panel-specific; it’s transformation-related. Does that mean I need to remove my v43 implementation from DashboardMigration.ts?

I just want to confirm that it’s enough to have v43.go, as far as I understand, a backend migration in this case.

Hi @Develer!! This migration is in the right place; this is not a panel transformation. It is correct here!

Copy link
Contributor

@ivanortegaalba ivanortegaalba left a comment

Choose a reason for hiding this comment

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

Code-wise looks good @Develer! Please have a look to the recommendations and let's try to get it merged!

@ivanortegaalba
Copy link
Contributor

Also, I see you're missing the backend output to be generated, make sure you run:

go test ./apps/dashboard/pkg/migration/ -v and g o test ./apps/dashboard/pkg/migration/schemaversion/ -v to ensure all outputs are covered :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add to changelog area/backend area/frontend area/transformations levitate breaking change A label indicating a breaking change and assigned by Levitate. no-backport Skip backport of PR type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transformations: Ensure feature parity between "Format Time" and "Convert field type" transformations, deprecate "Format Time"

3 participants