Skip to content
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

Use third-party library for reporting install/uninstall progress #3623

Merged
merged 14 commits into from
Oct 25, 2023
Merged
122 changes: 92 additions & 30 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4733,6 +4733,37 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/schollz/progressbar/v3
Version: v3.13.1
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/schollz/progressbar/[email protected]/LICENSE:

MIT License

Copyright (c) 2017 Zack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/shirou/gopsutil/v3
Version: v3.23.2
Expand Down Expand Up @@ -5020,11 +5051,11 @@ Contents of probable licence file $GOMODCACHE/github.com/spf13/[email protected]/LICE

--------------------------------------------------------------------------------
Dependency : github.com/stretchr/testify
Version: v1.8.2
Version: v1.8.4
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/stretchr/[email protected].2/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/stretchr/[email protected].4/LICENSE:

MIT License

Expand Down Expand Up @@ -6209,14 +6240,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/exp
Version: v0.0.0-20220722155223-a9213eeb770e
Dependency : golang.org/x/lint
Version: v0.0.0-20210508222113-6edffad5e616
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/lint@v0.0.0-20210508222113-6edffad5e616/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.
Copyright (c) 2013 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -6246,14 +6277,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/lint
Version: v0.0.0-20210508222113-6edffad5e616
Dependency : golang.org/x/sync
Version: v0.3.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/lint@v0.0.0-20210508222113-6edffad5e616/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.3.0/LICENSE:

Copyright (c) 2013 The Go Authors. All rights reserved.
Copyright (c) 2009 The Go Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -6283,12 +6314,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/sync
Version: v0.3.0
Dependency : golang.org/x/sys
Version: v0.10.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/sync@v0.3.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.10.0/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -6320,12 +6351,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/sys
Dependency : golang.org/x/term
Version: v0.10.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/sys@v0.10.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.10.0/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -14201,11 +14232,11 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI

--------------------------------------------------------------------------------
Dependency : github.com/mattn/go-runewidth
Version: v0.0.14
Version: v0.0.15
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/mattn/[email protected].14/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/mattn/[email protected].15/LICENSE:

The MIT License (MIT)

Expand All @@ -14230,6 +14261,37 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/mitchellh/colorstring
Version: v0.0.0-20190213212951-d06e56a500db
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/mitchellh/[email protected]/LICENSE:

The MIT License (MIT)

Copyright (c) 2014 Mitchell Hashimoto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : github.com/mitchellh/go-homedir
Version: v1.1.0
Expand Down Expand Up @@ -15962,11 +16024,11 @@ Contents of probable licence file $GOMODCACHE/github.com/prometheus/[email protected].

--------------------------------------------------------------------------------
Dependency : github.com/rivo/uniseg
Version: v0.4.3
Version: v0.4.4
Licence type (autodetected): MIT
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/rivo/[email protected].3/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/rivo/[email protected].4/LICENSE.txt:

MIT License

Expand Down Expand Up @@ -17456,12 +17518,12 @@ THE SOFTWARE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/mod
Version: v0.9.0
Dependency : golang.org/x/exp
Version: v0.0.0-20220722155223-a9213eeb770e
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.9.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/exp@v0.0.0-20220722155223-a9213eeb770e/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -17493,12 +17555,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/net
Version: v0.12.0
Dependency : golang.org/x/mod
Version: v0.9.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.12.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/mod@v0.9.0/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -17530,12 +17592,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/oauth2
Version: v0.10.0
Dependency : golang.org/x/net
Version: v0.12.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/oauth2@v0.10.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/net@v0.12.0/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down Expand Up @@ -17567,12 +17629,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


--------------------------------------------------------------------------------
Dependency : golang.org/x/term
Dependency : golang.org/x/oauth2
Version: v0.10.0
Licence type (autodetected): BSD-3-Clause
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/golang.org/x/term@v0.10.0/LICENSE:
Contents of probable licence file $GOMODCACHE/golang.org/x/oauth2@v0.10.0/LICENSE:

Copyright (c) 2009 The Go Authors. All rights reserved.

Expand Down
32 changes: 32 additions & 0 deletions changelog/fragments/1697565877-progress-race-fixes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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: bug-fix

# Change summary; a 80ish characters long description of the change.
summary: Use third-party library for tracking progress in install/uninstall

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

# 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/3623

# 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/3607
12 changes: 7 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,21 @@ require (
github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.27.0
github.com/schollz/progressbar/v3 v3.13.1
github.com/shirou/gopsutil/v3 v3.23.2
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.2
github.com/stretchr/testify v1.8.4
github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b
go.elastic.co/apm/module/apmgorilla v1.15.0
go.elastic.co/ecszap v1.0.1
go.elastic.co/go-licence-detector v0.5.0
go.uber.org/zap v1.25.0
golang.org/x/crypto v0.11.0
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/sync v0.3.0
golang.org/x/sys v0.10.0
golang.org/x/term v0.10.0
golang.org/x/text v0.11.0
golang.org/x/time v0.3.0
golang.org/x/tools v0.7.0
Expand Down Expand Up @@ -117,7 +118,8 @@ require (
github.com/markbates/pkger v0.17.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/iochan v1.0.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
Expand All @@ -130,7 +132,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
Expand All @@ -145,10 +147,10 @@ require (
go.elastic.co/apm/v2 v2.0.0 // indirect
go.elastic.co/fastjson v1.1.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.12.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc/examples v0.0.0-20220304170021-431ea809a767 // indirect
Expand Down
Loading
Loading