Skip to content

Conversation

BenjaminCharmes
Copy link
Contributor

@BenjaminCharmes BenjaminCharmes commented Jun 4, 2025

Closes #1159

Could also add an alert from #1212 when an unknow block type is ancountered

Copy link

codecov bot commented Jun 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.42%. Comparing base (f6011be) to head (0f69c1b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1228   +/-   ##
=======================================
  Coverage   74.42%   74.42%           
=======================================
  Files          66       66           
  Lines        4520     4520           
=======================================
  Hits         3364     3364           
  Misses       1156     1156           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

cypress bot commented Jun 4, 2025

datalab    Run #3571

Run Properties:  status check passed Passed #3571  •  git commit c3a91035c8 ℹ️: Merge 0f69c1b3743e97fe267c38b6df9bfd8ac0b096b2 into f6011bee9c1615e2a2bd9e76103e...
Project datalab
Branch Review bc/unknow-blocktype
Run status status check passed Passed #3571
Run duration 07m 38s
Commit git commit c3a91035c8 ℹ️: Merge 0f69c1b3743e97fe267c38b6df9bfd8ac0b096b2 into f6011bee9c1615e2a2bd9e76103e...
Committer Ben Charmes
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 504
View all changes introduced in this branch ↗︎

@BenjaminCharmes BenjaminCharmes force-pushed the bc/unknow-blocktype branch 3 times, most recently from 6018322 to e3fef71 Compare June 5, 2025 13:08
@BenjaminCharmes BenjaminCharmes changed the title Only emit warnings when an unknown block type is encountered @BenjaminCharmes Display NotImplementedBlock when an unknown block type is encountered Jun 5, 2025
@BenjaminCharmes BenjaminCharmes changed the title @BenjaminCharmes Display NotImplementedBlock when an unknown block type is encountered Display NotImplementedBlock when an unknown block type is encountered Jun 5, 2025
@BenjaminCharmes BenjaminCharmes marked this pull request as ready for review June 5, 2025 13:35
@ml-evs ml-evs force-pushed the bc/unknow-blocktype branch from e3fef71 to fae15d6 Compare June 11, 2025 20:23
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Hi @BenjaminCharmes, I've struggled a bit to get this working locally, I seem to just hit can't access property "attributes", $options.blockInfo is undefined every time and it doesn't seem to put any block_implementation_errors in the store. Does it still work for you locally?

@BenjaminCharmes
Copy link
Contributor Author

Hi @BenjaminCharmes, I've struggled a bit to get this working locally, I seem to just hit can't access property "attributes", $options.blockInfo is undefined every time and it doesn't seem to put any block_implementation_errors in the store. Does it still work for you locally?

I didn't manage to reproduce your issue, and everything still works for me locally. But I've added an extra verification if blockInfo is undefined, which should solve your issue. If it still doesn't work, we can discuss it.

@ml-evs
Copy link
Member

ml-evs commented Jun 13, 2025

Hi @BenjaminCharmes, I've struggled a bit to get this working locally, I seem to just hit can't access property "attributes", $options.blockInfo is undefined every time and it doesn't seem to put any block_implementation_errors in the store. Does it still work for you locally?

I didn't manage to reproduce your issue, and everything still works for me locally. But I've added an extra verification if blockInfo is undefined, which should solve your issue. If it still doesn't work, we can discuss it.

Still not quite working for me, let's catch up on it next week!

@ml-evs ml-evs requested a review from be-smith June 30, 2025 09:27
@be-smith
Copy link
Contributor

be-smith commented Jul 8, 2025

I'm not sure what the desired behaviour is, when loading a sample with a block not defined in resources.js it loads a default bokehblock and doesn't throw any errors.

Weirdly to test this when I removed the blocks from resources.js they still appeared in the dropdown menu as available blocks, even when they simply defaulted to a bokeh block after I created them.

@ml-evs ml-evs force-pushed the bc/unknow-blocktype branch from 915e701 to 0f69c1b Compare July 8, 2025 22:26
@ml-evs ml-evs self-requested a review July 9, 2025 08:53
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

I'm not sure what the desired behaviour is, when loading a sample with a block not defined in resources.js it loads a default bokehblock and doesn't throw any errors.

Weirdly to test this when I removed the blocks from resources.js they still appeared in the dropdown menu as available blocks, even when they simply defaulted to a bokeh block after I created them.

resources.js is now only used as an override for custom components, the web app will try to show any block defined in /info/blocks so to test out this PR you have to make a block that is not defined there.

My previous problem seems to have gone away and this now works nicely for me, so I'm going to merge! Thanks @BenjaminCharmes!

@ml-evs ml-evs merged commit 2db7144 into main Jul 9, 2025
18 checks passed
@ml-evs ml-evs deleted the bc/unknow-blocktype branch July 9, 2025 08:54
@ml-evs ml-evs added webapp For issues/PRs pertaining to the web interface usability labels Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability webapp For issues/PRs pertaining to the web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only emit warnings when an unknown block type is encountered
3 participants