-
Notifications
You must be signed in to change notification settings - Fork 176
Feature/4890 detect fail early upgrade #5864
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
kaanyalti
merged 39 commits into
elastic:main
from
kaanyalti:feature/4890_detect_fail_early_upgrade
Nov 8, 2024
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
57e54a0
feature(4890): added shouldUpgrade function in the upgrade cli file
kaanyalti 94ad0c3
feature(4890): added shouldUpgrade check into the upgrade command
kaanyalti 3a4b97c
feature(4890): ran gofmt
kaanyalti accbd22
feature(4890): added a "force" flag, marked it as hidden
kaanyalti 0339dff
feature(4890): removed dpkg, rpm and container logic
kaanyalti 36b3a23
feature(4890): ran gofmt
kaanyalti e9f4fb5
feature(4890): updated the function signature of the upgrade command,…
kaanyalti b0b9b82
feature(4890): update comments
kaanyalti 05195ae
feature(4890): added changelog fragment
kaanyalti 21b09af
feature(4890): added fatal log in case there is an error while markin…
kaanyalti 7853878
feature(4890): added error checks in tests
kaanyalti 89f3e0d
feature(4890): updated the summary in the changelog fragment
kaanyalti 0e9b791
feature(4890): removed the shorthand flag for the force flag
kaanyalti 621b465
feature(4890): updated synchronization in the tests
kaanyalti 7acd42e
Update internal/pkg/agent/cmd/upgrade_test.go
kaanyalti 7c66dd1
feature(4890): using streams err output instead of defaulting to stderr
kaanyalti fde8ef3
feature(4890): use EXPECT instead of On
kaanyalti dabd25e
feature(4890): moved unconfirmed upgrade error to a package var
kaanyalti 54d4da3
feature(4890): removed confirmation from upgrade check for when force…
kaanyalti 073222c
Update internal/pkg/agent/cmd/upgrade.go
kaanyalti f2f5691
Update internal/pkg/agent/cmd/upgrade.go
kaanyalti 5c6d62c
feature(4890): fix errors
kaanyalti 1c1f99a
Update internal/pkg/agent/cmd/upgrade.go
kaanyalti 3df1347
feature(4890): update test
kaanyalti 6d26eb2
fearure(4890): replace ageninfo with state call
kaanyalti 6bf8867
feature(4890): updated proto, client and server implementation
kaanyalti 7d99902
feature(4890): fix struct tag
kaanyalti fe3e91e
feature(4890): added skip-verify checks
kaanyalti c9320c8
feature(4890): ran addLicenseHeaders
kaanyalti 4601ea3
feature(4890): ran mage clean
kaanyalti d5d84bc
feature(4890): fix typo
kaanyalti 186fcb1
feature(4890): added timeout to connection
kaanyalti eb73c7f
feature(4890): changed condition check order
kaanyalti 2eb6b0d
feature(4890): fix unit tests
kaanyalti 8ade18e
feature(4890): refactored tests, using mock client
kaanyalti 6d21a40
Update internal/pkg/agent/cmd/upgrade.go
kaanyalti a4b27f7
feature(4890): use lower case "f" in error messages to be more consis…
kaanyalti 3de964e
feature(4890): remove duplicate line
kaanyalti 52f8884
feature(4890): ran mage controlProto with correct protoc version
kaanyalti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
changelog/fragments/1729971565-detect-fail-early-fleet-managed-cli-upgrade.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 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: enhancement | ||
|
||
# Change summary; a 80ish characters long description of the change. | ||
summary: Detect and fail-early cli upgrades if agent is fleet-managed | ||
|
||
# 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: This change brings restrictions on the upgrade cli command. If an agent is fleet-managed and is running in unprivileged mode, users won't be able to upgrade the agent using the cli. If an agent is fleet-managed and is running privileged, users will only be able to upgrade the agent using the cli if they provide --force flag. | ||
|
||
# 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/5864 | ||
# 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/owner/repo/1234 |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.