i get ```"failed to validate that project [studio]...
# ask-the-community
r
i get
Copy code
"failed to validate that project [studio] and domain [development] are registered, err: [project [studio] not found]\"}\"\n>>"}
d
Hi @Rezwan Abir are you running the examples in the Getting started guide?
r
ya
d
ok, in that case, the project should be
flytesnacks
r
Copy code
<_InactiveRpcError of RPC that terminated with:
	status = StatusCode.INTERNAL
	details = "failed to compile workflow for [resource_type:WORKFLOW project:"flytesnacks" domain:"development" name:"app.flyte.client.process_data_wf" version:"1.0" ] with err failed to compile workflow with err Collected Errors: 1
this is my workflow
Copy code
@workflow
    def process_data_wf(kickoff_time: datetime):
        print("SOME WORKFLOW...........")
        return "done"
this is my launch plan
Copy code
def execute_custom_dashboard_workflow(
        self, jwt: str, account_id: UUID, user_id: UUID, report_id: UUID
) -> str:

    launch_plan = LaunchPlan.get_or_create(
        self.process_data_wf,
        name="wf_launchplan",
        schedule=FixedRate(duration=timedelta(minutes=1))
    )

    try:
        self.remote.register_workflow(self.process_data_wf, version='1.0')
        execution = self.remote.execute(launch_plan, inputs={}, version='1.0', project='flytesnacks', domain=self.settings.flyte_domain)
    except Exception as e:
        print("Error.....", e)

    return execution
Copy code
Error 0: Code: NoNodesFound, Node Id: resource_type:WORKFLOW project:"flytesnacks" domain:"development" name:"app.flyte.client.process_data_wf" version:"1.0" , Description: Can't find any nodes in workflow [resource_type:WORKFLOW project:"flytesnacks" domain:"development" name:"app.flyte.client.process_data_wf" version:"1.0" ].
d
can I see your task definitions?
r
i don’t have any tasks!
it’s a dummy workflow that returns “done”
humn… let me add a task
so adding a task to a workflow eliminates that error
however running into something new now
Copy code
serialization_settings = SerializationSettings(
                project="flytesnacks",
                domain=self.settings.flyte_domain,
                env=None,
                image_config=ImageConfig(
                    default_image=Image(name="custom_container_task", fqn="<http://flyteorg.io/placeholder|flyteorg.io/placeholder>", tag="image")
                ),
            )

            self.remote.register_task(self.sum_test, version="1.0", serialization_settings=serialization_settings)
here is my task defition
Copy code
@task(cache=False, cache_serialize=False)
    def sum_test(x: int, y: int) -> int:
        return x + y
here is the registration
Copy code
self.remote.register_task(self.sum_test, version="1.0", serialization_settings=serialization_settings)
            self.remote.register_workflow(process_data_wf, version="1.0")
first time I run i get
Copy code
Error..... Value error!  Received: None. No serialization settings set, but workflow contains entities that need to be registered. Type: <class 'flytekit.core.python_function_task.PythonFunctionTask'> app.flyte.client.sum_test
but I see the task in UI (flyte)
second time I run I get
Copy code
EXCEPTIN HERE...... The cached values aren't the same as the current call arguments
d
cc @Eduardo Apolinario (eapolinario)^^
e
@Rezwan Abir, how are you running those?
r
I have a fast api server that is serving the code above
and i have demo flyte running on port 30080
that’s why I’m trying to use remote call
the goal is to register the workflow, task and launch plan to the flyte instance remotely from a fastapi application
k
Hmm this is a weird error he is passing serialization settings
Let’s try to run it again
r
I got past most error
one last one remaining
almost there
Copy code
serialization_settings = SerializationSettings(
                project="flytesnacks",
                domain=self.settings.flyte_domain,
                env=None,
                image_config=ImageConfig(
                    default_image=Image(
                        name="custom_container_task",
                        fqn="<http://flyteorg.io/placeholder|flyteorg.io/placeholder>",
                        tag="image",
                    )
                ),
            )
notice the fqn is a placeholder value
so in console I’m seeing error like
Copy code
currentAttempt done. Last Error: USER::containers with unready status: [fc4abba2e3b0246a7881-n0-0]|Back-off pulling image "<http://flyteorg.io/placeholder:image|flyteorg.io/placeholder:image>"
can you give me a valid image i can use?
e
@Rezwan Abir, you need an image that contains your code, but if you're using fast registration (https://docs.flyte.org/projects/cookbook/en/latest/auto/deployment/deploying_workflows.html#fast-registration) then you can use one of the default flytekit images (e.g.
<http://cr.flyte.org/flyteorg/flytekit:py3.10-1.3.2|cr.flyte.org/flyteorg/flytekit:py3.10-1.3.2>
)
r
will try this, thanks!
Weird can’t start flyte anymore
Copy code
flytectl demo start
getting
Copy code
strict mode is on but received keys [map[airflow_version:{} database:{} deploy:{} identifier:{} version:{}]] to decode with no config assigned to receive them: failed strict mode check
fixed by typing flyte sandbox
and starting again
164 Views