Skip to content

feat: update Transcoder API samples to v1 - #5784

Merged
telpirion merged 2 commits into
GoogleCloudPlatform:masterfrom
irataxy:master
Aug 13, 2021
Merged

telpirion merged 2 commits into
GoogleCloudPlatform:masterfrom
irataxy:master

Conversation

@irataxy

@irataxy irataxy commented Aug 12, 2021

Copy link
Copy Markdown
Contributor

Fixes b:184919153

It's a good idea to open an issue first for discussion.

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • API's need to be enabled to test (tell us)
  • Environment Variables need to be set (ask us to set them)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • Please merge this PR for me once it is approved.

@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 12, 2021
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Aug 12, 2021
@irataxy
irataxy requested a review from shubha-rajan August 12, 2021 17:01
@telpirion
telpirion self-requested a review August 12, 2021 18:02
try {
DeleteJobTemplate.deleteJobTemplate(PROJECT_ID, LOCATION, TEMPLATE_ID);
} catch (Exception e) {
// Don't worry if the template doesn't already exist.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know how I feel about this. We should be deterministic in our tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The try block is there only to delete the job template if it exists. This is a very rare case since the test template uses a random UUID each time. I updated the catch block to only catch the common case where the template is not found. All other errors should fail the test.

@irataxy
irataxy requested a review from telpirion August 12, 2021 21:03
@telpirion
telpirion merged commit c167f03 into GoogleCloudPlatform:master Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants