Skip to content

Change CREATE endpoint for Lakeview dashboards in test server to closer mimic the Lakeview API#3047

Merged
anton-107 merged 6 commits intomainfrom
anton-107/testserver-dashboards-create
Jun 12, 2025
Merged

Change CREATE endpoint for Lakeview dashboards in test server to closer mimic the Lakeview API#3047
anton-107 merged 6 commits intomainfrom
anton-107/testserver-dashboards-create

Conversation

@anton-107
Copy link
Copy Markdown
Contributor

Changes

⏺ Change CREATE endpoint for Lakeview dashboards in test server to closer mimic the Lakeview API:

  • Strip hyphens from dashboard IDs (UUID format)
  • Set LifecycleState to Active by default
  • Construct Path from ParentPath + DisplayName when provided
  • Add pageType field to dashboard pages in serialized content

Why

This change will allow local acceptance tests to use the test server instead of defining their own mocks

Related PRs:

#3045

Tests

@anton-107 anton-107 temporarily deployed to test-trigger-is June 12, 2025 12:36 — with GitHub Actions Inactive
@anton-107 anton-107 changed the base branch from main to anton-107/testserver-dashboards-delete June 12, 2025 12:37
@anton-107 anton-107 force-pushed the anton-107/testserver-dashboards-create branch from f86b2ad to 68ea6dc Compare June 12, 2025 12:55
@anton-107 anton-107 temporarily deployed to test-trigger-is June 12, 2025 12:55 — with GitHub Actions Inactive
@anton-107 anton-107 temporarily deployed to test-trigger-is June 12, 2025 12:56 — with GitHub Actions Inactive
@anton-107 anton-107 marked this pull request as ready for review June 12, 2025 13:20
Copy link
Copy Markdown
Contributor

@denik denik left a comment

Choose a reason for hiding this comment

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

Thanks!

github-merge-queue Bot pushed a commit that referenced this pull request Jun 12, 2025
## Changes
<!-- Brief summary of your changes that is easy to understand -->
1. Add DELETE endpoint for lakeview dashboards in test server
1. Remove the mocks for DELETE calls in acceptance tests for dashboards
deployment

## Why
<!-- Why are these changes needed? Provide the context that the reviewer
might be missing.
For example, were there any decisions behind the change that are not
reflected in the code itself? -->
This is the first in the series of changes for using testserver instead
of mocks in acceptance tests for dashboards deployment

## Related PRs:
#3047

## Tests
<!-- How have you tested the changes? -->

<!-- If your PR needs to be included in the release notes for next
release,
add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
Base automatically changed from anton-107/testserver-dashboards-delete to main June 12, 2025 14:57
@anton-107 anton-107 temporarily deployed to test-trigger-is June 12, 2025 15:26 — with GitHub Actions Inactive
@anton-107 anton-107 added this pull request to the merge queue Jun 12, 2025
Merged via the queue into main with commit 4359e6a Jun 12, 2025
10 checks passed
@anton-107 anton-107 deleted the anton-107/testserver-dashboards-create branch June 12, 2025 15:58
github-merge-queue Bot pushed a commit that referenced this pull request Jun 13, 2025
…#3048)

## Why
<!-- Why are these changes needed? Provide the context that the reviewer
might be missing.
For example, were there any decisions behind the change that are not
reflected in the code itself? -->
This is the last in the series of changes for using testserver instead
of mocks in acceptance tests for dashboards deployment

## Related PRs
- #3045
- #3047

## Tests
<!-- How have you tested the changes? -->
Existing tests

<!-- If your PR needs to be included in the release notes for next
release,
add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
Copy link
Copy Markdown
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

Nice!

// Change path field if parent_path is provided
if dashboard.ParentPath != "" {
dashboard.Path = dashboard.ParentPath + "/" + dashboard.DisplayName + ".lvdash.json"
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the behavior if the parent path is not defined?

If this is invalid, then it can return an error.

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