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 Scan functionality for assets-maintenance-tool #6269

Merged
merged 44 commits into from
Jun 8, 2023

Conversation

scbedd
Copy link
Member

@scbedd scbedd commented May 31, 2023

This PR adds the functionality of scanning an input configuration. Part of #4298 . Uses nunit per @benbp recommendation.

Originally, I asked @benbp if I could use SQLLite for the storage medium, but I just went with json for now. If this needs to change in the future, I am ready to do so.

  • Adds scan tool + ci + livetests.
  • Adds set of integration tests proving out functionality
  • Refactor all existing assets related "stuff" under this assets-automation folder.
  • Tests exercising functionality should offer a glimpse into both what comes out of this tool as well as what goes in as an input.
  • Ensure solution integration tests pass
  • Sort results within a resultset so that diffs generate consistently

After this goes in, I'll add the a build definition that invokes this tool and actually starts scanning and backing up our assets graph nightly.

scbedd added 28 commits May 8, 2023 16:34
@scbedd scbedd requested a review from a team as a code owner May 31, 2023 22:12
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scbedd
Copy link
Member Author

scbedd commented Jun 5, 2023

/azp run tools - assets-maintenance-tool - tests

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 6269 in repo Azure/azure-sdk-tools

@weshaggard
Copy link
Member

/azp run tools - assets-maintenance-tool - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@konrad-jamrozik konrad-jamrozik left a comment

Choose a reason for hiding this comment

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

I left bunch of nitpicky comments. I commented more than I usually do, because this is the first time I am looking into your stuff in details, so I stated bunch of my preferences and looking forward to hearing what's your take. Overall, I really appreciate the nice domain model and small methods!

Copy link
Contributor

@konrad-jamrozik konrad-jamrozik left a comment

Choose a reason for hiding this comment

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

I left a bunch of nitpicky comments. I commented more than I usually do, because this is the first time I am looking into your stuff in detail. I stated bunch of my preferences and looking forward to hearing what's your take. Overall, I really appreciate the nice domain model and small, easy to follow methods!

scbedd and others added 3 commits June 7, 2023 11:08
…s.Assets.MaintenanceTool/Scan/AssetsScanner.cs

Co-authored-by: Konrad Jamrozik <[email protected]>
…s.Assets.MaintenanceTool/Scan/AssetsScanner.cs

Co-authored-by: Konrad Jamrozik <[email protected]>
@scbedd
Copy link
Member Author

scbedd commented Jun 7, 2023

I left a bunch of nitpicky comments. I commented more than I usually do, because this is the first time I am looking into your stuff in detail. I stated bunch of my preferences and looking forward to hearing what's your take. Overall, I really appreciate the nice domain model and small, easy to follow methods!

Nice thank you for the detailed review! I've address the vast majority of them already, and am doing a slightly deeper refactor on the using suggestion + disk io comment.

Additionally I took the feedback about asset vs language repo and made it explicit literally everywhere.

@konrad-jamrozik
Copy link
Contributor

Nice thank you for the detailed review! I've address the vast majority of them already, and am doing a slightly deeper refactor on the using suggestion + disk io comment.

Additionally I took the feedback about asset vs language repo and made it explicit literally everywhere.

Awesome, glad to hear my feedback was useful!! Can you ping me when I should have another look? (which is optional; feel free to merge without it, too)

@scbedd
Copy link
Member Author

scbedd commented Jun 8, 2023

/azp run tools - assets-maintenance-tool - ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scbedd
Copy link
Member Author

scbedd commented Jun 8, 2023

/azp run tools - assets-maintenance-tool - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@scbedd scbedd merged commit 81667b1 into main Jun 8, 2023
@scbedd scbedd deleted the feature/add-assets-tooling branch June 8, 2023 20:42
@scbedd
Copy link
Member Author

scbedd commented Jun 8, 2023

Nice thank you for the detailed review! I've address the vast majority of them already, and am doing a slightly deeper refactor on the using suggestion + disk io comment.
Additionally I took the feedback about asset vs language repo and made it explicit literally everywhere.

Awesome, glad to hear my feedback was useful!! Can you ping me when I should have another look? (which is optional; feel free to merge without it, too)

Merged. I took most everything into account except for FileIO updates. <WarnAsErrors> will go in, I just didn't want to do yet another commit + test run before merging.

raych1 added a commit that referenced this pull request Jun 9, 2023
* Added switch to skip sync and generate script call

* Support forked spec repo in regex

* Rebase from main for below changes:

  Asset-Sync Documentation Update (#6303)

  add line offering additional detail
  remove extraneous newline

  Add `Scan` functionality for assets-maintenance-tool (#6269)

  Add new project `assets-maintenance-tool`. Implement `scan` functionality within. `backup` and `cleanup` still to come.
  Add integration tests for new assets-maintenance tool.
  Move original `asset-sync` powershell proto script into `tools/assets-automation/` folder
  Move `eng/scripts/python/assets-automation/` under `tools/assets-automation/assets-reporting/`
  Add ci.yml and tests.yml to invoke integration tests against the azure-sdk-assets-integration

Co-authored-by: Konrad Jamrozik <[email protected]>
Co-authored-by: Scott Beddall <[email protected]>
Co-authored-by: Konrad Jamrozik <[email protected]>
Co-authored-by: Praven Kuttappan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants