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

fix(cmd): addons-info working for non-db addons #1055

Merged
merged 2 commits into from Mar 27, 2024

Conversation

curzolapierre
Copy link
Member

@curzolapierre curzolapierre commented Mar 27, 2024

  • Add a changelog entry in the section "To Be Released" of CHANGELOG.md
 ➜  scalingo --app $APPNAME addons-info ad-42d531f2-c985-47b9-b7f1-6771c8ced235
+----------------+-----------------------+
| Addon Provider | Scalingo Docker Image |
| Plan           | base-plan             |
| Status         | running               |
+----------------+-----------------------+
 ➜  scalingo --app $APPNAME addons-info ad-5656af19-eda5-4f00-afec-3c1cd726f960
+----------------+--------------------+
| Addon Provider | Scalingo VPN IPSec |
| Plan           | vpn-ipsec-standard |
| Status         | running            |
+----------------+--------------------+
 ➜  scalingo --app $APPNAME addons-info postgresql
+------------------------+--------------------------------+
| Addon Provider         | PostgreSQL                     |
| Plan                   | postgresql-starter-512         |
| Status                 | running                        |
| Database Type          | postgresql                     |
| Version                | 14.9.0-1                       |
| Force TLS              | disabled                       |
| Internet Accessibility | disabled                       |
| Maintenance window     | Wednesdays at 15:00 (08 hours) |
+------------------------+--------------------------------+

Fixes #1054

@curzolapierre curzolapierre self-assigned this Mar 27, 2024
@curzolapierre curzolapierre force-pushed the fix/1054/addons-info_for_non_db_addon branch from 0ac01c3 to 2bffb48 Compare March 27, 2024 13:55
@curzolapierre curzolapierre marked this pull request as ready for review March 27, 2024 14:16
Copy link
Contributor

@ipfaze ipfaze left a comment

Choose a reason for hiding this comment

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

Some questions and nitpicks otherwise LGTM 👍

db/utils.go Outdated
package db

var (
SupportedDatabases = []string{"PostgreSQL", "InfluxDB", "MongoDB", "MySQL"}
Copy link
Contributor

Choose a reason for hiding this comment

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

question: no Redis? no Elasticsearch?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep that a regression, my bad. Nice catch

return strings.EqualFold(s, addonInfo.AddonProvider.ID)
})

dbInfo := [][]string{}
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: dbInfo is used for database information but also for other addon information after the condition.
I suggest:

Suggested change
dbInfo := [][]string{}
addonInfo := [][]string{}

Copy link
Member Author

Choose a reason for hiding this comment

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

This variable only contains database information, or I don't see which condition are you talking about. I surely miss something here, could you point me where exactly please?

Copy link
Contributor

Choose a reason for hiding this comment

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

🤦 my bad, I misread the code. You're right!

@curzolapierre curzolapierre force-pushed the fix/1054/addons-info_for_non_db_addon branch from 088c846 to 2dc2c1c Compare March 27, 2024 16:03
Copy link
Contributor

@ipfaze ipfaze left a comment

Choose a reason for hiding this comment

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

LGTM 👍

return strings.EqualFold(s, addonInfo.AddonProvider.ID)
})

dbInfo := [][]string{}
Copy link
Contributor

Choose a reason for hiding this comment

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

🤦 my bad, I misread the code. You're right!

@curzolapierre curzolapierre merged commit 053ab6f into master Mar 27, 2024
6 checks passed
@curzolapierre curzolapierre deleted the fix/1054/addons-info_for_non_db_addon branch March 27, 2024 16:33
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.

addons-info not working for non database addons
2 participants