Skip to content

Conversation

@benbp
Copy link
Member

@benbp benbp commented Jan 4, 2022

This PR updates the weekly test pipeline to run by default for all services (which will behave like our weekday live tests). It also fixes a scheduling/bucketing problem where the weekly tests were running on both Saturday and Sunday.

Update: this PR also adds name collision detection for pipeline definitions, with a helpful log message for a workaround. Resolves #2474
Resolves #2377

@benbp benbp requested review from a team and weshaggard as code owners January 4, 2022 01:03
@benbp benbp added the Central-EngSys This issue is owned by the Engineering System team. label Jan 4, 2022
@benbp benbp self-assigned this Jan 4, 2022
@benbp benbp force-pushed the benbp/pipeline-gen-update-existing branch from 63be900 to 86df19c Compare January 4, 2022 22:07
@benbp benbp changed the title [pipeline generator] Add flag to only update existing pipelines (for weekly tests). [pipeline generator] Build out weekly test pipelines for all services and fix scheduling Jan 4, 2022
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

Couple comments/suggestions but otherwise looks good.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow


logger.LogInformation("Found {0} components", components.Count());

if (HasPipelineDefinitionNameDuplicates(pipelineConvention, components))
Copy link
Member

Choose a reason for hiding this comment

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

This might cause our pipeline generation to start failing so you need to be careful when you enable it for the first time.

Copy link
Member Author

Choose a reason for hiding this comment

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

Tested locally, it passes for all repos (up, ci, tests, weekly conventions). Minor issue with local copies of node_modules causing duplicates, but that's an edge case that I think is ok and won't affect the pipeline.


foreach (var component in components)
{
var definitionName = convention.GetDefinitionName(component);
Copy link
Member

Choose a reason for hiding this comment

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

IIRC this causes a network call each time and we already do this in other places. Should we just add the dictionary building and checking there instead?

Copy link
Member

Choose a reason for hiding this comment

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

Somewhere in CreateOrUpdateDefinitionAsync?

Copy link
Member Author

Choose a reason for hiding this comment

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

GetDefinitionName is just a string building function, for example:

return component.Variant == null ? $"{Context.Prefix} - {component.Name} - ci" : $"{Context.Prefix} - {component.Name} - ci.{component.Variant}";

It's less efficient to do a separate check here as opposed to adding this logic incrementally in the scan step, but I think it's simpler this way and won't have any noticeable impact.

Copy link
Member

Choose a reason for hiding this comment

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

OK as long as we are just processing things in memory and not making more network calls I'm cool with making it an explicit check.

Copy link
Member Author

Choose a reason for hiding this comment

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

I also explicitly did it here vs. per update call, because I wanted to be able to collect all collisions in case there are more than 2, so that we can fail with full information about what needs to be fixed.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@ghost
Copy link

ghost commented Jan 5, 2022

Hello @azure-sdk!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@benbp
Copy link
Member Author

benbp commented Jan 6, 2022

/check-enforcer override

@benbp benbp merged commit eb5c368 into Azure:main Jan 6, 2022
@benbp benbp deleted the benbp/pipeline-gen-update-existing branch January 6, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Central-EngSys This issue is owned by the Engineering System team.

Projects

None yet

3 participants