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

Remove references to specific runtimes in frontend #2119

Closed
duongnt opened this issue Sep 9, 2021 · 1 comment
Closed

Remove references to specific runtimes in frontend #2119

duongnt opened this issue Sep 9, 2021 · 1 comment
Labels
kind:enhancement New feature or request

Comments

@duongnt
Copy link
Contributor

duongnt commented Sep 9, 2021

Issue
There are hardcoded references to specific runtimes (airflow, kfp) in the frontend code. Couple of issues with this:

  • bringing your own runtimes would require changing frontend code (e.g. adding a new icon for a new runtime)
  • frontend code is more bloated than necessary

Grepping for kfp or airflow returns those hits:

packages/pipeline-editor/src/PipelineEditorWidget.tsx:          pipelineRuntimeName === 'kfp'
packages/pipeline-editor/src/PipelineService.tsx:export const KFP_SCHEMA = 'kfp';
packages/pipeline-editor/src/index.ts:                runtime.name === 'kfp' ? 2 : runtime.name === 'airflow' ? 3 : 4
packages/pipeline-editor/src/index.ts:            runtime.name === 'kfp' ? 31 : runtime.name === 'airflow' ? 32 : 33
packages/pipeline-editor/src/pipeline-hooks.ts:      case 'kfp':
packages/services/src/test/application.spec.ts:          'kfp',
packages/ui-components/src/icons.tsx:  name: 'elyra:kfp',
packages/pipeline-editor/src/PipelineEditorWidget.tsx:  airflowIcon
packages/pipeline-editor/src/PipelineEditorWidget.tsx:            : pipelineRuntimeName === 'airflow'
packages/pipeline-editor/src/PipelineEditorWidget.tsx:            ? airflowIcon
packages/pipeline-editor/src/PipelineService.tsx:            {response['platform'] == 'airflow' ? (
packages/pipeline-editor/src/RuntimesWidget.tsx:    if (metadata.schema_name === 'airflow' && metadata_props) {
packages/pipeline-editor/src/index.ts:                runtime.name === 'kfp' ? 2 : runtime.name === 'airflow' ? 3 : 4
packages/pipeline-editor/src/index.ts:            runtime.name === 'kfp' ? 31 : runtime.name === 'airflow' ? 32 : 33
packages/pipeline-editor/src/pipeline-hooks.ts:  airflowIcon,
packages/pipeline-editor/src/pipeline-hooks.ts:      case 'airflow':
packages/pipeline-editor/src/pipeline-hooks.ts:        category.image = IconUtil.encode(airflowIcon);
packages/pipeline-editor/src/pipeline-hooks.ts:  const runtimeIcons = [kubeflowIcon, airflowIcon];
packages/services/src/test/application.spec.ts:          'airflow'
packages/ui-components/src/icons.tsx:import airflowSvg from '../style/icons/airflow.svg';
packages/ui-components/src/icons.tsx:export const airflowIcon = new LabIcon({
packages/ui-components/src/icons.tsx:  name: 'elyra:airflow',
packages/ui-components/src/icons.tsx:  svgstr: airflowSvg

Describe the solution you'd like
Remove those hardcoded references. Frontend should be agnostic to the list of available runtimes.

Describe alternatives you've considered
Adding even more hardcode refs?

@akchinSTC
Copy link
Member

akchinSTC commented Dec 6, 2021

addressed by : #2135

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants