Indexer FROM_SHA and TO_SHA should be sent as command line flags
Summary
The elasticsearch indexer is called on the command line with a combination of environment variables and command line flags. TO_SHA
and FROM_SHA
are currently sent as environment variables but they should be sent as flags as they are not environment configuration information. They should be sent in the same way that --project-path
is sent (--to-sha
and --from-sha
)
Improvements
This change will keep environment configuration information to environment variables and all data information related to the project being indexed to flags.
Risks
The gitlab-elasticsearch-indexer component may break if sidekiq workers send new data formats when the indexer code hasn't been updated yet. We can mitigate this by making the indexer changes backwards compatible (and support both environment variables and arguments)