Skip to content

Commit

Permalink
fix: rebuild subclass map with runtime class
Browse files Browse the repository at this point in the history
Signed-off-by: rkpattnaik780 <[email protected]>
  • Loading branch information
rkpattnaik780 committed Feb 7, 2024
1 parent a2deb58 commit 2ddec1f
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
30 changes: 15 additions & 15 deletions create-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,25 +862,25 @@ def initialize_config(args=None) -> SimpleNamespace:
"source_dir": os.path.join(os.getcwd(), DEFAULT_BUILD_DIR, "elyra"),
"old_version": elyra._version.__version__,
"old_npm_version": f"{v['major']}.{v['minor']}.{v['patch']}-dev",
"new_version": args.version
if (not args.rc or not str.isdigit(args.rc)) and (not args.beta or not str.isdigit(args.beta))
else f"{args.version}rc{args.rc}"
if args.rc
else f"{args.version}b{args.beta}",
"new_npm_version": args.version
if (not args.rc or not str.isdigit(args.rc)) and (not args.beta or not str.isdigit(args.beta))
else f"{args.version}-rc.{args.rc}"
if args.rc
else f"{args.version}-beta.{args.beta}",
"new_version": (
args.version
if (not args.rc or not str.isdigit(args.rc)) and (not args.beta or not str.isdigit(args.beta))
else f"{args.version}rc{args.rc}" if args.rc else f"{args.version}b{args.beta}"
),
"new_npm_version": (
args.version
if (not args.rc or not str.isdigit(args.rc)) and (not args.beta or not str.isdigit(args.beta))
else f"{args.version}-rc.{args.rc}" if args.rc else f"{args.version}-beta.{args.beta}"
),
"rc": args.rc,
"beta": args.beta,
"dev_version": f"{args.dev_version}.dev0",
"dev_npm_version": f"{args.dev_version}-dev",
"tag": f"v{args.version}"
if (not args.rc or not str.isdigit(args.rc)) and (not args.beta or not str.isdigit(args.beta))
else f"v{args.version}rc{args.rc}"
if args.rc
else f"v{args.version}b{args.beta}",
"tag": (
f"v{args.version}"
if (not args.rc or not str.isdigit(args.rc)) and (not args.beta or not str.isdigit(args.beta))
else f"v{args.version}rc{args.rc}" if args.rc else f"v{args.version}b{args.beta}"
),
"pre_release": True if (args.rc or args.beta) else False,
}

Expand Down
2 changes: 2 additions & 0 deletions elyra/cli/pipeline_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ def validate(pipeline_path: str, runtime_config: Optional[str] = None):
except Exception:
raise click.ClickException("Pipeline validation FAILED.")

print_info("Pipeline validation SUCCEEDED.", [])


def validate_timeout_option(ctx, param, value):
"""Callback for monitor-timeout parameter validation"""
Expand Down
2 changes: 1 addition & 1 deletion elyra/pipeline/kfp/kfp_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class KfpPropertyInputType(PropertyInputType):
# "GCRPath": {"type_hint": "GCRPath", "json_type": "string", "default_value": "", "placeholder": "gcr.io/"},
# "GCPRegion": {"type_hint": "GCPRegion", "json_type": "string", "default_value": ""},
# "GCPProjectID": {"type_hint": "GCPProjectID", "json_type": "string", "default_value": ""},
"CustomString": {"json_type": "string", "type_title": "String-valued parameter of arbitrary type"}
"CustomString": {"json_type": "string", "type_title": "String-valued parameter of arbitrary type"},
# "List": {"type_hint": "list", "json_type": "array", "default_value": []}, # not yet supported by frontend
# "Dict": {"type_hint": "dict", "json_type": "object", "default_value": {}}, # not yet supported by frontend
}
Expand Down
4 changes: 2 additions & 2 deletions elyra/pipeline/kfp/processor_kfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ def _generate_pipeline_dsl(
# Add filter that escapes the " character in strings
template_env.filters["string_delimiter_safe"] = lambda string: re.sub('"', '\\"', string)
# Add filter that converts a value to a python variable value (e.g. puts quotes around strings)
template_env.filters["param_val_to_python_var"] = (
lambda p: "None" if p.value is None else (f'"{p.value}"' if p.input_type.base_type == "String" else p.value)
template_env.filters["param_val_to_python_var"] = lambda p: (
"None" if p.value is None else (f'"{p.value}"' if p.input_type.base_type == "String" else p.value)
)
template = template_env.get_template("python_dsl_template.jinja2")

Expand Down
3 changes: 3 additions & 0 deletions elyra/pipeline/pipeline_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ def convert_pipeline_parameters(self, runtime_type_name: str) -> None:
if parameter_class is None:
return None # runtime type does not support parameters, skip

if not ElyraProperty.subclass_exists_for_property(parameter_class.property_id):
ElyraProperty.build_property_map()

# Convert pipeline parameters to runtime-specific instances
converted_value = ElyraProperty.create_instance(parameter_class.property_id, self.pipeline_parameters)
if converted_value is not None:
Expand Down
12 changes: 6 additions & 6 deletions elyra/util/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ def write_error(self, status_code, **kwargs):
else:
if isinstance(exception, Exception) and exception.args:
if isinstance(exception.args[0], Exception):
reply[
"message"
] = f"Error. The server sent an invalid response.\
\nPlease open an issue and provide this error message,\
any error details, and any related JupyterLab log messages.\
\n\nError found:\n{str(exception.args[0])}"
reply["message"] = (
f"Error. The server sent an invalid response.\
\nPlease open an issue and provide this error message,\
any error details, and any related JupyterLab log messages.\
\n\nError found:\n{str(exception.args[0])}"
)
else:
reply["message"] = str(exception.args[0])
else:
Expand Down

0 comments on commit 2ddec1f

Please sign in to comment.