jason810496 opened a new pull request, #74636:
URL: https://github.com/apache/airflow/pull/74636

   ## Why
   
   A Go Dag definition can generate its Dags from a YAML file in the Dag 
bundle, and swapping only the YAML, with no rebuild, should change the live Dag 
IDs. Nothing covered this end to end.
   
   ## What
   
   - New example `go-sdk/example/dynamic`: reads `dags.yaml` next to the binary 
and makes one Dag per entry.
   
   ```go
   exe, _ := os.Executable()
   dags, err := loadDags(filepath.Join(filepath.Dir(exe), "dags.yaml"))
   bundle := airflow.Bundle()
   bundle.Register(dags...)
   ```
   
   The packer reads Dag IDs by running the binary, so the example is packed 
with `--executable` and the YAML next to the pre-built binary.
   - New e2e test `test_go_sdk_dynamic_dag.py`: swaps the YAML from 3 to 5 to 2 
Dag IDs. Each step checks that the live Dag IDs match, runs every live Dag and 
checks its output, and checks that removed Dags are stale.
   - `go.yml`: the Dag processor re-parses and marks stale Dags every few 
seconds, so each step settles quickly.
   - `conftest.py`: `_run_go` runs any `go` command on the host or in the 
toolchain container, for the extra build step.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes, with help of Claude Code (Claude Opus 5.5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to