Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore: Rename Index -> AutoIndexJob#63955

Merged
varungandhi-src merged 15 commits into
mainfrom
vg/rename-2
Jul 22, 2024
Merged

chore: Rename Index -> AutoIndexJob#63955
varungandhi-src merged 15 commits into
mainfrom
vg/rename-2

Conversation

@varungandhi-src

@varungandhi-src varungandhi-src commented Jul 19, 2024

Copy link
Copy Markdown
Contributor
  • Rename associated local variables etc.
  • Rename IndexJob in autoindex/config/types.go to AutoIndexJobSpec

Test plan

Covered by existing tests

Changelog

@cla-bot cla-bot Bot added the cla-signed label Jul 19, 2024
@github-actions github-actions Bot added team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform labels Jul 19, 2024
@kritzcreek

Copy link
Copy Markdown
Contributor

Could you please rebase this one before I take a look?

Base automatically changed from vg/remove-ttl to main July 22, 2024 02:58

@kritzcreek kritzcreek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree the existing name is confusing. Not a fun amount of churn tough...

Comment thread internal/codeintel/uploads/internal/background/processor/job_worker_handler.go Outdated
Comment thread internal/codeintel/uploads/internal/store/indexes.go Outdated
Comment thread internal/codeintel/uploads/internal/store/store_test.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IndexLoaderFactory -> AutoIndexJobLoaderFactory

(starting to approach peak Java)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

(starting to approach peak Java)

The number of design patterns being used is unchanged (dataloader pattern and factory pattern) 😛

I'm surprised we're using factories though, I wonder if that's actually necessary/can be simplified, given that we don't have inheritance/struct embedding here.

Comment thread internal/codeintel/uploads/transport/graphql/iface.go Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we start the process of changing the GraphQL API as well? (new field + deprecation of old one)

Otherwise I fear we're just not going to do it and have different names in the code from the API

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updating the GraphQL API directly is a bit tricky because it currently mushes the two concepts of an "upload" and an "auto-indexing job" into a single type. But yes, we should fix that, I'll file a follow-up issue. I've also been thinking about renaming the tables.

@varungandhi-src

Copy link
Copy Markdown
Contributor Author

Not a fun amount of churn tough...

The mocks and test code are inflating the line count by too much, the actual delta is currently around 199 insertions(+), 197 deletions(-) (if I include test-only changes, that goes to 586 insertions(+), 583 deletions(-)).

@kritzcreek kritzcreek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Marked a couple more places I spotted. Looks good in general!

Comment thread internal/codeintel/autoindexing/internal/background/dependencies/utils.go Outdated
Comment thread internal/codeintel/autoindexing/service_test.go Outdated
Comment thread internal/codeintel/uploads/transport/graphql/root_resolver_index_queries.go Outdated
Comment thread internal/codeintel/uploads/transport/graphql/root_resolver_index_queries.go Outdated
Comment thread internal/codeintel/uploads/transport/graphql/root_resolver_index_queries.go Outdated
Comment thread internal/codeintel/uploads/transport/graphql/root_resolver_index_queries.go Outdated
Comment thread internal/codeintel/uploads/transport/graphql/root_resolver_index_queries.go Outdated
@varungandhi-src

Copy link
Copy Markdown
Contributor Author

Addressed all pending comments, thanks for taking a look.

@varungandhi-src varungandhi-src merged commit a6b6844 into main Jul 22, 2024
@varungandhi-src varungandhi-src deleted the vg/rename-2 branch July 22, 2024 14:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/graph Graph Team (previously Code Intel/Language Tools/Language Platform) team/product-platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants