fix(ingestion): register Drive entities in ENTITY_REFERENCE_CLASS_MAP and ES_INDEX_MAP#28104
Merged
Khairajani merged 3 commits intoMay 15, 2026
Conversation
The Automator app resolves resource types from resources.type against ENTITY_REFERENCE_CLASS_MAP. Drive entities (directory, file, spreadsheet, worksheet) and the driveService were missing, so selecting them in the Add Automation UI failed at runtime with: AutomatorException: Can't get class from resource type: directory Register the Drive data entities and driveService so the Automator can paginate and act on them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Drive entity resolution in ingestion utilities by registering Drive-related generated schema classes in ENTITY_REFERENCE_CLASS_MAP, enabling Automator workflows to resolve Drive resource types.
Changes:
- Adds imports for Drive data entities and
DriveService. - Registers
driveService,directory,file,spreadsheet, andworksheetin the entity reference class map.
Contributor
🟡 Playwright Results — all passed (13 flaky)✅ 4057 passed · ❌ 0 failed · 🟡 13 flaky · ⏭️ 103 skipped
🟡 13 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedRegisters Drive entities and OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
ulixius9
added a commit
that referenced
this pull request
May 15, 2026
… and ES_INDEX_MAP (#28104) * fix(ingestion): add Drive entities to ENTITY_REFERENCE_CLASS_MAP The Automator app resolves resource types from resources.type against ENTITY_REFERENCE_CLASS_MAP. Drive entities (directory, file, spreadsheet, worksheet) and the driveService were missing, so selecting them in the Add Automation UI failed at runtime with: AutomatorException: Can't get class from resource type: directory Register the Drive data entities and driveService so the Automator can paginate and act on them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Adding missng drive entity to ES MAP --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Khairajani <himanshukhairajani8@gmail.com> Co-authored-by: Himanshu Khairajani <46777429+Khairajani@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Drive entities (
directory,file,spreadsheet,worksheet) and thedriveServicewere missing from two ingestion-side registries:ENTITY_REFERENCE_CLASS_MAPinmetadata/utils/constants.py— used by the Automator app to resolve entity classes fromresources.type. Selecting a Drive entity in the Add Automation UI (AUTOMATOR_DATA_ASSETS_LIST) failed at runtime inAutomator.fetch_entities:ES_INDEX_MAPinmetadata/utils/elasticsearch.py— used to resolve the correct search index per entity class. Drive entities had no mapping, breaking search-index lookups during ingestion/automation flows.This PR registers the Drive data entities and
driveServicein both maps.Changes
metadata/utils/constants.pyDirectory,File,Spreadsheet,Worksheet,DriveServicedriveServiceto the service entities section ofENTITY_REFERENCE_CLASS_MAPdirectory,file,spreadsheet,worksheetunder a new "Drive Entities" sectionENTITY_REFERENCE_TYPE_MAPis derived from the class map, so it picks these up automatically.metadata/utils/elasticsearch.pyDirectory,File,Spreadsheet,WorksheetES_INDEX_MAPmapping each class to its*_search_indexTest plan
from metadata.utils.constants import ENTITY_REFERENCE_CLASS_MAPresolvesdirectory/file/spreadsheet/worksheet/driveServiceto their classesfrom metadata.utils.elasticsearch import ES_INDEX_MAPresolvesDirectory/File/Spreadsheet/Worksheetto their corresponding search indexesdirectoryresource type no longer raisesAutomatorException🤖 Generated with Claude Code