Skip to content

Commit

Permalink
cleanup(2489): removed path.install option from the paths command, re…
Browse files Browse the repository at this point in the history
…moved any usage of this command (#6461)

* cleanup(2489): removed path.install option from the paths command, removed any usage of this command

* cleanup(2489): updated changelog
  • Loading branch information
kaanyalti authored Jan 2, 2025
1 parent dbfd447 commit 6c005a4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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: breaking-change

# Change summary; a 80ish characters long description of the change.
summary: Removing --path.install option

# 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:

# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
component: "elastic-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/6461/files
# 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/2489
2 changes: 0 additions & 2 deletions internal/pkg/agent/application/paths/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ func init() {
fs.StringVar(&configFilePath, "config", DefaultConfigName, "Configuration file, relative to path.config")
fs.StringVar(&configFilePath, "c", DefaultConfigName, "Configuration file, relative to path.config")
fs.StringVar(&logsPath, "path.logs", logsPath, "Logs path contains Agent log output")
fs.StringVar(&installPath, "path.install", installPath, "DEPRECATED, setting this flag has no effect since v8.6.0")
fs.StringVar(&controlSocketPath, "path.socket", controlSocketPath, "Control protocol socket path for the Agent")

// enable user to download update artifacts to alternative place
Expand Down Expand Up @@ -158,7 +157,6 @@ func SetConfig(path string) {

// ConfigFile returns the path to the configuration file.
func ConfigFile() string {

return configFileWithDefaultOverride(DefaultConfigName)
}

Expand Down
1 change: 0 additions & 1 deletion internal/pkg/agent/cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func NewCommandWithArgs(args []string, streams *cli.IOStreams) *cobra.Command {
cmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("config"))
cmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("path.logs"))
cmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("path.downloads"))
cmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("path.install"))
cmd.PersistentFlags().AddGoFlag(flag.CommandLine.Lookup("path.socket"))

// logging flags
Expand Down
3 changes: 0 additions & 3 deletions internal/pkg/agent/cmd/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,6 @@ func buildEnrollArgs(cfg setupConfig, token string, policyID string) ([]string,
if paths.Downloads() != "" {
args = append(args, "--path.downloads", paths.Downloads())
}
if paths.Install() != "" {
args = append(args, "--path.install", paths.Install())
}
if !paths.IsVersionHome() {
args = append(args, "--path.home.unversioned")
}
Expand Down
3 changes: 0 additions & 3 deletions internal/pkg/agent/cmd/enroll_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,6 @@ func (c *enrollCmd) startAgent(ctx context.Context) (<-chan *os.ProcessState, er
if paths.Downloads() != "" {
args = append(args, "--path.downloads", paths.Downloads())
}
if paths.Install() != "" {
args = append(args, "--path.install", paths.Install())
}
if !paths.IsVersionHome() {
args = append(args, "--path.home.unversioned")
}
Expand Down

0 comments on commit 6c005a4

Please sign in to comment.