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

Add support for rich code navigation in GitHub #12855

Merged
merged 7 commits into from
Apr 14, 2022
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
8 changes: 8 additions & 0 deletions build/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,11 @@ stages:
jobs:
- template: ./templates/check-formatting.yml


- stage: CodeIndexer
displayName: Github CodeNav Indexer
dependsOn: [Build_x64]
condition: succeeded()
jobs:
- template: ./templates/codenav-indexer.yml
Comment on lines +99 to +104
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof. Doesn't this mean it's going to run on every push and every rolling build? Won't that end up taking a massive amount of storage space for all those indexes to be saved? I would think we would run it only on main or something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a good question. Lemme bring in the codenav folks to see what they think

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Holly from the codenav team here! We're fine with this running with such high frequency and the storage load, we actually want to test how well we scale to highly active repos. I will say, most folks who onboard do only run our task on builds of main and a few teams have made a separate .yml file just for the build+codenav tasks so that they can have more fine-tuned control of when it runs, but it's up to you what builds you would find benefit from having navigation on.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bigger concern is that this will build against 3p code on pull requests. We might want to restrict it like we did the ARM64 build 😄

condition: not(eq(variables['Build.Reason'], 'PullRequest'))
1 change: 1 addition & 0 deletions build/pipelines/templates/build-console-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
BuildConfiguration: ${{ parameters.configuration }}
BuildPlatform: ${{ parameters.platform }}
WindowsTerminalBranding: ${{ parameters.branding }}
EnableRichCodeNavigation: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see anything using this variable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently it's magic to turn it on in the code nav tooling itself.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we use this parameter to tell us to run a specific package called RichCodeNav.EnvVarDump, which is needed for some builds so we can get information about the environment the build is running in.

pool:
${{ if eq(variables['System.CollectionUri'], 'https://dev.azure.com/ms/') }}:
name: WinDevPoolOSS-L
Expand Down
22 changes: 22 additions & 0 deletions build/pipelines/templates/codenav-indexer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
parameters:
artifactName: 'drop'

jobs:
- job: CodeNavIndexer
displayName: Run Github CodeNav Indexer
pool: { vmImage: windows-2019 }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it have to run on Windows? Windows is much slower than Linux at starting up here.

I mean it's fine, but just curious.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately right now we do have to run on Windows, but we're working on Linux support! We'll send out a mail once we have that ready so you can switch over!


steps:
- checkout: self
fetchDepth: 1
submodules: false
clean: true

- task: DownloadBuildArtifacts@0
inputs:
artifactName: ${{ parameters.artifactName }}

- task: RichCodeNavIndexer@0
inputs:
languages: 'cpp,csharp'
continueOnError: true