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(services): ent-4669 move config to serviceConfig #909

Merged
merged 1 commit into from
Mar 17, 2022

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Mar 10, 2022

What's included

  • refactor(services): move config to serviceConfig
    • authentication, flip to platform redux action
    • platform, userActions, move authorizeUser
    • platform, userTypes, move authorize user type
    • userReducer, flip to platform redux types
    • userSelectors, passthrough for transformed responses
    • services, move config to serviceConfig
    • serviceConfig, expand cancel ability to url funcs
    • platformServices, schemas, transformers, mock calls
    • rhsmServices, testing naming for consistency
    • userServices, remove deprecated authorizeUser func

Notes

  • This PR is an interim step intended to get the service layer in a position to
    • treat both API and global methods as service calls which allow us to programmatically maintain/generate parts of our state layer (Redux) because everything generates a similar response
    • apply transforms and schema checks to global platform methods
    • allow removing the userSelector, where we currently perform transforms for our "session" state, and move towards authentication context and a session hook
  • The primary testing concerns with this PR are
    • we moved the transformations from "userSelector" into a "platformTransformer" ... if the GUI renders correctly is the basic platform check... if we messed up none of it would show up, it's pretty sensitive
    • we moved the function that performs the primary Axios service configuration... checking to make sure all service calls come through, and that if a service call is hit multiple times a "cancel" and "cache" are returned (the check is to make sure only one network call is being performed with the 10 second extended caching setting)

How to test

Coverage and basic unit test check

  1. update the NPM packages with $ yarn
  2. $ yarn test
  3. confirm all tests come back clean

Local run check

  1. update the NPM packages with $ yarn
  2. $ yarn start
  3. confirm product views render as normal

Proxy run check

  1. update the NPM packages with $ yarn
  2. make sure Docker is running, plus on network, then
  3. $ yarn start:proxy
  4. confirm product views render as normal

Example

...

Updates issue/story

ent-4669

@cdcabrera cdcabrera added the 202204 project phase label Mar 10, 2022
@cdcabrera cdcabrera force-pushed the ent-4669-services branch 2 times, most recently from d7034b6 to e8c98fc Compare March 16, 2022 17:24
@cdcabrera cdcabrera marked this pull request as ready for review March 16, 2022 17:38
* authentication, flip to platform redux action
* platform, userActions, move authorizeUser
* platform, userTypes, move authorize user type
* userReducer, flip to platform redux types
* userSelectors, passthrough for transformed responses
* services, move config to serviceConfig
* serviceConfig, expand cancel ability to url funcs
* platformServices, schemas, transformers, mock calls
* rhsmServices, testing naming for consistency
* userServices, remove deprecated authorizeUser func
@cdcabrera cdcabrera closed this Mar 16, 2022
@cdcabrera cdcabrera reopened this Mar 16, 2022
@cdcabrera cdcabrera changed the title WIP refactor(user,platformServices): ent-4669 mock service calls refactor(services): ent-4669 move config to serviceConfig Mar 16, 2022
@cdcabrera cdcabrera merged commit fecd183 into RedHatInsights:ci Mar 17, 2022
cdcabrera added a commit that referenced this pull request Apr 14, 2022
* authentication, flip to platform redux action
* platform, userActions, move authorizeUser
* platform, userTypes, move authorize user type
* userReducer, flip to platform redux types
* userSelectors, passthrough for transformed responses
* services, move config to serviceConfig
* serviceConfig, expand cancel ability to url funcs
* platformServices, schemas, transformers, mock calls
* rhsmServices, testing naming for consistency
* userServices, remove deprecated authorizeUser func
@cdcabrera cdcabrera mentioned this pull request Apr 14, 2022
cdcabrera added a commit that referenced this pull request Apr 19, 2022
* authentication, flip to platform redux action
* platform, userActions, move authorizeUser
* platform, userTypes, move authorize user type
* userReducer, flip to platform redux types
* userSelectors, passthrough for transformed responses
* services, move config to serviceConfig
* serviceConfig, expand cancel ability to url funcs
* platformServices, schemas, transformers, mock calls
* rhsmServices, testing naming for consistency
* userServices, remove deprecated authorizeUser func
cdcabrera added a commit that referenced this pull request Jun 14, 2022
* authentication, flip to platform redux action
* platform, userActions, move authorizeUser
* platform, userTypes, move authorize user type
* userReducer, flip to platform redux types
* userSelectors, passthrough for transformed responses
* services, move config to serviceConfig
* serviceConfig, expand cancel ability to url funcs
* platformServices, schemas, transformers, mock calls
* rhsmServices, testing naming for consistency
* userServices, remove deprecated authorizeUser func
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202204 project phase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant