Skip to content

SparkKubernetesOperator to support arguments #16728

Open

Description

@yevsh

Need an option ,when triggering a dag via airflow web ui, to pass JSON arguments to
SparkKubernetesOperator.

Currently I don't see a way to do it as, SparkKubernetesOperator accepts application.yaml only.

Activity

  1. uranusjr commented on Jun 30, 2021

    @uranusjr
    Member

    Would you be interested in submitting a PR? It would be nice if you could use the issue template in the future as well.

  2. goodhamgupta commented on Aug 3, 2021

    @goodhamgupta

    Incase this has not yet been picked up, I would like to work on this issue 😄

  3. potiuk commented on Aug 3, 2021

    @potiuk
    Member

    Assigned you @goodhamgupta !

  4. goodhamgupta commented on Aug 6, 2021

    @goodhamgupta

    Hi @potiuk,

    I think I don't understand the issue well enough. I see that for the SparkKubernetesOperator, the following code segment:

    class SparkKubernetesOperator(BaseOperator):
        """
        """
    
        template_fields = ['application_file', 'namespace']
        template_ext = ('.yaml', '.yml', '.json')
        ui_color = '#f4a460'

    I think this should already allow .json type file to be uploaded from the UI? I would appreciate it if you could provide me with any pointers on how to start this issue. 😅

    Thanks!

  5. goodhamgupta commented on Sep 13, 2021

    @goodhamgupta

    @potiuk, @uranusjr Sorry for the noise, but I would appreciate any hints you might be able to provide 😄

  6. uranusjr commented on Sep 13, 2021

    @uranusjr
    Member

    If you meant template_ext contains .json, that only affects the listed templated_fields. I think OP wants to be able to pass a path from the “Trigger DAG” page’s param field, which is a completely different thing.

  7. eladkal commented on Dec 19, 2021

    @eladkal
    Contributor

    @goodhamgupta are you still working on this issue?

  8. goodhamgupta commented on Dec 19, 2021

    @goodhamgupta

    @eladkal Unfortunately I wasn't able to work on this issue for now.

  9. potiuk commented on Sep 9, 2023

    @potiuk
    Member

    Answering earlier question (which I missed):

    The scope of this change is mainly to make sure that you can pass the CRD .yaml file (possibly in json form) through a Param of the kind that will be easy to enter/ validate via UI and document it.

    I do not think there is a lot (maybe no) code is to be written on that one - mostly to see if the current Param .json type will nicely fit there and provide an example of defining such param in the task and testing it.

    Most likely the output of the task will be to add an example dag and UI screenshot to the documentation describing how to do it.

    UPDATE: possibly it will need "application_file_content" optional field to be added (or simillar)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions