Hey all, Given the next lakeFS action: ```name: P...
# help
g
Hey all, Given the next lakeFS action:
Copy code
name: Post merge
description: My Description
on:
  post-merge:
    branches:
      - master
hooks:
  - id: increment_docgen_version
    type: airflow
    description: Increment repo version
    properties:
       url: "<http://airflow-webserver:8080>"
       dag_id: "increment_tag"
       username: "LakeFSService"
       password: "{{ ENV.AIRFLOW_PASSWORD }}"
  - id: sync_to_s3
    type: airflow
    description: Sync changes to S3
    properties:
       url: "<http://airflow-webserver:8080>"
       dag_id: "s3_backup_sync"
       username: "LakeFSService"
       password: "{{ ENV.AIRFLOW_PASSWORD }}"
How can I run the hooks synchronously? ("increment_docgen_version" and then "sync_to_s3") I want "sync_to_s3" to run only after "increment_docgen_version" finishes (and "increment_tag" DAG result returns). In this example I ask about 2 two hooks within this post-merge action, but if it matters, please assume I would like to run 5, 6, etc..
šŸ‘€ 1
t
Hi @Gal Bachar! I’m looking into your question to try and suggest a solution for you case. will get back to you shortly
n
Hi @Gal Bachar actions runs are defined by action files, each action run is performed independently and concurrently. For each action run hooks are run serially, which means they are running according to the order they appear in the action file. If a hook run fails it will stop the execution of the action run and we will not continue to execute the remaining hooks. I hope this answers your question
One thing I failed to mention. In Airflow hooks, the default behavior is to wait for the response for starting the DAG and not for the DAG flow result. To change that you need to add the 'wait_for_dag' property in the hook. You can find more information here: https://docs.lakefs.io/setup/hooks.html
g
@Niro I was missing
wait_for_dag
for the first hook! Thanks
lakefs 1
šŸ‘ 2