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

ALM feature. #601

Merged
merged 1 commit into from
Oct 30, 2021
Merged

ALM feature. #601

merged 1 commit into from
Oct 30, 2021

Conversation

s-KaiNet
Copy link
Collaborator

This PR adds ALM support to the PnP Core.
As discussed in the linked issue:

  • two extension methods were added to support different app catalogs - GetTenantAppManager and GetSiteCollectionAppManager
  • SyncToTeams methods were excluded until upstream SharePoint API will be fixed
  • tenant and site collection app managers use base AppManager class with core functionality
  • additional endpoints for tenant app manager were implemented based on the metadata.
  • the developer API remains consistent with the previous AppManager, however also adds new features, like using app instances to call Deploy, Install, etc. methods directly.

Feel free to add any comments, suggestions, corrections, etc. even if it requires a full code rewrite from my side. This is my very first big PR to the PnP Core library, so I'm just learning :)

Closes #215

@codecov-commenter
Copy link

Codecov Report

Merging #601 (006afc8) into dev (c13436b) will increase coverage by 6.67%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #601      +/-   ##
==========================================
+ Coverage   75.32%   82.00%   +6.67%     
==========================================
  Files         257      400     +143     
  Lines       19708    27475    +7767     
==========================================
+ Hits        14846    22532    +7686     
- Misses       4862     4943      +81     
Impacted Files Coverage Δ
...del/SharePoint/Core/Internal/FieldLocationValue.cs 0.00% <0.00%> (-35.49%) ⬇️
...ore.Auth/Utilities/ApplicationBuilderExtensions.cs 62.06% <0.00%> (-26.17%) ⬇️
...h/Public/UsernamePasswordAuthenticationProvider.cs 68.60% <0.00%> (-25.52%) ⬇️
...P.Core/QueryModel/Query/BaseDataModelExtensions.cs 38.88% <0.00%> (-23.07%) ⬇️
...k/PnP.Core/Model/Teams/Internal/TeamIdentitySet.cs 50.00% <0.00%> (-16.67%) ⬇️
src/sdk/PnP.Core/Utilities/StringExtensions.cs 85.07% <0.00%> (-14.93%) ⬇️
.../Model/Teams/Internal/TeamChatMessageAttachment.cs 85.71% <0.00%> (-14.29%) ⬇️
...e/Model/SharePoint/Core/Internal/StorageMetrics.cs 77.77% <0.00%> (-9.73%) ⬇️
...rc/sdk/PnP.Core/Services/Core/Query/QueryClient.cs 77.58% <0.00%> (-8.27%) ⬇️
....Core/QueryModel/Query/DataModelQueryTranslator.cs 77.61% <0.00%> (-7.11%) ⬇️
... and 262 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75632c4...006afc8. Read the comment docs.

@jansenbe jansenbe self-assigned this Oct 30, 2021
@jansenbe jansenbe added the area: model 📐 Related to the core SDK models label Oct 30, 2021
@jansenbe
Copy link
Contributor

Awesome work @s-KaiNet . I plan to review and process this PR in the coming days, super happy you've been helping out here 💪🥇🚀🎉

jansenbe added a commit that referenced this pull request Oct 30, 2021
@jansenbe jansenbe merged commit d1154c4 into pnp:dev Oct 30, 2021
@jansenbe
Copy link
Contributor

@s-KaiNet : just merged your PR. I'm truly impressed by the work you've done!! Very clean and well written code, super test coverage and documentation 🎉 Congrats on this great PR.

Hope you enjoyed doing it, you've managed to find your way in PnP Core SDK but if you've ideas about possible improvements then don't hesitate to call them out.

I could successfully run all but one test against my lab tenant: GetTenantAppCatalogUrlReturnsNullTest will only work when the tenant does not yet have an app catalog. I think that test will always fail for the majority of PnP Core SDK contributors, so for now I've commented out the test.

@s-KaiNet
Copy link
Collaborator Author

s-KaiNet commented Oct 30, 2021

woohoo! thanks @jansenbe!

I have a bit more free time now and, maybe will have it for a few upcoming months, thus I'm glad to contribute to other PnP Core SDK areas as well. I see issues with the "help wanted" tag and planning to start working on any of them next. Most likely it will be #217. If you have any prioritization among issues, then please suggest which one should I work and I will work on it instead.

@DaleyKD
Copy link
Contributor

DaleyKD commented Oct 30, 2021

@s-KaiNet : Thank you SO much, man. While my current project doesn't require anything with Apps, it is definitely something we use often. This is a great PR and I'm very thankful for it.

@jansenbe
Copy link
Contributor

Thanks for the nice words @DaleyKD 👍

@s-KaiNet : Contributing to PnP Core SDK is something you do in your spare time and I'm grateful you're helping out with PnP Core SDK. Feel free to pick any of the current issues or alternatively propose new areas: for example in the admin space there's still areas to cover. For the most important thing is that you pick something you enjoy working on.

The goal is to overtime make this an established .NET SDK for SharePoint+Teams development, without depending on the CSOM packages. In contrast with PnP Framework (and previously PnP Sites Core) the focus here is on performance, quality, test coverage and documentation...eventually this library will have enough features to allow for a deprecation of PnP Framework.

@s-KaiNet
Copy link
Collaborator Author

Thanks! Then the webhooks will be a nice feature to implement, cause I have some experience with hooks.

I love the idea of having a separate library to cover SharePoint and Teams. I remember some time ago there was a plan to open-source SharePoint CSOM. I can imagine how complicated the code inside CSOM is, how much legacy stuff is in there. It's not possible to contribute to such a library at all. Maybe it's good that it's not open-sourced :). From my understanding in the future, PnP Core SDK will become the "new CSOM" and "new PnP Framework". But a lot more stable and easier to contribute to. And that's cool.

@s-KaiNet s-KaiNet deleted the alm-api-feature branch November 9, 2021 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: model 📐 Related to the core SDK models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create models for ALM APIs
4 participants