Elasticsearch connection string `scope` key has no effect on index names
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Start with src/Exceptionless.Core/Configuration/ElasticsearchOptions.cs, especially ReadFromConfiguration and ParseConnectionString, then check src/Exceptionless.Core/Jobs/Elastic/DataMigrationJob.cs and the index configuration files named in the issue. Trace how Scope, ScopePrefix, and EnableSnapshotJobs are set for both Elasticsearch configurations. Done when the scope behavior matches the chosen expected outcome and index prefixes use consistent separators.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
ElasticsearchOptions parses a scope key from ConnectionStrings:Elasticsearch, but index names are built from ScopePrefix, which is computed from AppScope before the connection string is parsed. Setting scope= in the Elasticsearch connection string changes nothing.
Where
ElasticsearchOptions.ReadFromConfigurationsetsScope = appOptions.AppScopeandScopePrefixfrom it, then callsParseConnectionString.ParseConnectionStringoverwritesScopefrom thescopekey but never recomputesScopePrefix.- Every index uses
ScopePrefix, e.g.EventIndexand the migrations index. Nothing readsElasticsearchOptions.Scopefor the main cluster. - The only reader of
ScopeisDataMigrationJob, forElasticsearchToMigrate, where it is used as a raw prefix with no-separator (scope=prodgivesprodorganizations-v1, while the main cluster's prefix would beprod-).
Steps to reproduce
- Run with
EX_ConnectionStrings__Elasticsearch=server=http://localhost:9200;scope=testand noEX_AppScope. - List indexes: they are
events-v1-*,stacks-v1,organizations-v1, etc., without atest-prefix.
Expected
Either scope in the Elasticsearch connection string prefixes index names the same way AppScope does, or the key is not parsed at all.
Suggested fix
Set ScopePrefix at the end of ParseConnectionString (ScopePrefix = String.IsNullOrEmpty(Scope) ? "" : $"{Scope}-"), so both the main and ElasticsearchToMigrate options get it, and compute the EnableSnapshotJobs default after parsing, since it depends on ScopePrefix. In DataMigrationJob, use ElasticsearchToMigrate.ScopePrefix so both sides use the same - separator. If per-connection scoping isn't wanted, remove the scope parsing for the main connection string and keep it only for ElasticsearchToMigrate.
- Lenguaje dominante
- C#
- Estrellas
- 2.5k
- Forks
- 508
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 40
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de exceptionless/Exceptionless
-
bug documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
exceptionless/Exceptionless#2707 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
exceptionless/Exceptionless#2706 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
exceptionless/Exceptionless#2705 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
exceptionless/Exceptionless#2704 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
exceptionless/Exceptionless#2703 ·
Los mantenedores suelen responder en 1 día
Todos los issues de exceptionless/Exceptionless
Issues similares
-
Add dependency list in documentsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 3 días
-
Add 'upm' tag on githubAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
bug mac アプリ: コード アプリ: チャット 優先: 中 要トリアージ
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
yksr-melt/Meltype#1346 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Collect corrected translations in the app, with no GitHub account and the least possible frictionAbiertolocalization medium ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
hexide-io/HexIDE#2819 · 1 comentario ·
Los mantenedores suelen responder en 1 día