You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/concepts/stack/stack-settings.md
+37-7
Original file line number
Diff line number
Diff line change
@@ -80,17 +80,47 @@ Environment variables are preserved from one phase to the next.
80
80
81
81
#### Note on hook ordering
82
82
83
-
Hooks added to stacks and contexts attached to them follow distinct ordering principles. Stack hooks are organized through a drag-and-drop mechanism, while context hooks adhere to prioritization based on context priority. Additionally, auto-attached contexts are arranged alphabetically.
83
+
Hooks added to stacks and contexts attached to them follow distinct ordering principles. Stack hooks are organized through a drag-and-drop mechanism, while context hooks adhere to prioritization based on context priority. Additionally, auto-attached contexts are arranged alphabetically or reversed alphabetically depending on the operation type (before/after).
84
84
85
-
In the before phase, the priority of stack hooks is secondary to that of context hooks. Conversely, in the after phase, this priority order is reversed.
85
+
Hooks from manually and auto-attached contexts can only be edited from their respective views.
86
86
87
-
Hooks from both manually and auto-attached contexts can only be edited from their respective views. Specifically, in the before phase:
87
+
In the before phase, hook priorities work as follows:
88
88
89
-
- Hooks from manually attached contexts take precedence and are arranged according to context attachment priority.
90
-
- Subsequently, hooks from auto-attached contexts, ordered alphabetically.
91
-
- Stack hooks occupy the final position in the sequence.
In the after phase, hook priorities work as follows:
94
+
95
+
- stack hooks
96
+
- context auto-attached hooks (alphabetically)
97
+
- context hooks (reversed priorities)
98
+
99
+
Let's suppose you have 4 contexts attached to a stack:
100
+
101
+
- context_a (auto-attached)
102
+
- context_b (auto-attached)
103
+
- context_c (priority 0)
104
+
- context_d (priority 5)
105
+
106
+
In all of these contexts, we have added hooks that echo the context name before and after phases. To add to this, we will also add two static hooks on the stack level that will do a simple "echo stack".
0 commit comments