Skip to content

Commit e01e1cf

Browse files
upload artifacts
1 parent c351bbb commit e01e1cf

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/bean-instantiations.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
env:
1717
MAX_STARTUP_DEPENDENCY_CHAIN_LENGTH: 9
18-
MAX_DEFERRED_CHAIN_LENGTH: 10
18+
MAX_DEFERRED_CHAIN_LENGTH: 16
1919
MIN_INSTANTIATED_BEANS: 20
2020
MAX_INSTANTIATED_BEANS: 96
2121
MIN_DEFERRED_CHAIN_LENGTH: 1
@@ -219,7 +219,7 @@ jobs:
219219
echo "Chains exceeding threshold:"
220220
(grep -E "$STARTUP_DEEP_CHAIN_PATTERN" "$LOG_FILE" || echo " (No detailed chains found in log)")
221221
echo "🔧 These chains violate the threshold MAX_STARTUP_DEPENDENCY_CHAIN_LENGTH. Please refactor them to break these chains."
222-
echo "You can find a visualization of the bean instantiation graph in startupBeans.dot when starting the application locally."
222+
echo "You can find a visualization of the bean instantiation graph in the artifacts of this job in startupBeans.dot"
223223
echo "You can visualize the file on http://webgraphviz.com/"
224224
else
225225
echo "✅ No startup dependency chains exceed the threshold of $MAX_STARTUP_DEPENDENCY_CHAIN_LENGTH"
@@ -306,7 +306,7 @@ jobs:
306306
echo "Chains exceeding threshold:"
307307
(grep -E "$DEFERRED_LONG_CHAIN_PATTERN" "$LOG_FILE" || echo " (No detailed chains found in log)")
308308
echo "🔧 These chains violate the threshold MAX_DEFERRED_CHAIN_LENGTH. Please refactor them to break these chains."
309-
echo "You can find a visualization of the bean instantiation graph in deferredEagerBeanInstantiationViolations.dot when starting the application locally."
309+
echo "You can find a visualization of the bean instantiation graph in in the artifacts of this job in deferredEagerBeanInstantiationViolations.dot."
310310
echo "You can visualize the file on http://webgraphviz.com/"
311311
else
312312
echo "✅ No deferred dependency chains exceed the threshold of $MAX_DEFERRED_CHAIN_LENGTH"
@@ -322,3 +322,13 @@ jobs:
322322
run: |
323323
set -Eeuo pipefail
324324
kill "$(cat app.pid)" || true
325+
326+
- name: Upload artifacts
327+
if: failure()
328+
uses: actions/upload-artifact@v4
329+
with:
330+
name: bean-instantiation-graphs-and-logs
331+
path: |
332+
startupBeans.dot
333+
deferredEagerBeanInstantiationViolations.dot
334+
app.log

src/main/java/de/tum/cit/aet/artemis/core/config/BeanInstantiationTracer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class BeanInstantiationTracer implements InstantiationAwareBeanPostProces
3434
// Keep these two constants in sync with the values in .github/workflows/bean-instantiations.yml
3535
private static final int STARTUP_MAX_DEPENDENCY_CHAIN_THRESHOLD = 9;
3636

37-
private static final int DEFERRED_INIT_MAX_DEPENDENCY_CHAIN_THRESHOLD = 10;
37+
private static final int DEFERRED_INIT_MAX_DEPENDENCY_CHAIN_THRESHOLD = 16;
3838

3939
private static final Logger log = LoggerFactory.getLogger(BeanInstantiationTracer.class);
4040

0 commit comments

Comments
 (0)