-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report FQDN on host.name as opt-in, enabled by feature flag (#2218)
* wip * wip * wip * clean up * wip * . * agent.name as fqdn * it works * wip * WIP - using fake input, created test, it seems to work * finish test for feature flags * remove debug log * some clean up * mage check * fixing licenses * it works * it works * remove debug logs and comments * make notice * fake component and shipper are built by TestMain * fixing tests * make notice * adjust tests * update elatic-agent-client * add .exe for win binaries * adjust fake components build * increase test timeout * fix tests * adjust features pkg and don't send featuresFlag if nil * it works * make notice * revert some changes * handle error properly * add TODO * Set FQDN for Vagrant elastic-agent VM Useful for testing FQDN feature; harmless otherwise * Undoing trivial formatting changes * Running mage fmt * Remove personal repo from NOTICE overrides * Sorting imports * Fix error handling * Fixing access * Fixing packaging of fake component * Update logging * Refactoring fake component * Allowing fmt.Print* in TestMain * Remove redundant return * Fixing typo in error message * Undo unintentional changes * Removing redundant TestMain file * Add comment on FQDN to Vagrantfile * Remove debug logging statements * Making test pass * Document feature flags configuration in reference config file * Adding CHANGELOG entry * Use convenience method * Formatting * Use convenience method from elastic-agent-libs * Running mage update * Fixing imports * Reducing whitespace changes * Reducing whitespace changes * Reducing whitespace changes * Reducing whitespace changes * Restore timeout duration * Move mutex inside struct * Prevent mutex copying * Fixing state diagnostics test * Fixing components diagnostics test * Adding features.source to components golden file * More interesting diagnostics state test * Log error if FQDN lookup fails and fallback to OS-reported hostname * Bump up go-sysinfo dependency version * Fix typos * Fixing compile errors * Fix tests * Fix imports * Fix issues lost in rebase * Fixing more imports * Updating NOTICE.txt * Clarify features indentation * Remove replace directive * Bumping up version on elastic-agent-client dependency * Adding test mocking DNS * Initialize featuresIdx in same place as units' configIdx * Updating NOTICE.txt * Remove unnecessary nil check * Set features in state initially * Update features in state from checkin observed message * Remove TODO * Updating elatic-agent.yml test fixture to enable FQDN feature flag * Try flipping the authoritative flag * Remove unreliable DNS mocking test * Set source * Update test fixture * Change logger * Fixing test case * Omit feature flags serialization from state.yaml diag file * Updating NOTICE.txt * Add descriptive comment on why Features is not being serialized as YAML * Updating test fixture * Inject logger into metadata methods --------- Co-authored-by: Shaunak Kashyap <[email protected]> (cherry picked from commit be818cc)
- Loading branch information
1 parent
7ffdfe0
commit 4d498b8
Showing
32 changed files
with
1,000 additions
and
394 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Kind can be one of: | ||
# - breaking-change: a change to previously-documented behavior | ||
# - deprecation: functionality that is being removed in a later release | ||
# - bug-fix: fixes a problem in a previous version | ||
# - enhancement: extends functionality but does not break or fix existing behavior | ||
# - feature: new functionality | ||
# - known-issue: problems that we are aware of in a given version | ||
# - security: impacts on the security of a product or a user’s deployment. | ||
# - upgrade: important information for someone upgrading from a prior version | ||
# - other: does not fit into any of the other categories | ||
kind: feature | ||
|
||
# Change summary; a 80ish characters long description of the change. | ||
summary: feature-flags | ||
|
||
# Long description; in case the summary is not enough to describe the change | ||
# this field accommodate a description without length limits. | ||
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment. | ||
description: | | ||
Add support for feature flags, starting with one to toggle FQDN reporting in | ||
events generated by Agent components, via the `host.name` field. | ||
# Affected component; a word indicating the component this changeset affects. | ||
component: agent | ||
|
||
# PR URL; optional; the PR number that added the changeset. | ||
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added. | ||
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number. | ||
# Please provide it if you are adding a fragment for a different PR. | ||
pr: https://github.com/elastic/elastic-agent/pull/2218 | ||
|
||
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of). | ||
# If not present is automatically filled by the tooling with the issue linked to the PR number. | ||
issue: https://github.com/elastic/elastic-agent/issues/2185 |
This file contains 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
This file contains 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
Oops, something went wrong.