Repository navigation
Commit 10ce0b2
fix(spark): allow directory paths in submit_deps (#6368)
PySparkProcessor/SparkJarProcessor rejected a local directory passed via
submit_py_files / submit_jars / submit_files: _stage_submit_deps required
os.path.isfile(dep_path) and raised "is not a valid local file" for a
directory. Users could only list individual files.
Accept a directory as well: copy its tree into the staging tempdir (via
shutil.copytree) so its contents are uploaded to the dependency input
channel and mounted into the Spark container, alongside the existing
single-file handling. Update the error message to mention directories.
Add a unit test that a directory is staged (not rejected).
Relates-to #2447
Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com>1 parent f3e4ef3 commit 10ce0b2
2 files changed
Lines changed: 47 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
| 451 | + | |
| 452 | + | |
452 | 453 | | |
453 | | - | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
454 | 470 | | |
455 | | - | |
456 | | - | |
| 471 | + | |
| 472 | + | |
457 | 473 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | 474 | | |
463 | 475 | | |
464 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
479 | 506 | | |
480 | 507 | | |
481 | 508 | | |
| |||
0 commit comments