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

[New-TestResources.ps1] Handle multiple segments in service directory path #2065

Merged
1 commit merged into from
Oct 5, 2021

Conversation

benbp
Copy link
Member

@benbp benbp commented Oct 4, 2021

This is primary to support second level nesting in service directories introduced by go (e.g. sdk/keyvault/azsecrets). See related.

@benbp benbp added the Central-EngSys This issue is owned by the Engineering System team. label Oct 4, 2021
@benbp benbp self-assigned this Oct 4, 2021
@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

$serviceName = if (Split-Path -IsAbsolute $ServiceDirectory) {
# If the ServiceDirectory has multiple segments use the last directory name
# e.g. D:\foo\bar -> bar or foo/bar -> bar
$serviceName = if (Split-Path $ServiceDirectory) {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it will matter but go also has some cases where the last part might not be unique.

Copy link
Member Author

Choose a reason for hiding this comment

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

Originally I was going to set it to replace slash characters with underscores, but then I saw this inner comment and figured the convention might instead be to use the leaf path only. I'd be in favor of changing that convention instead to avoid future duplication problems.

Copy link
Member Author

Choose a reason for hiding this comment

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

e.g. for absolute path, use leaf, for multi-segment, use full with replace?

Copy link
Member

Choose a reason for hiding this comment

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

I would stick with this for now and we can figure out another strategy if and when we hit a real issue.

@ghost
Copy link

ghost commented Oct 5, 2021

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.

@praveenkuttappan
Copy link
Member

/check-enforcer evaluate

@ghost ghost merged commit 5bd18b7 into Azure:main Oct 5, 2021
This pull request was closed.
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
Development

Successfully merging this pull request may close these issues.

5 participants