Skip to content

Check types of RunParameter to catch errors and give user feedback #83

Open

Description

ADF only supports specific data types for what we call RunParameter and PipelineRunVariable.

We support python primitives that map to the data factory types.
For RunParameters this should be:

  • str -> String,
  • int -> Int,
  • float -> Float,
  • bool -> Bool
  • list -> Array
  • dict -> Object
  • str -> SecureString

For PipelineRunVariable these should be:

  • str -> String,
  • bool -> Boolean,
  • list-> Array,
  • int-> Integer,

Currently we do not validate any value on RunParameter and PipelineRunVariable.

Activity

  1. added
    enhancement
    good first issue
    on Mar 13, 2024
  2. yehiaelbehery commented on Apr 17, 2024

    @yehiaelbehery
    Contributor

    Hi Leonard Herold (@LeonardHd), I can work on this.

  3. LeonardHd commented on Apr 18, 2024

    @LeonardHd
    CollaboratorAuthor

    Yehia Elbehery (@yehiaelbehery) Thanks for offering help. I will share some more details as this might help.
    The example might be a bit too ambiguous, so I will collect some more details tomorrow 👍

  4. LeonardHd commented on Apr 24, 2024

    @LeonardHd
    CollaboratorAuthor

    Arjen Kroezen (@arjendev) I updated the issue. In fact, we do not validate anything at the moment in the framework.
    I think simple guard clauses would be enough so only valid RunParameter and PipelineRunVariable could be instantiated. What do you think?

    Yehia Elbehery (@yehiaelbehery) let's see what Arjen's point of view here is, as he leads the API concepts.

  5. arjendev commented on Apr 24, 2024

    @arjendev

    Sounds good!

    Leonard Herold (@LeonardHd), perhaps we can also introduce the check to verify we pass in the right type of the output argument in activity.set_result and the output argument in state.add_activity_result. These should only accept dictionary and lists iirc. This was the place where you accidently pushed in a tuple and got an internal error, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions