<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: nrwl.io</title>
    <description>The latest articles on Forem by nrwl.io (@nrwl_io).</description>
    <link>https://forem.com/nrwl_io</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F475198%2F1c70dbeb-710c-42a3-926c-ce5aff2434ab.png</url>
      <title>Forem: nrwl.io</title>
      <link>https://forem.com/nrwl_io</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nrwl_io"/>
    <language>en</language>
    <item>
      <title>Run Details View: Build Insights for Nx on Nx Cloud</title>
      <dc:creator>nrwl.io</dc:creator>
      <pubDate>Fri, 25 Sep 2020 15:00:12 +0000</pubDate>
      <link>https://forem.com/nrwl/run-details-view-build-insights-for-nx-on-nx-cloud-4mo4</link>
      <guid>https://forem.com/nrwl/run-details-view-build-insights-for-nx-on-nx-cloud-4mo4</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/iGpwcNuYtlY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Learn about Run Details View in Nx Cloud in less than 5 minutes — &lt;a href="https://youtu.be/iGpwcNuYtlY"&gt;https://youtu.be/iGpwcNuYtlY&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Somewhere on a remote team far, far away…
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;👨🏼‍💻 “Hey, I’ve got failing tests locally again :(”&lt;br&gt;
👩🏾‍💻 “Which ones?”&lt;br&gt;
👨🏼‍💻 “Uh…I’m not actually sure yet, I was running nx affected:test and it ended up testing all of the UI projects.”&lt;br&gt;
👩🏾‍💻 “Can you show me?”&lt;br&gt;
👨🏼‍💻 “Oh no…I’ve lost the command line output. My terminal buffer wasn’t big enough. I guess I’ll need to run the failed projects again.”&lt;br&gt;
👩🏾‍💻 “Ok. Just give me a ping when you’re ready.”&lt;br&gt;
👨🏼‍💻 “Sure. This might take a while…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Running tests against lots of projects can be a problem even in a relatively small monorepo. Your command line output could be thousands of lines long and this can be a nightmare to sift through when looking for the output of that one failing project and the tests that caused the entire run to fail. There has to be a better way.&lt;/p&gt;

&lt;p&gt;In CI/CD systems there is often a way to drill into the various runs that happen while testing the integrity of the latest pull request or merge into the main branch, but what about locally? Wouldn’t it be great if I could view that output in a better way and even share that with a colleague so we can get right into fixing the problem rather than trying to find it?&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect to Nx Cloud!
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;👩🏾‍💻 “I’ve had an idea, why don’t we connect our repo to the Nx Cloud app?”&lt;br&gt;
👨🏼‍💻 “How do I do that?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We’ve added a new argument, &lt;code&gt;--scan&lt;/code&gt;, that you can pass to any nx command. It will prompt you to connect to our &lt;a href="https://nx.app"&gt;Nx Cloud&lt;/a&gt; platform if necessary and then not only will you benefit from our free tier of compute caching but we will also log the output of that run and provide you a place to explore and share it!&lt;/p&gt;

&lt;p&gt;Say I want to run the test targets in all the projects:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JFc0kbLM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2ASpP6yniAsMKvCbPW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JFc0kbLM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2ASpP6yniAsMKvCbPW.png" alt="Terminal output to connect to Nx Cloud for free" width="880" height="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After completing the run you’ll see a message that gives you a URL where you can view your run details.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bZc4I_25--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AU3HHI0DxGBiDaU7x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bZc4I_25--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AU3HHI0DxGBiDaU7x.png" alt="Nx Cloud terminal output: see run details link" width="880" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  👀 Run Details View
&lt;/h2&gt;

&lt;p&gt;Following that URL will take you to the brand new Run Details view.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BsKVC6YR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AozN-5mrFviTMZ7_A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BsKVC6YR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AozN-5mrFviTMZ7_A.png" alt="Nx Cloud run details view" width="880" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the top you can see summary information about the run itself: how long it took, how many tasks failed and even some information about the machine that executed the run. Below all that are the executed tasks themselves, in this case each will be the execution of the test target against an individual project.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✅ Simple Filtering
&lt;/h2&gt;

&lt;p&gt;You can see at a glance the execution time of each task, whether it was a success or failure and even whether or not it was a cache hit or miss, but there might be too many to visually deal with. The project filter and toggles at the top allow you to reduce the tasks to only the ones you need to focus on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--60jkjjHf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2Apg1oEzcPSJWL8J_R.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--60jkjjHf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2Apg1oEzcPSJWL8J_R.png" alt="Nx Cloud run details filtering options" width="880" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you’ve found the project you need, you can expand the view to dig into the command line output itself.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uX9h_prK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AYQlB6R01p0N4QzBECzV2yg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uX9h_prK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AYQlB6R01p0N4QzBECzV2yg.png" alt="Run Details command line output details" width="880" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔒 Access Control
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;👨🏼‍💻 “This is great, but should we really leave these open to anyone?”&lt;br&gt;
👩🏾‍💻 “Let’s set up an organisation…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you’ve never connected your monorepo to Nx Cloud before the run detail view will be available to anyone with the unique url, so you can share that immediately. However, you’ll also see a message at the top of the page informing you that the workspace is currently public.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qObbF3aC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2ARAmuw79NdFu6AvLf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qObbF3aC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2ARAmuw79NdFu6AvLf.png" alt="Claim your workspace prompt on Nx Cloud" width="880" height="67"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Claiming the workspace connects it to your Nx Cloud account and allows you to limit access to only those in your organisation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--feThKq6P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2A3LE0zkxMLT1UbY0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--feThKq6P--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2A3LE0zkxMLT1UbY0x.png" alt="Claim Workspace page on Nx Cloud prompting for access token" width="880" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To access the run detail view from a claimed workspace you will need an Nx Cloud account. Workspace owners can easily invite members to collaborate in their organisation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y3raRTbg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AI9-9mSCv5pxxxuQ6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y3raRTbg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AI9-9mSCv5pxxxuQ6.png" alt="Invite members to Nx Cloud workspace" width="880" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🤝 Simpler Investigation &amp;amp; Collaboration
&lt;/h2&gt;

&lt;p&gt;One you’ve connected your monorepo to Nx Cloud we will provide unique urls to view each run that anyone working in the repository makes against it. We won’t record the command line output for every run unless you provide the &lt;code&gt;--scan&lt;/code&gt; argument each time, but if you’re sure you want to do this for every run, you can add &lt;code&gt;"scan" : true&lt;/code&gt; to the &lt;code&gt;tasksRunnerOptions&lt;/code&gt; in &lt;code&gt;nx.json&lt;/code&gt; at the root of the repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;👨🏼‍💻 “Amazing, but what about all the runs that happen on each PR?”&lt;br&gt;
👩🏾‍💻 “I think there’s an app for that…”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  🤖 GitHub Integration
&lt;/h2&gt;

&lt;p&gt;You can integrate our new &lt;a href="https://github.com/apps/nx-cloud"&gt;Nx Cloud companion app&lt;/a&gt; into your GitHub repos and get a full report in your pull requests including links to each of the runs performed against them. You can see a full report from a recent pull request into our public &lt;a href="https://github.com/nrwl/nx"&gt;Nx GitHub repository&lt;/a&gt; below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jcQ0vuiP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AwDqi1_T17xYyS-sM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jcQ0vuiP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/0%2AwDqi1_T17xYyS-sM.png" alt="Nx Cloud bot on GitHubNx Cloud bot on GitHub" width="880" height="698"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We use Nx Cloud on all our repositories at &lt;a href="https://nrwl.io"&gt;Nrwl&lt;/a&gt; and we’ve already found it extremely useful for investigating runs with a lot of output and when collaborating remotely. We hope you find it useful too!&lt;/p&gt;

&lt;h2&gt;
  
  
  👋 Epilogue
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;👨🏼‍💻 “Hey, I’ve got failing tests again. Here’s the run detail — &lt;a href="https://nx.app/runs/%E2%80%A6%E2%80%9D"&gt;https://nx.app/runs/…”&lt;/a&gt;&lt;br&gt;
👩🏾‍💻 “Thanks! Oh, I see which test it is. I think I know what might be the problem. Do you want to jump on a call and we can fix this now?”&lt;br&gt;
👨🏼‍💻 “Sure, let’s go!”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WFKJl9u4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/d0lfozs0i46sgh22gptr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WFKJl9u4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/d0lfozs0i46sgh22gptr.png" alt="Nx Cloud" width="880" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Run Details View is available now for free with &lt;a href="https://nx.dev"&gt;Nx dev tools&lt;/a&gt; on &lt;a href="https://nx.app"&gt;Nx Cloud&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Author:&lt;/strong&gt; Jo Hanna Pearce, &lt;a href="https://twitter.com/jdpearce"&gt;@jdpearce&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Video:&lt;/strong&gt; Rareș Matei, &lt;a href="https://twitter.com/__rares"&gt;@__rares&lt;/a&gt;&lt;/p&gt;

</description>
      <category>nx</category>
      <category>buildtool</category>
      <category>codesharing</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
