gravitational / gravitational/shared-workflows

`tools/amplify-preview` improvements

Open
#306 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
7
Forks
4
Avg merge
19h 53m
Merged PRs (30d)
5

Description

Summary

Following improvements for amplift-preview can be implemented:

  • Make retries-count configurable
    https://github.com/gravitational/shared-workflows/blob/b37f70225436c1f54ea0ae12d114fa796ec3b8ae/tools/amplify-preview/main.go#L46-L49

  • Set relevant outputs to GITHUB_OUTPUT:

    • Preview App ID
    • Preview Branch Name
    • Preview Job ID

    Those values can be used then to compose copy-pastable command to fetch deployment logs (like aws amplify get-job --app-id <APP_ID> --branch-name <BRANCH_NAME> --job-id <JOB_ID> and printed in case of error:

    - https://github.com/gravitational/teleport/pull/48512#issuecomment-2557357755
    
  • Report failure if retries-count reached

  • Cancel all pending jobs when submitting new one

  • Delete Amplify branches/previews when PR is closed branch is not deleted, to reduce number of "abandoned" previes that count towards limit.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tools/amplify-preview/main.go and review the existing retry and output handling around the referenced lines. Then trace how new Amplify jobs are submitted and how pull-request closure is represented; done means pending jobs are canceled and previews or branches are deleted when a PR closes.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, github-actions, go
Domain
ci-cd, cloud, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.