-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix id checking #1496
fix id checking #1496
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1496 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 150 150
Lines 8080 8082 +2
Branches 1853 1797 -56
=========================================
+ Hits 8080 8082 +2 ☔ View full report in Codecov by Sentry. |
// update the dependencies | ||
if (itemTemplate.dependencies.indexOf(id) === -1) { | ||
itemTemplate.dependencies.push(id); | ||
if (verifiedIds.indexOf(id) < 0 && id) { |
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.
- Can
id
be zero? - How about checking it before looking it up in verifiedIds?
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.
should be an item id string
@jmhauck, not sure if this is what you are doing, but I have been thinking it might be safest and easiest to just remove the logic to auto-discover item ids in python notebooks. Instead if we could just do a post process of a notebook after all the items have been discovered and swizzle any item ids that are present in the notebook and add those items as dependencies of the notebook? This is similar approach we take in other item types and works well. People just need to include the items in the group to ensure they are packaged and swizzled with the notebook. The other reason I think this would be good is sometimes people might want to reference an external resource in a notebook, like living atlas content that they don't want to package with the notebook. |
@chris-fox this change is for https://devtopia.esri.com/WebGIS/solution-deployment-apps/issues/172#issuecomment-4990734 Then for Notebooks...we are currently getting its data and searching for item ids. I will switch it to avoid this. Would I need to check all other item ids from the Solution against the notebooks data section then? |
@jmhauck, yes in the post process, we should search the notebook's data against all other item and group ids from the Solution. In addition, if we could also search for feature service urls from the solution in the notebook's data. |
No description provided.