You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "FrancescoCastaldi (via GitHub)" <gi...@apache.org> on 2026/08/27 08:46:37 UTC
[PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
FrancescoCastaldi opened a new pull request, #43585:
URL: https://github.com/apache/superset/pull/43585
### SUMMARY
Fixes #43356.
\ChartDataProphetOptionsSchema.time_grain\ was validating against \get_time_grain_choices()\, which includes operator-configured \TIME_GRAIN_ADDONS\. However, \prophet()\ in \pandas_postprocessing/prophet.py\ resolves time grains through \PROPHET_TIME_GRAIN_MAP\ (a static mapping to Pandas frequency strings). Consequently, custom time grains configured in \TIME_GRAIN_ADDONS\ passed schema validation but failed at runtime with \InvalidPostProcessingError: Unsupported time grain\.
#### Changes
1. Updated \ChartDataProphetOptionsSchema.time_grain\ in \superset/charts/schemas.py\ to validate against \PROPHET_TIME_GRAIN_MAP.keys()\ directly.
2. Updated tests in \ ests/unit_tests/charts/test_schemas.py\ to verify that custom non-built-in \TIME_GRAIN_ADDONS\ (e.g. \PT7M\) are rejected by \ChartDataProphetOptionsSchema\ while still accepted by \ChartDataExtrasSchema\ (\ ime_grain_sqla\).
### TESTING INSTRUCTIONS
1. Run \pytest tests/unit_tests/charts/test_schemas.py\.
2. Configure a custom \TIME_GRAIN_ADDONS\ in config.
3. Validate that requests targeting Prophet forecasting validate against supported Prophet grains and fail with a \ValidationError\ on unsupported grains instead of raising an unhandled 500/post-processing error.
### ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #43356
- [ ] Changes UI
- [ ] Requires DB Migration
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
FrancescoCastaldi commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5522386915
@rusackas Thanks! I have updated the PR description to frame this as a schema-accuracy and dynamic time-grain-choices alignment fix, and softened the issue reference to `Ref #43356` so it won't auto-close the issue on merge. All CI checks are green and ready for final review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #43585:
URL: https://github.com/apache/superset/pull/43585#discussion_r3890453992
##########
superset/charts/schemas.py:
##########
@@ -757,7 +758,7 @@ class ChartDataProphetOptionsSchema(ChartDataPostProcessingOperationOptionsSchem
"[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) durations.",
"example": "P1D",
},
- validate=validate.OneOf(choices=get_time_grain_choices()),
+ validate=validate.OneOf(choices=tuple(PROPHET_TIME_GRAIN_MAP.keys())),
Review Comment:
The import fix landed, thanks! The description hasn't changed though (last edit predates this thread)... it still frames this as changing what an API caller sees, and the "Fixes #43356" would close the issue on merge even though caller-visible behavior stays the same. If you can reword the SUMMARY to frame this as a schema-accuracy fix plus the stale time-grain-choices fix (and maybe soften Fixes to a plain reference), I think we're good to go.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5471803992
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5441641351
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #43585:
URL: https://github.com/apache/superset/pull/43585#discussion_r3890283937
##########
tests/unit_tests/charts/test_schemas.py:
##########
@@ -310,21 +310,30 @@ def test_chart_data_query_object_schema_deprecated_fields_renamed(
@pytest.mark.parametrize(
"app",
- [{"TIME_GRAIN_ADDONS": {"PT10M": "10 minutes"}}],
+ [{"TIME_GRAIN_ADDONS": {"PT7M": "7 minutes"}}],
indirect=True,
)
def test_time_grain_validation_with_config_addons(app_context: None) -> None:
- """Test that validation includes TIME_GRAIN_ADDONS from config"""
- schema = ChartDataProphetOptionsSchema()
+ """
+ Test that custom TIME_GRAIN_ADDONS are accepted by ChartDataExtrasSchema (SQLA)
+ but rejected by ChartDataProphetOptionsSchema (which only supports mapped Prophet grains).
+ """
+ # Custom addon grain is valid for SQLA time grain
+ extras_schema = ChartDataExtrasSchema()
+ extras_result = extras_schema.load({"time_grain_sqla": "PT7M"})
+ assert extras_result["time_grain_sqla"] == "PT7M"
Review Comment:
Traced this one, doesnt hold up against the current code. `validate_time_grain_sqla` is a plain function reference, marshmallow calls it at validation time, not at import time, so it picks up `TIME_GRAIN_ADDONS` from the fixture fine. Confirmed with an isolated repro of the eager-vs-lazy pattern. Resolving.
##########
superset/charts/schemas.py:
##########
@@ -757,7 +758,7 @@ class ChartDataProphetOptionsSchema(ChartDataPostProcessingOperationOptionsSchem
"[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) durations.",
"example": "P1D",
},
- validate=validate.OneOf(choices=get_time_grain_choices()),
+ validate=validate.OneOf(choices=tuple(PROPHET_TIME_GRAIN_MAP.keys())),
Review Comment:
Agreed, traced this myself and it checks out, left the detail in my review comment above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5438857150
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #43585:
URL: https://github.com/apache/superset/pull/43585#discussion_r3870176115
##########
superset/charts/schemas.py:
##########
@@ -757,7 +758,7 @@ class ChartDataProphetOptionsSchema(ChartDataPostProcessingOperationOptionsSchem
"[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) durations.",
"example": "P1D",
},
- validate=validate.OneOf(choices=get_time_grain_choices()),
+ validate=validate.OneOf(choices=tuple(PROPHET_TIME_GRAIN_MAP.keys())),
Review Comment:
**Suggestion:** This validation is attached only to the standalone `ChartDataProphetOptionsSchema`, while chart-data requests are deserialized through `ChartDataQueryObjectSchema.post_processing` and `ChartDataPostProcessingOperationSchema.options`, whose `options` field remains an unvalidated `fields.Dict`. Therefore a request containing `{\"operation\": \"prophet\", \"options\": {\"time_grain\": \"PT7M\", ...}}` bypasses this validator and still reaches runtime post-processing, so the API does not return the intended schema `ValidationError`. Apply Prophet option validation at the post-processing dispatch/schema boundary or otherwise wire this schema into nested request validation. [api mismatch]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Chart-data Prophet requests bypass intended grain validation.
- ❌ Unsupported custom grains fail during post-processing.
- ⚠️ API clients receive runtime validation errors instead.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=7eedb305197345ca93ac21077b5c2069&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=7eedb305197345ca93ac21077b5c2069&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset/charts/schemas.py
**Line:** 761:761
**Comment:**
*Api Mismatch: This validation is attached only to the standalone `ChartDataProphetOptionsSchema`, while chart-data requests are deserialized through `ChartDataQueryObjectSchema.post_processing` and `ChartDataPostProcessingOperationSchema.options`, whose `options` field remains an unvalidated `fields.Dict`. Therefore a request containing `{\"operation\": \"prophet\", \"options\": {\"time_grain\": \"PT7M\", ...}}` bypasses this validator and still reaches runtime post-processing, so the API does not return the intended schema `ValidationError`. Apply Prophet option validation at the post-processing dispatch/schema boundary or otherwise wire this schema into nested request validation.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43585&comment_hash=52ee0f23b89145263cb93e7948201d9c6958bc1d215c3ed73b6b93acd37cea62&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43585&comment_hash=52ee0f23b89145263cb93e7948201d9c6958bc1d215c3ed73b6b93acd37cea62&reaction=dislike'>👎</a>
##########
tests/unit_tests/charts/test_schemas.py:
##########
@@ -310,21 +310,30 @@ def test_chart_data_query_object_schema_deprecated_fields_renamed(
@pytest.mark.parametrize(
"app",
- [{"TIME_GRAIN_ADDONS": {"PT10M": "10 minutes"}}],
+ [{"TIME_GRAIN_ADDONS": {"PT7M": "7 minutes"}}],
indirect=True,
)
def test_time_grain_validation_with_config_addons(app_context: None) -> None:
- """Test that validation includes TIME_GRAIN_ADDONS from config"""
- schema = ChartDataProphetOptionsSchema()
+ """
+ Test that custom TIME_GRAIN_ADDONS are accepted by ChartDataExtrasSchema (SQLA)
+ but rejected by ChartDataProphetOptionsSchema (which only supports mapped Prophet grains).
+ """
+ # Custom addon grain is valid for SQLA time grain
+ extras_schema = ChartDataExtrasSchema()
+ extras_result = extras_schema.load({"time_grain_sqla": "PT7M"})
+ assert extras_result["time_grain_sqla"] == "PT7M"
Review Comment:
**Suggestion:** The test will fail before reaching the Prophet assertion because `ChartDataExtrasSchema.time_grain_sqla` constructs its `OneOf` validator when `superset.charts.schemas` is imported, before the indirect app fixture applies `TIME_GRAIN_ADDONS`. At that point `PT7M` is not in the validator's choices, so the SQLA load raises `ValidationError` instead of accepting the configured addon. Construct the schema after configuring the choices dynamically, or update the schema/test setup so the addon is available when the validator is created. [possible bug]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Target schema test fails before Prophet assertions.
- ⚠️ CI cannot validate the intended regression behavior.
- ⚠️ SQLA addon acceptance is incorrectly reported as invalid.
```
</details>
[](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=1a95413ac5e74c88bc17f9295bf320d6&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=1a95413ac5e74c88bc17f9295bf320d6&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** tests/unit_tests/charts/test_schemas.py
**Line:** 322:324
**Comment:**
*Possible Bug: The test will fail before reaching the Prophet assertion because `ChartDataExtrasSchema.time_grain_sqla` constructs its `OneOf` validator when `superset.charts.schemas` is imported, before the indirect app fixture applies `TIME_GRAIN_ADDONS`. At that point `PT7M` is not in the validator's choices, so the SQLA load raises `ValidationError` instead of accepting the configured addon. Construct the schema after configuring the choices dynamically, or update the schema/test setup so the addon is available when the validator is created.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43585&comment_hash=bf43b0528e5cc3c110104ff0472e3f5c853b09a2962cf8c679c36a07d900923d&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43585&comment_hash=bf43b0528e5cc3c110104ff0472e3f5c853b09a2962cf8c679c36a07d900923d&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5470951893
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 30d9437a8ef0ebbc0d619ff3b988b7939832dca8 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a948c065335d7000847889d |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-43585--superset-docs-preview.netlify.app](https://deploy-preview-43585--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpbCoAgEEDRvcx3klA-agctY3IsB0pFJIpo7_l34Z4XcklnrjADdLAWjC603vju28jBV1H59GIvyFFceDBh5RQbJp-P9CzUuMZptE5qNQyKjJTSjsbaieD7AQ) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-43585--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5436616468
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
FrancescoCastaldi commented on code in PR #43585:
URL: https://github.com/apache/superset/pull/43585#discussion_r3890393598
##########
superset/charts/schemas.py:
##########
@@ -757,7 +758,7 @@ class ChartDataProphetOptionsSchema(ChartDataPostProcessingOperationOptionsSchem
"[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) durations.",
"example": "P1D",
},
- validate=validate.OneOf(choices=get_time_grain_choices()),
+ validate=validate.OneOf(choices=tuple(PROPHET_TIME_GRAIN_MAP.keys())),
Review Comment:
Acknowledged and updated. The import ordering issue highlighted by @rusackas has also been fixed in the latest push.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43585:
URL: https://github.com/apache/superset/pull/43585
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5436663024
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43585?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 56.46%. Comparing base ([`b71293a`](https://app.codecov.io/gh/apache/superset/commit/b71293acde004b4e82758675a23d2cf2207f67c8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`3f24c5c`](https://app.codecov.io/gh/apache/superset/commit/3f24c5c99b1cb70d23374224fa8cac3b9d1e1313?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #43585 +/- ##
===========================================
- Coverage 79.10% 56.46% -22.64%
===========================================
Files 2878 2878
Lines 165651 165652 +1
Branches 38300 38300
===========================================
- Hits 131039 93543 -37496
- Misses 32126 71638 +39512
+ Partials 2486 471 -2015
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.95% <100.00%> (+<0.01%)` | :arrow_up: |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.95% <100.00%> (-45.73%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/43585/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43585?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(charts): restrict Prophet time grain schema validation to supported Prophet grains [superset]
Posted by "FrancescoCastaldi (via GitHub)" <gi...@apache.org>.
FrancescoCastaldi commented on PR #43585:
URL: https://github.com/apache/superset/pull/43585#issuecomment-5470949988
Thanks @rusackas! I fixed the import ordering in superset/charts/schemas.py so that PROPHET_TIME_GRAIN_MAP is imported after superset.utils.core to make ruff / pre-commit happy, and force-pushed the branch.
Regarding ChartDataProphetOptionsSchema not being wired into ChartDataPostProcessingOperationSchema.options, totally agree: dynamic per-operation options validation would require a broader polymorphic schema refactor. Updated the commit and kept the schema accuracy and dynamic ime_grain_sqla fixes intact.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org