Skip to content

[SVLS-8492] Add release pipeline for Lambda Durable Function event forwarder#333

Open
lym953 wants to merge 3 commits into
masterfrom
yiming.luo/durable-forwarder-release-inrepo
Open

[SVLS-8492] Add release pipeline for Lambda Durable Function event forwarder#333
lym953 wants to merge 3 commits into
masterfrom
yiming.luo/durable-forwarder-release-inrepo

Conversation

@lym953

@lym953 lym953 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Context

The Lambda Durable Function event forwarder template was added in #330. This PR adds its release pipeline directly in this repo, as an alternative to the cross-repo split in DataDog/serverless-ci#180 + #331.

Why in-repo instead of cross-repo

It's simpler.

I asked for opinions on this in serverless-onboarding-and-enablement and aws-integrations channel, but didn't get a clear reason for splitting the pipeline across two repos, so let's keep it in a single repo.

What the job does

On a merge to master that bumps aws_durable_function_event_forwarder/version.txt, a manual release-stage job appears. It runs release.sh, which:

  1. reads the version from version.txt (single source of truth),
  2. refuses to overwrite an already-published version,
  3. validates the template, then uploads:
    • s3://datadog-cloudformation-template/aws/lambda-durable-function-event-forwarder/<version>.yaml (immutable)
    • .../latest.yaml (moving pointer, referenced by the public install docs)

This follows the repo's documented release convention (version.txt + release.sh, like the other templates). A PR-time check also fails the build if the template changed without a version.txt bump, or if that version is already published. The release logic lives in this serverless-aws-owned folder (gitlab-config.yml); the root .gitlab-ci.yml carries only a one-line local include.

Making a this job manual to make the release a deliberate decision, to reduce the risk of releasing unwanted changes.

Test plan

Will trigger the pipeline after this PR is merged, since the pipeline can only run on master branch.

Define the release job in aws_durable_function_event_forwarder/gitlab-config.yml
(serverless-aws-owned via CODEOWNERS) and pull it into the root pipeline with a
local include. On a merge to master that changes the template, a manual
release-stage job reads the version embedded in the template, refuses to
overwrite an already-published version, validates, and publishes <version>.yaml
+ latest.yaml to the prod bucket.

Collapses the cross-repo split (serverless-ci#180 + cloudformation-template#331)
into this repo: the local include removes the merge-order dependency while
keeping the release logic under serverless-aws ownership.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lym953 lym953 changed the title Add in-repo release pipeline for Lambda Durable Function event forwarder [SVLS-8492] Add in-repo release pipeline for Lambda Durable Function event forwarder Jul 1, 2026
@lym953 lym953 marked this pull request as ready for review July 1, 2026 18:05
@lym953 lym953 requested review from a team as code owners July 1, 2026 18:06
@lym953 lym953 requested a review from shreyamalpani July 1, 2026 18:06
Follow the repo's documented release convention (AWS Integrations
"Deploy Cloudformation Templates" runbook):
- version.txt is the single source of truth (drop the embedded
  Mappings.Constants version and ForwarderVersion output).
- Add release.sh: reads version.txt, refuses to overwrite an existing
  version, validates, publishes <version>.yaml + latest.yaml.
- gitlab-config.yml now calls release.sh (release on master + version.txt
  bump, manual gate) and adds a PR-time version-bump/collision check.

The release logic stays in this serverless-aws-owned folder; the root
.gitlab-ci.yml keeps only the one-line local include hook.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lym953 lym953 requested a review from Copilot July 1, 2026 22:16
@lym953 lym953 changed the title [SVLS-8492] Add in-repo release pipeline for Lambda Durable Function event forwarder [SVLS-8492] Add release pipeline for Lambda Durable Function event forwarder Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an in-repo GitLab release pipeline for the Lambda Durable Function event forwarder CloudFormation template so it can be versioned and published to the standard S3 bucket path from this repository.

Changes:

  • Add version.txt + release.sh to publish an immutable <version>.yaml and a moving latest.yaml to S3 (with template validation and overwrite protection).
  • Add GitLab CI jobs (via local include) to (a) enforce version bumps on template changes in PRs and (b) provide a manual release job on master when version.txt changes.
  • Remove the template’s hard-coded version mapping/output, shifting versioning responsibility to version.txt/release pipeline.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
aws_durable_function_event_forwarder/version.txt Introduces semver source-of-truth for releases.
aws_durable_function_event_forwarder/release.sh Implements validate + publish logic to versioned + latest S3 keys.
aws_durable_function_event_forwarder/gitlab-config.yml Adds PR-time version guard and manual master release job.
aws_durable_function_event_forwarder/durable_function_event_forwarder.yaml Removes embedded version mapping/output from the template.
.gitlab-ci.yml Pulls the new per-template pipeline config via local include.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread aws_durable_function_event_forwarder/release.sh Outdated
Comment thread aws_durable_function_event_forwarder/release.sh
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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