Skip to content

Merge stable into develop #6361

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 30 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f6f8aca
docs: add different content types for artifacts
wvandeun Apr 24, 2025
c2c33a2
docs: clarify supported transformation output formats
wvandeun Apr 24, 2025
658af4e
Refactor computed attribute update_computed_attribute_value_jinja2
ogenstad Apr 23, 2025
6cbf94f
Update vulnerable h11 package
ogenstad Apr 25, 2025
1494d53
Merge pull request #6353 from opsmill/wvd-20250424-add-artifact-conte…
wvandeun Apr 25, 2025
22e5c66
Merge pull request #6348 from opsmill/pog-refactor-computed-attribute…
ogenstad Apr 25, 2025
f9dfb54
Merge pull request #6360 from opsmill/pog-update-h11
ogenstad Apr 25, 2025
81d9f74
Mutating a backend node with extra attrs logs instead of raising (#6350)
LucasG0 Apr 25, 2025
0170e9a
fix(backend): improve IPPrefixReconcileQuery performance (#6249)
fatih-acar Apr 25, 2025
0b6d612
improve video player appearance
petercrocker Apr 26, 2025
7ceb878
update frontend dependencies
bilalabbad Apr 28, 2025
93b89f9
Merge pull request #6365 from opsmill/pmc-20250426-videos
petercrocker Apr 28, 2025
c773767
bump sdk to 1.11.1
lykinsbd Apr 28, 2025
2dda891
v1.2.7 release prep
lykinsbd Apr 28, 2025
979144c
chore: update docker-compose
opsmill-bot Apr 28, 2025
6f7f027
AggregatedConstraintChecker correctly raises errors (#6369)
LucasG0 Apr 28, 2025
f1ed7a3
fix(docs): bad pg_dump command with docker
fatih-acar Apr 28, 2025
afddfc6
fix(backend): reintroduce attribute value indexes
fatih-acar Apr 7, 2025
69e108e
fix(backend): improve node uniqueness constraint query
fatih-acar Apr 7, 2025
aa873bb
fix(backend): add db value index feature flag
fatih-acar Apr 25, 2025
e0feb8c
fix(backend, tests): failing migration test due to indexes
fatih-acar Apr 25, 2025
e0d98f6
ensure database index manager uses the correct database object
ajtmccarty Apr 28, 2025
847ea56
remove duplicate txn from Migration014
ajtmccarty Apr 28, 2025
2236fab
fix infrahub version in repository dispatch call in release workflow
wvandeun Apr 29, 2025
78b0d70
Upgrade Prefect to 3.3.7
ogenstad Apr 29, 2025
4853eb8
Merge pull request #6371 from opsmill/pog-prefect-3.3.7
ogenstad Apr 29, 2025
ba4f0c9
Fix flaky e2e test tutorial-1 (#6362)
pa-lem Apr 29, 2025
f2ed542
Merge pull request #6370 from opsmill/wvd-fix-repository-dispatch-wor…
wvandeun Apr 29, 2025
048608f
Move database constants to constants folder (#6372)
LucasG0 Apr 29, 2025
c0f9a31
Separate the query for object details and tasks count into two distin…
bilalabbad Apr 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ensure database index manager uses the correct database object
  • Loading branch information
ajtmccarty authored and fatih-acar committed Apr 28, 2025
commit e0d98f63304dad9aafaa4033ee43edb6c113f82c
10 changes: 1 addition & 9 deletions backend/infrahub/database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@
from infrahub.core.schema import MainSchemaTypes, NodeSchema
from infrahub.core.schema.schema_branch import SchemaBranch

from .manager import DatabaseManager

validated_database = {}
R = TypeVar("R")

Expand Down Expand Up @@ -134,7 +132,6 @@ def __init__(
mode: InfrahubDatabaseMode = InfrahubDatabaseMode.DRIVER,
db_type: DatabaseType | None = None,
default_neo4j_runtime: Neo4jRuntime = Neo4jRuntime.DEFAULT,
db_manager: DatabaseManager | None = None,
schemas: list[SchemaBranch] | None = None,
session: AsyncSession | None = None,
session_mode: InfrahubDatabaseSessionMode = InfrahubDatabaseSessionMode.WRITE,
Expand All @@ -161,10 +158,7 @@ def __init__(
else:
self.db_type = config.SETTINGS.database.db_type

if db_manager:
self.manager = db_manager
self.manager.db = self
elif self.db_type == DatabaseType.NEO4J:
if self.db_type == DatabaseType.NEO4J:
self.manager = DatabaseManagerNeo4j(db=self)
elif self.db_type == DatabaseType.MEMGRAPH:
self.manager = DatabaseManagerMemgraph(db=self)
Expand Down Expand Up @@ -228,7 +222,6 @@ def start_session(self, read_only: bool = False, schemas: list[SchemaBranch] | N
db_type=self.db_type,
default_neo4j_runtime=self.default_neo4j_runtime,
schemas=schemas or self._schemas.values(),
db_manager=self.manager,
driver=self._driver,
session_mode=session_mode,
queries_names_to_config=self.queries_names_to_config,
Expand All @@ -243,7 +236,6 @@ def start_transaction(self, schemas: list[SchemaBranch] | None = None) -> Infrah
db_type=self.db_type,
default_neo4j_runtime=self.default_neo4j_runtime,
schemas=schemas or self._schemas.values(),
db_manager=self.manager,
driver=self._driver,
session=self._session,
session_mode=self._session_mode,
Expand Down
4 changes: 0 additions & 4 deletions backend/tests/unit/core/migrations/graph/test_023.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ async def test_migration_023(db: InfrahubDatabase, branch, car_person_schema, re
)

migration = Migration023()
# Avoid error during initialization: uninitialize indexes so that the migration script doesn't try to add indexes
# Otherwise index manager tries to open a new transaction using an old InfrahubDatabase reference (it's not using the Migration transaction)
# That makes the db initialization phase fail early
db.manager.index.initialized = False
await migration.execute(db=db)
await migration.validate_migration(db=db)

Expand Down
4 changes: 0 additions & 4 deletions backend/tests/unit/core/migrations/graph/test_024.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ async def test_hierarchy_fix_migration(
default_schema_branch = registry.schema.get_schema_branch(name=registry.default_branch)
await registry.schema.load_schema_to_db(db=db, schema=default_schema_branch)
migration = Migration024()
# Avoid error during initialization: uninitialize indexes so that the migration script doesn't try to add indexes
# Otherwise index manager tries to open a new transaction using an old InfrahubDatabase reference (it's not using the Migration transaction)
# That makes the db initialization phase fail early
db.manager.index.initialized = False
mock_schema_manager = MagicMock(wraps=registry.schema)
mock_load_schema_from_db = AsyncMock(return_value=default_schema_branch)
mock_schema_manager.load_schema_from_db = mock_load_schema_from_db
Expand Down