Uploaded image for project: 'Hybrid Application Console'
  1. Hybrid Application Console
  2. HAC-375

Migrate API Discovery into the SDK

XMLWordPrintable

    • False
    • False
    • HAC Core Sprint 5, HAC Core Sprint 6

      Acceptance Criteria

      • Update the App Init SDK to manage OpenShift Console's apiDiscovery using GraphQL – we don't want GraphQL inside the SDK package
        • Make a new prop (ideally an object) in the AppInitSDK component that allows an app to bootstrap some key aspects of how they work
          • Provide an apiDiscovery method that allows them to optimize out their efforts on how their app loads up k8s information
            • This will become optional later, and we will have a fallback (not to be concerned in this ticket - HAC-390)
          • Provide a low level fetch call utility (`consoleFetchInternal` is what OpenShift Console uses)
      • Using a one-time effect hook in AppInitSDK, do the following:
        • Execute the apiDiscovery method that they provided
        • Pass the fetch util off to a new function that will manage it
      • Create a new file inside the SDK to manage internal app settings that the hosted app has provided us
        • Make this file have an exposed method for setting values (this will be used in the one-time hook above)
        • Store all passed items in local properties in this file (module properties)
        • Make a getter for each property (this will allow us to manage individual fallbacks if the property is not good for use)
      • Update the internal API call `consoleFetch` function to use the getter from the app settings file that houses the consoleFetchInternal function it was provided
        •  Move the old consoleFetchInternal into `console-app` package as it's part of the OpenShift Console implementation and not the SDK; probably worth a rename though
      • Test test test...

            jakumar jaivardhan Kumar
            aballantyne Andrew Ballantyne
            YaDan Pei YaDan Pei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: