Switch active-branches source to S3 endpoint and simplify parsing - #874
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/elastic/oblt-actions/sessions/3fbbbd3e-2a25-4bcd-89fe-5db398026679 Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Use new active branches API endpoint
Switch active-branches source to S3 endpoint and simplify parsing
Apr 1, 2026
This was referenced Apr 5, 2026
v1v
approved these changes
May 20, 2026
Member
|
@copilot the CI failed with |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the “active branches” source from the legacy GCS JSON endpoint to a new release-team S3 plain-text endpoint, simplifying branch parsing and updating consumers accordingly.
Changes:
- Update
github/backport-activeto default to the new S3active-branches.txtendpoint and parse branches as plain text lines. - Update
elastic/active-branchesto fetch branches viaurllib.requestand remove therequestsinstall step. - Adjust unit tests and README docs to reflect the new plain-text format and default URL.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
github/backport-active/test_backport_script.py |
Updates mocks to provide branch lists via response.text (line-per-branch) instead of JSON. |
github/backport-active/README.md |
Updates inputs/docs to describe the new plain-text active-branches endpoint. |
github/backport-active/backport_script.py |
Replaces JSON config fetching with plain-text branch list parsing. |
github/backport-active/action.yml |
Updates the default backports-url to the new S3 endpoint. |
elastic/active-branches/script.py |
Switches branch fetching to urllib.request and parses branches from plain text. |
elastic/active-branches/action.yml |
Removes the step that installed requests. |
Comment on lines
3
to
6
| import json | ||
| import os | ||
| import requests | ||
| import urllib.request | ||
|
|
Comment on lines
+13
to
+17
| | Name | Description | Required | Default | | ||
| |-----------------|-------------------------------------|----------|-------------------------------------------------------------------------------------| | ||
| | `github-token` | GitHub token for authentication | `false` | `${{ github.token }}` | | ||
| | `backports-url` | URL to fetch the active branches | `false` | `https://elastic-release-api.s3.us-west-2.amazonaws.com/public/active-branches.txt` | | ||
| | `pr-number` | PR number to use (needed for tests) | `false` | `${{ github.event.pull_request.number }}` | |
Comment on lines
+64
to
+67
| if target_branches: | ||
| print(f"Found branches: {target_branches}") | ||
| else: | ||
| print("No branches found in config or config not available") | ||
| print("No branches found or config not available") |
Agent-Logs-Url: https://github.com/elastic/oblt-actions/sessions/1f99ebb1-8494-4c2f-88af-523254077aa9 Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Agent-Logs-Url: https://github.com/elastic/oblt-actions/sessions/1f99ebb1-8494-4c2f-88af-523254077aa9 Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
Contributor
Author
Agent-Logs-Url: https://github.com/elastic/oblt-actions/sessions/1f99ebb1-8494-4c2f-88af-523254077aa9 Co-authored-by: v1v <2871786+v1v@users.noreply.github.com>
v1v
enabled auto-merge
May 20, 2026 15:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the GCS-hosted
branches.jsonendpoint with the new release team S3 endpointactive-branches.txt, removing JSON parsing overhead in favor of a plain-text line-per-branch format.elastic/active-branchesrequestsdependency entirely; use stdliburllib.requestpip install requests==2.31.0action steppayload.get('branches')from JSONgithub/backport-activebackports-urlto new S3 endpointget_config_from_url(returned JSON dict) withget_branches_from_url(returnslist[str]directly)response.json.return_value = {...}toresponse.text = 'branch1\nbranch2\n...'Before:
After:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
elastic-release-api.s3.us-west-2.amazonaws.com/usr/bin/curl curl -s REDACTED(dns block)/usr/bin/curl curl -v REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either: