Skip to content

Commit 6021188

Browse files
authored
Merge pull request #6591 from opsmill/stable-to-develop
Stable to develop
2 parents 1a682ff + f36638c commit 6021188

File tree

8 files changed

+1582
-1539
lines changed

8 files changed

+1582
-1539
lines changed

backend/infrahub/core/diff/query/save.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def __init__(self, node_create_batch: list[EnrichedNodeCreateRequest], **kwargs:
7878

7979
async def query_init(self, db: InfrahubDatabase, **kwargs: Any) -> None: # noqa: ARG002
8080
self.params = self._build_node_batch_params()
81+
8182
query = """
8283
UNWIND $node_details_list AS node_details
8384
WITH

changelog/+generic-one.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Display generic relationships with cardinality one in the object detail view.

docs/docs/topics/schema.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ The `kind` of a model is generated by concatenating the `namespace` and the `nam
169169

170170
| ID | cardinality | Display in List View | Display in Detailed View | Display in Tab |
171171
| ------------------------- | ----------- | --------------------- | ------------------------- | -------------- |
172-
| `Generic` | `one` | No | No | Yes |
172+
| `Generic` | `one` | No | Yes | No |
173173
| `Generic` | `many` | No | No | Yes |
174174
| `Attribute` | `one` | Yes | Yes | No |
175175
| `Attribute` | `many` | Yes | Yes | No |

frontend/app/package-lock.json

Lines changed: 1521 additions & 1495 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/app/package.json

Lines changed: 36 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,25 @@
3838
"@codemirror/view": "^6.36.5",
3939
"@graphiql/plugin-explorer": "^3.2.5",
4040
"@graphiql/toolkit": "^0.11.1",
41-
"@headlessui/react": "^2.2.2",
41+
"@headlessui/react": "^2.2.4",
4242
"@heroicons/react": "^2.2.0",
4343
"@iconify-icon/react": "^2.3.0",
4444
"@iconify-json/mdi": "^1.2.3",
45-
"@radix-ui/react-accordion": "^1.2.8",
46-
"@radix-ui/react-dropdown-menu": "^2.1.12",
47-
"@radix-ui/react-label": "^2.1.4",
48-
"@radix-ui/react-popover": "^1.1.11",
49-
"@radix-ui/react-progress": "^1.1.4",
50-
"@radix-ui/react-scroll-area": "^1.2.6",
51-
"@radix-ui/react-slot": "^1.2.0",
52-
"@radix-ui/react-tabs": "^1.1.9",
53-
"@radix-ui/react-tooltip": "^1.2.4",
54-
"@tailwindcss/vite": "^4.1.4",
55-
"@tanstack/react-query": "^5.74.7",
56-
"@tanstack/react-query-devtools": "^5.74.7",
45+
"@radix-ui/react-accordion": "^1.2.11",
46+
"@radix-ui/react-dropdown-menu": "^2.1.15",
47+
"@radix-ui/react-label": "^2.1.7",
48+
"@radix-ui/react-popover": "^1.1.14",
49+
"@radix-ui/react-progress": "^1.1.7",
50+
"@radix-ui/react-scroll-area": "^1.2.9",
51+
"@radix-ui/react-slot": "^1.2.3",
52+
"@radix-ui/react-tabs": "^1.1.12",
53+
"@radix-ui/react-tooltip": "^1.2.7",
54+
"@tailwindcss/vite": "^4.1.8",
55+
"@tanstack/react-query": "^5.79.0",
56+
"@tanstack/react-query-devtools": "^5.79.0",
5757
"@tanstack/react-table": "^8.21.3",
5858
"@uiw/react-color": "^2.4.5",
59-
"@vitejs/plugin-react": "^4.4.1",
59+
"@vitejs/plugin-react": "^4.5.0",
6060
"class-variance-authority": "^0.7.1",
6161
"clsx": "^2.1.0",
6262
"cm6-graphql": "^0.2.0",
@@ -66,34 +66,34 @@
6666
"graphiql": "^3.8.3",
6767
"graphql": "^16.10.0",
6868
"handlebars": "^4.7.8",
69-
"jotai": "^2.12.3",
69+
"jotai": "^2.12.5",
7070
"json-to-graphql-query": "^2.2.5",
71-
"lucide-react": "^0.503.0",
72-
"openapi-fetch": "^0.13.5",
71+
"lucide-react": "^0.511.0",
72+
"openapi-fetch": "^0.14.0",
7373
"prismjs": "^1.29.0",
74-
"query-string": "^9.0.0",
74+
"query-string": "^9.2.0",
7575
"ramda": "^0.30.1",
7676
"react": "19.1.0",
7777
"react-accessible-treeview": "^2.11.1",
78-
"react-aria-components": "^1.8.0",
78+
"react-aria-components": "^1.9.0",
7979
"react-datepicker": "^8.1.0",
8080
"react-diff-view": "^3.2.0",
8181
"react-dom": "19.1.0",
82-
"react-error-boundary": "^5.0.0",
82+
"react-error-boundary": "^6.0.0",
8383
"react-hook-form": "^7.54.2",
8484
"react-markdown": "^10.1.0",
8585
"react-paginate": "^8.2.0",
86-
"react-resizable-panels": "^2.1.9",
87-
"react-router": "^7.5.2",
88-
"react-scan": "^0.3.3",
86+
"react-resizable-panels": "^3.0.2",
87+
"react-router": "^7.6.1",
88+
"react-scan": "^0.3.4",
8989
"react-simple-code-editor": "^0.14.1",
9090
"react-syntax-highlighter": "^15.6.1",
9191
"react-toastify": "^9.1.3",
9292
"recharts": "^2.15.3",
9393
"remark-gfm": "^4.0.1",
94-
"remeda": "^2.21.3",
94+
"remeda": "^2.22.5",
9595
"sha1": "^1.1.1",
96-
"tailwind-merge": "^3.2.0",
96+
"tailwind-merge": "^3.3.0",
9797
"tailwindcss-animate": "^1.0.7",
9898
"unidiff": "^1.0.4",
9999
"use-query-params": "^2.2.1",
@@ -103,26 +103,26 @@
103103
},
104104
"devDependencies": {
105105
"@biomejs/biome": "1.9.4",
106-
"@graphql-codegen/cli": "^5.0.5",
106+
"@graphql-codegen/cli": "^5.0.6",
107107
"@graphql-codegen/typescript": "^4.1.6",
108108
"@playwright/test": "^1.52.0",
109-
"@types/node": "^22.15.3",
109+
"@types/node": "^22.15.29",
110110
"@types/prismjs": "^1.26.5",
111111
"@types/ramda": "^0.30.2",
112-
"@types/react": "^19.1.2",
113-
"@types/react-dom": "^19.1.2",
112+
"@types/react": "^19.1.6",
113+
"@types/react-dom": "^19.1.5",
114114
"@types/react-syntax-highlighter": "^15.5.13",
115115
"@types/sha1": "^1.1.5",
116-
"@vitest/browser": "^3.1.2",
117-
"@vitest/coverage-v8": "^3.1.2",
118-
"cypress": "^14.3.2",
119-
"openapi-typescript": "^7.6.1",
116+
"@vitest/browser": "^3.1.4",
117+
"@vitest/coverage-v8": "^3.1.4",
118+
"cypress": "^14.4.0",
119+
"openapi-typescript": "^7.8.0",
120120
"playwright": "^1.52.0",
121-
"tailwindcss": "^4.1.4",
121+
"tailwindcss": "^4.1.8",
122122
"ts-node": "^10.9.2",
123123
"typescript": "^5.8.3",
124-
"vitest": "^3.1.2",
125-
"vitest-browser-react": "^0.1.1"
124+
"vitest": "^3.1.4",
125+
"vitest-browser-react": "^0.2.0"
126126
},
127127
"overrides": {
128128
"@graphiql/plugin-explorer": {
@@ -143,9 +143,6 @@
143143
"@codemirror/state": "^6.5.2",
144144
"@codemirror/view": "^6.36.5"
145145
},
146-
"react-scan": {
147-
"esbuild": "^0.25.0"
148-
},
149146
"react-syntax-highlighter": {
150147
"prismjs": "^1.30.0"
151148
}

frontend/app/src/entities/nodes/object/utils/get-relationships-visible-in-detailed-view.test.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ describe("getRelationshipsVisibleInDetailedView", () => {
2626
expect(result).toEqual(relationships);
2727
});
2828

29+
it("should return only Generic relationships with cardinality 'one'", () => {
30+
// GIVEN
31+
const relationships = [
32+
generateRelationshipSchema({ kind: "Generic", cardinality: "one" }),
33+
generateRelationshipSchema({ kind: "Generic", cardinality: "many" }),
34+
];
35+
36+
// WHEN
37+
const result = getRelationshipsVisibleInDetailedView(relationships);
38+
39+
// THEN
40+
expect(result).toEqual([generateRelationshipSchema({ kind: "Generic", cardinality: "one" })]);
41+
});
42+
2943
it("should return only Component relationships with cardinality 'one'", () => {
3044
// GIVEN
3145
const relationships = [
@@ -54,10 +68,10 @@ describe("getRelationshipsVisibleInDetailedView", () => {
5468
expect(result).toEqual([generateRelationshipSchema({ kind: "Hierarchy", cardinality: "one" })]);
5569
});
5670

57-
it("should not return other relationship types", () => {
71+
it("should not return Group relationship types", () => {
5872
// GIVEN
5973
const relationships = [
60-
generateRelationshipSchema({ kind: "Generic", cardinality: "one" }),
74+
generateRelationshipSchema({ kind: "Group", cardinality: "one" }),
6175
generateRelationshipSchema({ kind: "Group", cardinality: "many" }),
6276
];
6377

@@ -73,11 +87,13 @@ describe("getRelationshipsVisibleInDetailedView", () => {
7387
const relationships = [
7488
generateRelationshipSchema({ kind: "Attribute", cardinality: "many" }),
7589
generateRelationshipSchema({ kind: "Parent", cardinality: "one" }),
90+
generateRelationshipSchema({ kind: "Generic", cardinality: "one" }),
91+
generateRelationshipSchema({ kind: "Generic", cardinality: "many" }),
7692
generateRelationshipSchema({ kind: "Component", cardinality: "one" }),
7793
generateRelationshipSchema({ kind: "Component", cardinality: "many" }),
7894
generateRelationshipSchema({ kind: "Hierarchy", cardinality: "one" }),
7995
generateRelationshipSchema({ kind: "Hierarchy", cardinality: "many" }),
80-
generateRelationshipSchema({ kind: "Generic", cardinality: "one" }),
96+
generateRelationshipSchema({ kind: "Group", cardinality: "many" }),
8197
];
8298

8399
// WHEN
@@ -87,6 +103,7 @@ describe("getRelationshipsVisibleInDetailedView", () => {
87103
expect(result).toEqual([
88104
generateRelationshipSchema({ kind: "Attribute", cardinality: "many" }),
89105
generateRelationshipSchema({ kind: "Parent", cardinality: "one" }),
106+
generateRelationshipSchema({ kind: "Generic", cardinality: "one" }),
90107
generateRelationshipSchema({ kind: "Component", cardinality: "one" }),
91108
generateRelationshipSchema({ kind: "Hierarchy", cardinality: "one" }),
92109
]);

frontend/app/src/entities/nodes/object/utils/get-relationships-visible-in-detailed-view.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export function isRelationshipVisibleInDetailedView(
99
return true;
1010
}
1111
case "Component":
12+
case "Generic":
1213
case "Hierarchy": {
1314
return relationshipSchema.cardinality === "one";
1415
}

python_testcontainers/infrahub_testcontainers/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def default_branch(self) -> str:
6464

6565
@pytest.fixture(scope="class")
6666
def deployment_type(self, request: pytest.FixtureRequest) -> str | None:
67-
return request.config.getoption("infrahub_deployment_type")
67+
return request.config.getoption(name="infrahub_deployment_type", default=None)
6868

6969
@pytest.fixture(scope="class")
7070
def infrahub_compose(

0 commit comments

Comments
 (0)