Skip to content

Several cleanups in CoreCLR YAML scripts - #236

Merged
trylek merged 8 commits into
dotnet:masterfrom
trylek:CoreClrPipelineCleanup
Nov 25, 2019
Merged

trylek merged 8 commits into
dotnet:masterfrom
trylek:CoreClrPipelineCleanup

Conversation

@trylek

@trylek trylek commented Nov 23, 2019 •

Copy link
Copy Markdown
Member
  1. Stop transporting the test subtree as it shouldn't be actually
    necessary.

  2. Clarify build phase names to cater for the combined repo.

  3. Unify naming style for managed and native test artifacts.

  4. Unify some build script executions for Windows / Unix.

  5. Reduce fetchDepth to 1 as it shouldn't be needed with the bundles.

1) Stop transporting the test subtree as it shouldn't be actually
necessary.
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-Infrastructure-coreclr Only use for closed issues label Nov 23, 2019
@trylek trylek changed the title WIP: various cleanups in CoreCLR build scripts WIP: several cleanups in CoreCLR YAML scripts Nov 23, 2019
@trylek trylek changed the title WIP: several cleanups in CoreCLR YAML scripts Several cleanups in CoreCLR YAML scripts Nov 23, 2019
Comment thread eng/pipelines/common/checkout-job.yml Outdated
- checkout: self
clean: true
fetchDepth: 5
fetchDepth: 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The AzDO recommendation is to not use one here is it can cause some subtle race conditions.

https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/pipeline-options-for-git?view=azure-devops#shallow-fetch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was originally under the impressions as this no longer applies to us with the git bundle solution but I think you're right there's theoretically still some small time window between the moment when AzDO determines the commit ID and the actual launch of the checkout job. I'll revert this part of the change, thanks for pointing that out!

# by switching over to using reference assembly.
${{ if ne(parameters.stagedBuild, true) }}:
dependsOn: ${{ format('build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
dependsOn: ${{ format('coreclr_product_build_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we have this approach where we re-generate the name on every dependsOn vs. saving the name into a variable?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The problem is that, according to my knowledge, variables are expanded too late - these parameters are needed too early as they are used to construct the dependency graph.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's correct. Variables are expanded at runtime vs dependsOn are expanded at compile time. I tried this and didn't succeed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ouch that's unfortunate.

@safern safern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! Thanks!

@trylek
trylek merged commit ced8b18 into dotnet:master Nov 25, 2019
@trylek
trylek deleted the CoreClrPipelineCleanup branch November 25, 2019 21:26
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Infrastructure-coreclr Only use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants