Skip to content
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

Merged
merged 3 commits into from
Sep 9, 2024
Merged

fix id checking #1496

merged 3 commits into from
Sep 9, 2024

Conversation

jmhauck
Copy link
Collaborator

@jmhauck jmhauck commented Sep 6, 2024

No description provided.

@jmhauck jmhauck requested a review from MikeTschudi September 6, 2024 20:36
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (38a5614) to head (c66a98f).
Report is 4 commits behind head on develop.

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.
📢 Have feedback on the report? Share it here.

MikeTschudi
MikeTschudi previously approved these changes Sep 6, 2024
// update the dependencies
if (itemTemplate.dependencies.indexOf(id) === -1) {
itemTemplate.dependencies.push(id);
if (verifiedIds.indexOf(id) < 0 && id) {
Copy link
Member

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?

Copy link
Collaborator Author

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 jmhauck merged commit 2cde893 into develop Sep 9, 2024
9 checks passed
@jmhauck jmhauck deleted the webtool-id-check branch September 9, 2024 13:43
@chris-fox
Copy link
Collaborator

@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.

@jmhauck
Copy link
Collaborator Author

jmhauck commented Sep 9, 2024

@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?

@chris-fox
Copy link
Collaborator

@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.

@jmhauck
Copy link
Collaborator Author

jmhauck commented Sep 11, 2024

#1499

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.

3 participants