Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.8] Create delete-serverless-dir-in-backports.yml (backport #5300) #5312

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 5, 2024

Resolves https://github.com/elastic/security-docs-internal/issues/18. Adds a GitHub action to keep serverless files from getting backported into versioned branches (for example, 7.17 or 8.15).

Why do this?

We don't want to add version-less serverless source files into versioned branches (7.x and 8.x), which could happen with backports of PRs containing changes to both serverless and classic/stateful. The only place where serverless source files should exist is in main.

How it works

  1. The action is triggered by activity on any pull request that targets a branch matching the pattern 7.* or 8.* . The action doesn’t run for PRs targeting any other branches, such as main.
  2. It checks for the existence of the docs/serverless subdirectory within the PR’s working branch.
  3. If the directory doesn’t exist, nothing else happens.
  4. If the directory exists, the action deletes it and its entire contents from the PR’s working branch in a single commit, which you can then confirm in the PR’s history.

Previews and testing

This was kinda difficult to test without first merging the workflow YAML and then testing it "live." But I did manage to test and validate that this works as expected. Expand the section below for more details.

The biggest testing takeaway was that we'll need to backport the workflow YAML file to all the previous branches where we want it to run. Just having the action in main isn't enough, because backport PRs don't target main. That makes total sense, but I didn't realize it until halfway through the tests.

Expand for gory details

This is an automatic backport of pull request #5300 done by [Mergify](https://mergify.com).

@mergify mergify bot added the backport label Jun 5, 2024
Copy link

github-actions bot commented Jun 5, 2024

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@joepeeples joepeeples merged commit e1cde7d into 8.8 Jun 5, 2024
5 checks passed
@mergify mergify bot deleted the mergify/bp/8.8/pr-5300 branch June 5, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant