-
Notifications
You must be signed in to change notification settings - Fork 6
Remove existingVersion and retain resourceId for charts and dataGrid containers in Canvas #2276
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
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2276 +/- ##
==========================================
+ Coverage 84.60% 84.61% +0.01%
==========================================
Files 281 281
Lines 27760 27762 +2
==========================================
+ Hits 23487 23492 +5
+ Misses 4273 4270 -3
🚀 New features to boost your workflow:
|
doctrino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff
Description
When using
cdf data download canvas, theexistingVersionfields from DMS were kept on the Canvas instance and container instance dump, which meant it was impractical to upload it into another CDF project withcdf data uploadsince this would lead to a version conflict in CDF (HTTP 400). This is fixed by enabling the existingkeep_existing_versionparameter inIndustrialCanvasApply.dump()resourceIdwas also being stripped from all CanvasContainerReferenceinstances. However for dataGrid and Charts these are required to be set to the value-1andcdf data uploadwould previously fail inContainerReference.__init__()when uploading any canvas with either of these included, sinceresourceIdis a required field (both in this model and the DM).For other resource types, we have existing logic which automatically replaces
resourceIdbased onexternalId, however this did not work forchartsanddataGriddue to these being special-cases.chartsthechartsIdproperty inContainerReferenceis used instead to reference the Chart. This is a reference to the Chart'sexternalId, which is the same used when uploading Charts, so this works without replacing any internal ID with the external ID.dataGrid, these are fully contained in their entirety within theContainerReferenceinstance, so no need for more logic to look up external resources.Bump
Changelog
Fixed
cdf data download canvasthat made it impractical to upload the canvas dump to a different CDF projectcdf data download canvasnow retains the expected format ofdataGridandchartsCanvas containers, making canvases containing these types of containers also supported when uploading canvases withcdf data upload.