F

Flyte enables you to build & deploy data & ML pipelines, hassle-free. The infinitely scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks. Explore and Join the Flyte Community!

Automatic Task Version Retrieval Request

Summary

The user requests that reference tasks automatically retrieve the latest version without manually setting the version parameter in the reference_task decorator for their CI/CD processes. They mention that they can obtain the latest task version using FlyteRemote and inquire about using the {{ registration.version }} macro for this purpose. The user notes that when they try to register a workflow containing a reference task using flytectl register, it only works if they pass a specific version, which contradicts their goal. They provide examples of commands used and highlight that using a normal task instead of a reference task works with a new version. The user seeks guidance on the correct way for a CI/CD process to fetch the latest task for a reference task.

Status
open
Tags
  • FlyteRemote
  • Workflow
  • flyte
  • flytectl register
  • Flyte
  • CI/CD Process
  • Question
  • Developer Help
  • CI/CD
Source
#ask-the-community
    n

    nuhaj

    10/21/2024

    and if I take out the reference task and use a ask defined in the workflow (a normal task) it works with a new version flytectl register files --archive flyte-package.tgz --version "1" -p test -d development

    n

    nuhaj

    10/21/2024

    The intention is the CICD to grab the latest version of reference tasks and workflows in a workflow. If I try flytectl register on my workflow which contains a reference task, it only works if I pass it the version which defeats what I am trying to do. pyflyte --pkgs test package -f flytectl register files --archive flyte-package.tgz --version "ADKDdgdgTEfg" -p test -d development What would be the correct way for a CICD to fetch the latest task for a reference task

        project="test",
        domain="development",
        name="simple.print_date",
        version="{{ registration.version }}",
    )
    def print_date() -> str:   
        ...
    
    
    
    @workflow
    def test()-> str:
        return print_date()```
    
    d

    david.espejo

    10/18/2024

    <@U073L5Y9GJD> looks like that macro is supported by flytectl register only at the time

    n

    nuhaj

    10/15/2024

    a complete example would be more helpful. What are the prerequisites for the macro to work? The task and workflow are registered using pyflyte register,I get.

    RPC Failed, with Status: StatusCode.INVALID_ARGUMENT```
    
    b

    blaketastic2

    10/15/2024

    Or am I not understanding what you are trying to achieve

    b

    blaketastic2

    10/15/2024
    n

    nuhaj

    10/15/2024

    wrap the reference_task decorator? Not sure if thats possible

        project="myproject",
        domain="development",
        name="mytask.test",
        version="1234556",
    )```
    
    n

    nuhaj

    10/15/2024

    Hello, we would like for reference tasks to grab the latest version. The version parameter in the reference_task decorator is required, for our CICD we do not want to manually set this and our workflows and tasks are preregistered. I am able to grab the latest task version using FlyteRemote.