Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5150951
WIP add tests and update manifest with spark.tgz
samvantran Jul 26, 2018
764e6c0
WIP fix cleanUpSubmitArgs to handle special chars and multiargs
samvantran Jul 26, 2018
746969a
Cleanup
samvantran Jul 26, 2018
62b542b
Add vendor pkg go-shellwords
samvantran Jul 26, 2018
a71e59f
Fix url
samvantran Jul 26, 2018
9f1dee7
More cleanup + gofmt
samvantran Jul 27, 2018
65a0f7c
Fix single quote error
samvantran Jul 27, 2018
8d347b9
Fix descrip
samvantran Jul 27, 2018
8336832
More fixes and tests
samvantran Jul 27, 2018
db177cd
Debug why single quote fails via spark run
samvantran Jul 29, 2018
c5df110
Fixes and cleanup
samvantran Jul 29, 2018
55412bc
gofmt
samvantran Jul 29, 2018
5a8e3f4
Comment out test, need to create app to print out options
samvantran Jul 30, 2018
8297693
Add simple app + test for CI
samvantran Jul 31, 2018
93f588a
Cleanup and fix test
samvantran Aug 1, 2018
96ac0a2
Fixes
samvantran Aug 1, 2018
3026e88
Cleanup test cases
samvantran Aug 2, 2018
7c294c7
Address PR comments
samvantran Aug 2, 2018
7b12b34
Fix expected test output
samvantran Aug 2, 2018
ff65589
Write confs to tempfile
samvantran Aug 7, 2018
29701c3
Forgot arg in parent function
samvantran Aug 7, 2018
376bf1b
Let's try escaping the quotes
samvantran Aug 8, 2018
f7ad435
Alternatively, wrap entire fn in file
samvantran Aug 8, 2018
6b32e56
Add function isSparkApp
samvantran Aug 14, 2018
c711c6c
Print out all system.properties in app
samvantran Aug 14, 2018
34dffbc
Run the actual file in test
samvantran Aug 14, 2018
d0a230e
Add run perms to tempfile
samvantran Aug 14, 2018
1afd177
Octals are different in python3
samvantran Aug 15, 2018
644c264
Subprocess.run needs shell=True
samvantran Aug 15, 2018
f267518
Sleep right after chmod (potentially old Docker bug)
samvantran Aug 15, 2018
e7035d0
Holy bejesus it finally works
samvantran Aug 16, 2018
9f86664
Cleanup, move logic to test_spark and revert spark_utils
samvantran Aug 16, 2018
0fef2c3
Simplify test_multi_arg_confs
samvantran Aug 17, 2018
39434da
Address PR comments
samvantran Aug 20, 2018
cfadbf1
Cleanup
samvantran Aug 21, 2018
9a69880
Oops, too hasty with the revert
samvantran Aug 21, 2018
36faae7
Merge branch 'master' into DCOS-38138-shell-escape
samvantran Aug 24, 2018
fbc86dc
Use spark distro 2.6.5 created from default
samvantran Aug 24, 2018
13bb7f0
Resync test.sh from dcos-commons: use DOCKER_IMAGE envvar
Aug 25, 2018
7865b6c
Skip test_jar test
samvantran Aug 28, 2018
0ca555a
Merge branch 'master' into DCOS-38138-shell-escape
samvantran Aug 28, 2018
d0aae3c
Remove checking for bool values
samvantran Aug 29, 2018
7b2bb6c
Move app extensions closer to method
samvantran Aug 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run the actual file in test
  • Loading branch information
samvantran committed Aug 14, 2018
commit 34dffbca8f54c2e52c23cf55132dfa841cb489cc
5 changes: 2 additions & 3 deletions spark-testing/spark_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,9 @@ def submit_job(
args_file = tempfile.NamedTemporaryFile("w")
args_file.write('dcos spark run {} --submit-args="{}"'.format(verbose_flag, submit_args))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you write the entire command to a file, you can just execute the file as a shell script: like
subprocess.run(args_file.name)
rather than cat-ing the contents of the files.

args_file.flush() # Ensure content is available for CLI to read
dcos_cmd = "$(cat {})".format(args_file.name)
LOGGER.info("(CLI) {}".format(dcos_cmd))
LOGGER.info("Running subprocess on file {}".format(args_file.name))

result = subprocess.run([dcos_cmd], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = subprocess.run(args_file.name, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout = ""
stderr = ""

Expand Down
2 changes: 1 addition & 1 deletion tests/jobs/scala/src/main/scala/MultiConfs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object MultiConfs {
println("Printing all conf values...")
conf.getAll.foreach(println)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One additional check that tests the whole thing end-to-end: pass in -Dparam1=\"valA valB\" as one of the extraJavaOptions, and then inside this app, you can check the value of System.getProperty("param1") to make sure it was set correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, I'll update.


// Verify property is set in system
// Verify property is set in system
val props = System.getProperties()
println("Printing all System.properties...")
props.list(System.out)
Expand Down