Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed the job submission example #415

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

evanspearman-a
Copy link
Contributor

@evanspearman-a evanspearman-a commented Jul 22, 2024

What was the problem/requirement? (What/Why)

examples/submit_job.py was failing because:

  1. The job attachments API had changed since the example was written
  2. The example was assuming credentials existed in the environment
  3. The job template was formatted incorrectly

What was the solution? (How)

  1. Update the calls to job attachments to use the new API
  2. Switch to using deadline client's API for getting a boto3 session
  3. Fix the format of the job template

What is the impact of this change?

The job submission example now works

Fixes #408

How was this change tested?

I submitted the job to a queue and observed that the job succeeded and had the correct output:

Confirming that inputs were downloaded to the correct location
2024/07/22 16:30:59-05:00 Total number of inputs
2024/07/22 16:30:59-05:00 1
2024/07/22 16:30:59-05:00 Total file size
2024/07/22 16:30:59-05:00 4.0K	/sessions/session-49cc07f051fa4a60b16fb3c1839488eb323fbt0g/assetroot-835c71fd6af6a5fe1ac2
2024/07/22 16:30:59-05:00 Creating the expected output directory and output file

Was this change documented?

N/A

Is this a breaking change?

No


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: Evan Spearman <evans@amazon.com>
@evanspearman-a evanspearman-a requested a review from a team as a code owner July 22, 2024 21:44
Copy link

sonarcloud bot commented Jul 22, 2024

@evanspearman-a evanspearman-a merged commit 17eadb7 into aws-deadline:mainline Jul 23, 2024
15 checks passed
github-actions bot pushed a commit to Ahuge/deadline-cloud that referenced this pull request Jul 24, 2024
Signed-off-by: Evan Spearman <evans@amazon.com>
rena-cheng pushed a commit to rena-cheng/deadline-cloud that referenced this pull request Aug 26, 2024
Signed-off-by: Evan Spearman <evans@amazon.com>
Signed-off-by: Cloud User <rocky@ip-172-31-31-216.ec2.internal>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: Update examples/submit_job.py script
3 participants