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

Clean up external-controller dependencies #7266

Merged
merged 4 commits into from
Aug 27, 2021

Conversation

ChumpChief
Copy link
Contributor

Starting to look into the dependencies beyond fluid-framework that an author needs to pull in, and saw some opportunity to trim on external-controller.

Most importantly I think app authors should have no server dependencies -- if generateUser() is actually a util that the app author wants, it should probably come from the corresponding client package (e.g. generateAzureUser()). Since generateUser() is not really recommendable (abusing the IUser interface) I just ditched it here.

@github-actions github-actions bot added the area: examples Changes that focus on our examples label Aug 27, 2021
@github-actions github-actions bot requested a review from skylerjokiel August 27, 2021 00:24
"fluid-framework": "^0.47.0",
"react": "^16.10.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

was this example just not using react? 🤔🤔🤔🤔🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think there were just some leftovers from evolution or copies.

@heliocliu
Copy link
Contributor

we kind of do want a generateUser() method that gives a human readable name (instead of a uuid here). i'd guess it might be useful for a 3rd party developer in some test scenarios as well, so i do think it's worth refactoring

@ChumpChief
Copy link
Contributor Author

we kind of do want a generateUser() method that gives a human readable name (instead of a uuid here). i'd guess it might be useful for a 3rd party developer in some test scenarios as well, so i do think it's worth refactoring

Yeah I can see that -- my thoughts here were basically:

  1. The user needs to end up being service-specific it seems
  2. The client packages are where we want to corral service-specific logic, we can't really be service-specific in the shared server packages like @fluidframework/server-services-client
  3. Rather than having the helper function return an IUser, the client packages are free to extend IUser however they like and return that from their helper (i.e. like IExtendedUser here in gateway: https://github.com/microsoft/FluidFramework/blob/main/server/gateway/src/routes/utils.ts). So e.g. maybe an IAzureUser and generateTestAzureUser()

In the meantime this retains the same functionality as currently implemented and drops the dependency.

@ChumpChief ChumpChief merged commit 6e1ae05 into microsoft:main Aug 27, 2021
@ChumpChief ChumpChief deleted the ExternalControllerTidy branch August 27, 2021 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Changes that focus on our examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants