Skip to content

docs(samples): add batch mode sample and test#10458

Merged
irataxy merged 3 commits into
GoogleCloudPlatform:mainfrom
irataxy:batch
Jul 25, 2023
Merged

docs(samples): add batch mode sample and test#10458
irataxy merged 3 commits into
GoogleCloudPlatform:mainfrom
irataxy:batch

Conversation

@irataxy

@irataxy irataxy commented Jul 24, 2023

Copy link
Copy Markdown
Contributor

b:288111390

Please merge on approval.

@irataxy irataxy requested review from a team as code owners July 24, 2023 23:34
@snippet-bot

snippet-bot Bot commented Jul 24, 2023

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Jul 24, 2023

@rsamborski rsamborski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved with couple nits.

Comment thread video/transcoder/create_job_from_preset_batch_mode.py
Comment thread video/transcoder/create_job_from_preset_batch_mode.py Outdated
Comment thread video/transcoder/job_test.py Outdated
)
out, _ = capsys.readouterr()
job_name_prefix = f"projects/{project_number}/locations/{location}/jobs/"
assert job_name_prefix in out

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

suggestion: please consider using returned value for testing instead of output parsing

Comment thread video/transcoder/job_test.py Outdated
str_slice = out.split("/")
job_id = str_slice[len(str_slice) - 1].rstrip("\n")
job_name = f"projects/{project_number}/locations/{location}/jobs/{job_id}"
assert job_name in out

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ditto

Comment thread video/transcoder/job_test.py Outdated
Comment thread video/transcoder/job_test.py
Comment thread video/transcoder/job_test.py Outdated
@irataxy irataxy merged commit 2e85463 into GoogleCloudPlatform:main Jul 25, 2023
@irataxy irataxy deleted the batch branch July 25, 2023 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants