Skip to content

avoid marking non-existent project as indexed in the webapp #4800

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

Merged
merged 4 commits into from
Jun 16, 2025

Conversation

vladak
Copy link
Member

@vladak vladak commented Jun 12, 2025

This change gets rid of the warning message for newly discovered projects during indexer run.

I contemplated various solutions:

  • relaxing the indexed API call to ignore non-existent projects (lacks transparency / hides errors)
  • propagating the list of discovered projects from the prepareIndexer() (too complex and would not reflect real webapp state)
  • inferring project existence via project property call (clunky)

In the end the code retrieves the current list of projects known to the webapp. While this may seem a bit heavy, because this will be done for each indexed project, the webapp should withstand the traffic just fine and I wanted to avoid stashing the list in RuntimeEnvironment or somewhere in the Indexer and passing it around to IndexDatabase. Of course, I could have introduced new API end point to check for project existence, however deemed this unnecessary at this point.

Naturally, there is a time window between the check and the eventual mark-as-indexed operation, however let's assume the chance of the project to be deleted in that window is negligible.

While there, I refactored the code which performs the API call to mark the project as indexed into IndexerUtil.

@vladak vladak added the indexer label Jun 12, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 12, 2025
@vladak vladak requested a review from ginoaugustine June 12, 2025 16:07
@vladak vladak changed the title avoid marking project as indexed in the webapp if not known avoid marking new project as indexed in the webapp Jun 12, 2025
@vladak vladak force-pushed the indexer_new_projects_vs_indexed branch from b43b157 to aa69d0e Compare June 13, 2025 07:53
@vladak vladak changed the title avoid marking new project as indexed in the webapp avoid marking non-existent project as indexed in the webapp Jun 13, 2025
@vladak vladak merged commit 4dd9102 into oracle:master Jun 16, 2025
10 checks passed
@vladak vladak deleted the indexer_new_projects_vs_indexed branch June 16, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indexer OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants