Skip to content
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

docs(nx-dev): fixes for affected project graph post (#28992) #28993

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions docs/blog/2024-11-19-ci-affected-graph.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: See your affected graph in Nx Cloud
title: See your affected project graph in Nx Cloud
slug: ci-affected-graph
authors: ['Philip Fulcher']
tags: [nx-cloud]
Expand All @@ -9,23 +9,23 @@ youtubeUrl: https://youtu.be/TS-Fp2iSlVM

As monorepos grow in size and complexity, it can be difficult to understand the relationships between different parts of
your codebase. That's why Nx has the [graph visualization](/features/explore-graph) that helps you see the different
connections between projects and tasks in your workspace. But that runs locally, and sometimes you need to see that same graph from your CI's perspective. Now you can do that with the CI affected graph in Nx Cloud.
connections between projects and tasks in your workspace. But that runs locally, and sometimes you need to see that same graph from your CI's perspective. Now you can do that with the affected project graph in Nx Cloud.

## More insight into CI tasks

The CLI graph visualization can give you some information about what projects or tasks are affected by your changes. But
The CLI project graph visualization can give you some information about what projects or tasks are affected by your changes. But
CI may run different tasks than you do locally, or compare to different branches for affected calculations. So you often
feel like you're passing your work off to a black box with no insight into why a project is marked as affected on CI.

What do we mean by "marked as affected?" In a monorepo, running all your tasks, all the time, quickly becomes untenable. You'll either be wasting time waiting for tasks to finish, or spending a fortune on runners powerful enough to run in a timely manner. Instead, Nx analyzes the structure of your workspace and understands the relationship between different projects. When you run [`affected`](/ci/features/affected) tasks, it traces the projects that are actually affected by the change. For example, if you've made changes to a single app, Nx only marks that app as affected and doesn't run tasks for any other app.

## How do I use it?

The CI affected graph is available on all CI Pipeline Executions (CIPEs) in Nx Cloud. Click the new "Affected Graph" link at the top of your CIPE view.
The affected project graph is available on all CI Pipeline Executions (CIPEs) in Nx Cloud. Click the new "Affected Project Graph" link at the top of your CIPE view.

![Screenshot of CI affected graph on Nx Cloud](/blog/images/2024-11-19/screenshot.avif)
![Screenshot of CI affected project graph on Nx Cloud](/blog/images/2024-11-19/screenshot.avif)

The CI affected graph uses the new [Composite Graph](/features/explore-graph#focusing-on-valuable-projects) introduced in Nx 20.
The affected project graph uses the new [Composite Graph](/features/explore-graph#focusing-on-valuable-projects) introduced in Nx 20.
Groups of projects are collapsed into a single node on the graph based on directories. You can expand those nodes to see
inside by double-clicking them, or by clicking on the node and then clicking "Expand".

Expand Down
Binary file modified docs/blog/images/2024-11-19/header.avif
Binary file not shown.
Binary file modified docs/blog/images/2024-11-19/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.