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

Refactor repo root dir layout #5056

Closed
konrad-jamrozik opened this issue Jan 5, 2023 · 10 comments
Closed

Refactor repo root dir layout #5056

konrad-jamrozik opened this issue Jan 5, 2023 · 10 comments
Assignees
Labels
Central-EngSys This issue is owned by the Engineering System team.

Comments

@konrad-jamrozik
Copy link
Contributor

Per following @weshaggard's comments:

we should restructure our repo directory layout. Namely, we should:

  • Move /.azure-pipelines/ under /eng/pipelines/
  • Move /config/ under /eng/
  • Move /scripts/ under /eng/
  • Move /src/ and /web/ under appropriate subdirs of /tools/
@ghost ghost added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 5, 2023
@konrad-jamrozik konrad-jamrozik self-assigned this Jan 5, 2023
@konrad-jamrozik konrad-jamrozik added Central-EngSys This issue is owned by the Engineering System team. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Jan 5, 2023
@konrad-jamrozik konrad-jamrozik moved this from 🤔Triage to 📋Backlog in Azure SDK EngSys 🚢🎉 Jan 5, 2023
@konrad-jamrozik konrad-jamrozik changed the title Refactor dir layout Refactor repo root dir layout Jan 9, 2023
@konrad-jamrozik
Copy link
Contributor Author

konrad-jamrozik commented Jan 24, 2023

@weshaggard I have few question about files under /.azure-pipelines/. There are pipelines defined over the .yml files in that dir:

.yml pipeline
.azure-pipelines/apiview-sync-staging.yml APIView Sync Production to Staging
.azure-pipelines/apiview.yml APIView - Deploy - Staging
.azure-pipelines/apiview.yml APIView
.azure-pipelines/warden.yml azure-sdk-tools - warden

My questions:

  • Is there an easy, reliable way for me to ensure the list above is exhaustive? I am fairly sure I should be able to find relevant ADO API call to return me json with all the pipelines and so search for given .yml, (I mean, our notification-configuration does something similar) but I was just wondering if we already have some automation for that.
  • How these pipelines came to be? Our pipeline-generator and prepare-pipelines.yml seems to create only pipelines that match inheritors of PipelineConvention, but these pipelines do not seem to match any convention? Have they been created by hand?
  • Is it a mistake that there are two pipelines based off .azure-pipelines/apiview.yml ? I compared them and I don't see any meaningful difference. Stages, params, vars, they all seem semantically equivalent.
  • I am thinking about doing simple migration as follows: move these build definitions .yml files to /eng/pipelines/, and as soon as I merge the PR, go to all these pipelines and point them to the new .yml file locations. This means they will be down for few seconds, but I suppose this is not a problem. Does that sound good?

@konrad-jamrozik konrad-jamrozik moved this from 📋Backlog to 🐝 Dev in Azure SDK EngSys 🚢🎉 Jan 24, 2023
@weshaggard
Copy link
Member

  1. See https://dev.azure.com/azure-sdk/internal/_git/azure-sdk-devops we dump the definitions there from time to time and you could grep over them there and even refresh if you need to.
  2. These pipelines and most of them in the tools repo was created manually as the don't follow the patterns of the mono repos.
  3. No we often will configure different pipelines by share the same yml. Usually in these cases there will be variables or branches or such created for the different pipelines.
  4. Yes I'm good with migrating these but lets please make sure the apiview team is aware of it.

@konrad-jamrozik
Copy link
Contributor Author

@praveenkuttappan @tjprescott @chidozieononiwu per this comment above, I am going to move the source .yml files for the listed API view pipelines.

These pipelines may be broken for few minutes max as I do that.

Can you confirm this works with you?

Also: can you tell me why we need both APIView - Deploy - Staging and APIView ? They use the same build definition and upon inspection, I was unable to determine what is the difference between these two.

@tjprescott
Copy link
Member

I'll defer to @praveenkuttappan on these APIView pipelines, as I don't think those are the ones for Python, Swift or Cadl.

@praveenkuttappan
Copy link
Member

@praveenkuttappan @tjprescott @chidozieononiwu per this comment above, I am going to move the source .yml files for the listed API view pipelines.

These pipelines may be broken for few minutes max as I do that.

Can you confirm this works with you?

Also: can you tell me why we need both APIView - Deploy - Staging and APIView ? They use the same build definition and upon inspection, I was unable to determine what is the difference between these two.

I had this in my TODO list to move them to APIView directory. We needed two pipelines to keep production deployment and dev/preprod deployment builds completely separated and releases to those environments are based on these pipelines accordingly. We can deploy all environments from same pipeline but then this can be more problematic to error prone to accidentally deploy from a wrong pipeline run to production slot.

@praveenkuttappan
Copy link
Member

@konrad-jamrozik It's totally fine to move the pipeline yaml. I can submit a PR since I need to make trigger change as well.

@praveenkuttappan
Copy link
Member

@konrad-jamrozik I have submitted PR #5244 to move pipeline YAMLs

@konrad-jamrozik
Copy link
Contributor Author

konrad-jamrozik commented Mar 4, 2023

@weshaggard @praveenkuttappan regarding /src/, appears to me almost everything under there is APIView.

Should we thus make a move like /src/ -> /tools/APIView/ ?

I am also curious: what dependencies APIView has on the rest of the repository? In other words, what would break if we would move APIView into its own repo?

The only other two things I see there besides APIView are:

  • /src/dotnet/Azure.ClientSDK.Analyzers/, which I guess should not be moved to /tools/ as it is not a tool but a package. Also, I see APIView depends on it.

  • /src/dotnet/Mgmt.CI.BuildTools/, which is hard for me to determine what it is or what depends on it. I guess these are some custom MSBuild tasks? In any case, likely also shouldn't be moved to /tools/.

@weshaggard
Copy link
Member

weshaggard commented Mar 6, 2023

Yes I would like to eventually move everything under src to somewhere under tools. While some of these things aren't stand alone tools they still fit in the general "tools" category and as such I would like them moved under the tools directory.

  • tools/apiview - Please work with @praveenkuttappan and @maririos with this move to try and minimize disruption.
  • tools/dotnet-analyzers - This is the .NET tools analyzer
  • tools/dotnet-mgmt-tools - This is an old set of tools that is still used for the track 1 mgmt package build. It isn't updated much currently but I don't think we can remove it fully yet.

@konrad-jamrozik
Copy link
Contributor Author

I have created an issue to track the move of /src/:

I have completed all the other moves, so closing this work item.

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

No branches or pull requests

4 participants