Skip to content

feat: add AWS Translate resource support#900

Open
chrisns wants to merge 3 commits intoekristen:mainfrom
chrisns:feat/translate-resources
Open

feat: add AWS Translate resource support#900
chrisns wants to merge 3 commits intoekristen:mainfrom
chrisns:feat/translate-resources

Conversation

@chrisns
Copy link
Copy Markdown
Contributor

@chrisns chrisns commented Mar 5, 2026

Summary

  • Add three new AWS Translate resource types: TranslateParallelData, TranslateTerminology, and TranslateTextTranslationJob
  • Follows the SDK v2 interface + gomock pattern established by the RAM resources
  • ParallelData and TextTranslationJob resources include Filter() to skip resources in terminal/non-actionable states
  • TextTranslationJob uses StopTextTranslationJob (stop, not delete) since batch jobs cannot be deleted

Details

New resources:

Resource List API Remove API Filter
TranslateParallelData ListParallelData DeleteParallelData Skips DELETING, FAILED
TranslateTerminology ListTerminologies DeleteTerminology None needed
TranslateTextTranslationJob ListTextTranslationJobs StopTextTranslationJob Only SUBMITTED, IN_PROGRESS

Design decisions:

  • No tags — would require an extra ListTagsForResource call per resource; can be added later
  • No TargetLanguageCodes field — array not useful for filtering
  • Shared TranslateAPI interface for all three resources, matching the RAM pattern

Note: Translation jobs can only be stopped, not deleted. The AWS Translate API does not provide a way to remove completed/stopped job metadata — it will remain visible in the account until it ages out naturally. This is an AWS limitation, not something we can address.

…TextTranslationJob)

Add three new AWS Translate resource types enabling cleanup of Translate
resources during account nuking. Follows the SDK v2 interface + gomock
pattern established by the RAM resources.
Copy link
Copy Markdown
Owner

@ekristen ekristen left a comment

Choose a reason for hiding this comment

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

At a glance things look great, have one question on the filter for translation job.

Also I have to ask, have you fully tested these resources against AWS? Unfortunately I've been receiving some PRs that haven't been tested at all. Most likely done with AI, trying to avoid asking that question though, but might have to start.

-Erik

return err
}

func (r *TranslateTextTranslationJob) Filter() error {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Due to your comment on the PR, is there a stopped JobStatus? If so we need to have a switch for it and error with so it gets filtered out as well.

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.

Thanks for catching that Erik! You're right — there is a STOPPED status (and STOP_REQUESTED too). I've pushed a fix that explicitly handles all terminal statuses: STOPPED, STOP_REQUESTED, COMPLETED, COMPLETED_WITH_ERROR, and FAILED — each with a descriptive error message rather than relying on the catch-all default.

Explicitly handle STOPPED, STOP_REQUESTED, COMPLETED,
COMPLETED_WITH_ERROR, and FAILED statuses in the filter
rather than relying on a catch-all default case.
@chrisns
Copy link
Copy Markdown
Contributor Author

chrisns commented Mar 9, 2026

At a glance things look great, have one question on the filter for translation job.

Also I have to ask, have you fully tested these resources against AWS? Unfortunately I've been receiving some PRs that haven't been tested at all. Most likely done with AI, trying to avoid asking that question though, but might have to start.

-Erik

totally valid question, yes I confess I absolutely have used AI, however has been tested with a real account.
be neat if there was some way to prove a PR works without you having to run up a massive aws bill creating/destroying stuff to prove it🤔

@ekristen
Copy link
Copy Markdown
Owner

ekristen commented Mar 9, 2026

I'm a proponent of AI, I have zero issues with it, just so long as things are being actually tested against an account and mock tests are set to match. The inverse has been happening, tests are written and mocked by AI then everything fails on a real account. Not you, but other PRs I've received.

I do have some OSS credits from AWS, so I can test without too much fear of a high bill, but I appreciate it.

Fixes rangeValCopy lint errors in translate resource listers.
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.

2 participants