-
Notifications
You must be signed in to change notification settings - Fork 630
[part 1] Create function to parse Linux /etc/os-release files to set detailed OS ENV Var, pass to httpclient, update README #4705
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
Merged
briannamagtoto
merged 7 commits into
aws:dev
from
briannamagtoto:feature/DetailedOSFamily
Jul 18, 2025
Merged
[part 1] Create function to parse Linux /etc/os-release files to set detailed OS ENV Var, pass to httpclient, update README #4705
briannamagtoto
merged 7 commits into
aws:dev
from
briannamagtoto:feature/DetailedOSFamily
Jul 18, 2025
+377
−16
Conversation
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
…OS ENV Var, pass to httpclient, update README to include documentation for ECS_OS_FAMILY
sparrc
reviewed
Jul 8, 2025
sparrc
reviewed
Jul 8, 2025
sparrc
reviewed
Jul 8, 2025
sparrc
reviewed
Jul 8, 2025
- Rename environment variable to ECS_DETAILED_OS_FAMILY and update README - Replace exec cat command with os.ReadFile - Refactor unit tests - Move environment variable configuration to agent container
5d67ae8
to
d18c8ac
Compare
dc7b006
to
612b564
Compare
Squashing commits (to debug Windows unit tests) into "Separate logic into GetOSFamily and GetDetailedOSFamily to maintain backward compatibility" 😅 |
…ackward compatibility
d2c86e9
to
5d473bf
Compare
4a48f04
to
75fb604
Compare
sparrc
previously approved these changes
Jul 15, 2025
mye956
previously approved these changes
Jul 15, 2025
singholt
previously approved these changes
Jul 15, 2025
singholt
reviewed
Jul 15, 2025
… Linux os family files, add smallcomment providing details about /etc/os-release file
3b6644e
sparrc
approved these changes
Jul 16, 2025
mye956
approved these changes
Jul 16, 2025
singholt
approved these changes
Jul 17, 2025
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.
Summary
This PR implements detailed OS family detection for Linux-based ECS instances. Firstly, ECS-Init will parse through the instance's /etc/os-release file then pass it to the Agent through an env var (ECS_OS_FAMILY). This will be used in two ways:
ecs.os-type-detailed
(will create part 2 PR for implementation).Implementation details
Testing
Unit tests have been added for OS release parsing, as well as environment variable handling tests, updated relevant parse_linux tests
New tests cover the changes: yes
Description for the changelog
Feature: Add detailed OS family value to HTTPClient User Agent header
Additional Information
Does this PR include breaking model changes? If so, Have you added transformation functions?
N/A
Does this PR include the addition of new environment variables in the README?
Yes
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.