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

PMM-12762 Get notified about new version. #2951

Open
wants to merge 39 commits into
base: v3
Choose a base branch
from

Conversation

BupycHuk
Copy link
Member

@BupycHuk BupycHuk commented Apr 8, 2024

PMM-12762

Link to the Feature Build: SUBMODULES-3612

If this PR adds or removes or alters one or more API endpoints, please review and add or update the relevant API documents as well:

  • API Docs updated

If this PR is related to some other PRs in this or other repositories, please provide links to those PRs:

  • Links to related pull requests (optional).

@BupycHuk BupycHuk requested a review from a team as a code owner April 8, 2024 09:07
@BupycHuk BupycHuk requested review from idoqo and JiriCtvrtka and removed request for a team April 8, 2024 09:07
@BupycHuk BupycHuk marked this pull request as draft April 8, 2024 09:56
managed/services/supervisord/devcontainer_test.go Outdated Show resolved Hide resolved
managed/services/server/deps.go Outdated Show resolved Hide resolved
managed/services/server/server.go Outdated Show resolved Hide resolved
managed/services/server/updater.go Show resolved Hide resolved
managed/services/server/updater.go Show resolved Hide resolved
managed/services/server/updater.go Outdated Show resolved Hide resolved
managed/services/server/updater.go Outdated Show resolved Hide resolved
managed/services/server/updater_test.go Show resolved Hide resolved
managed/services/server/updater_test.go Outdated Show resolved Hide resolved
managed/services/server/updater_test.go Outdated Show resolved Hide resolved
@@ -100,3 +101,14 @@ func (p *Parsed) Less(right *Parsed) bool {

return p.Rest < right.Rest
}

func (p *Parsed) UnmarshalJSON(b []byte) error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
exported: exported method Parsed.UnmarshalJSON should have comment or be unexported (revive)

parsed, err := version.Parse(splitTag[1])
if err != nil {
up.l.Debugf("Failed to parse version: %s", splitTag[1])
return &version.DockerVersionInfo{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
error is not nil (line 265) but it returns nil (nilerr)

version/parsed.go Show resolved Hide resolved
managed/services/server/updater.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Apr 16, 2024

Codecov Report

Attention: Patch coverage is 1.81818% with 54 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (v3@38f2862). Click here to learn what that means.

❗ Current head 7045e32 differs from pull request most recent head 26b57d5. Consider uploading reports for the commit 26b57d5 to get more accurate results

Files Patch % Lines
managed/services/server/updater.go 0.00% 47 Missing ⚠️
managed/services/server/server.go 20.00% 4 Missing ⚠️
managed/cmd/pmm-managed/main.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##             v3    #2951   +/-   ##
=====================================
  Coverage      ?   43.45%           
=====================================
  Files         ?      365           
  Lines         ?    42493           
  Branches      ?        0           
=====================================
  Hits          ?    18466           
  Misses        ?    22419           
  Partials      ?     1608           
Flag Coverage Δ
admin 11.56% <ø> (?)
vmproxy 68.57% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BupycHuk BupycHuk marked this pull request as ready for review April 17, 2024 08:49
@BupycHuk BupycHuk requested review from a team and talhabinrizwan as code owners April 17, 2024 08:49
@BupycHuk BupycHuk requested review from ademidoff and removed request for a team April 17, 2024 08:49
.github/workflows/managed.yml Outdated Show resolved Hide resolved
Comment on lines +128 to +131
while IFS= read -r service; do
echo "Logs for $service:"
docker exec pmm-server supervisorctl tail $service
done <<< "$services"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to keep these going forward?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's to debug in case of any upcoming issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I find the following construct a bit simpler to understand:

  for service in $services; do
    echo "Logs for $service:"
    docker exec pmm-server supervisorctl tail $service
  done

Up to you :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be easier, but for the some reason it stores all lines as one element in services array. I tried that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for service in "${services[@]}"; do - that is the syntax for looping through array elements.

Base automatically changed from PMM-11261-update-via-watchtower to v3 April 18, 2024 15:54
BupycHuk and others added 3 commits April 20, 2024 00:18
# Conflicts:
#	api/serverpb/server.pb.go
#	descriptor.bin
#	docker-compose.yml
#	managed/services/server/server.go
#	managed/services/server/updater.go
Co-authored-by: Alex Demidoff <alexander.demidoff@percona.com>
@BupycHuk BupycHuk requested a review from ademidoff April 20, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants