Skip to content

Commit

Permalink
PMM-13399 Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Demidoff <alexander.demidoff@percona.com>
  • Loading branch information
BupycHuk and ademidoff authored Oct 21, 2024
1 parent c8b3c51 commit f34a6c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions agent/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func get(args []string, cfg *Config, l *logrus.Entry) (string, error) { //nolint

if cfg.Paths.NomadDataDir == "" {
cfg.Paths.NomadDataDir = filepath.Join(cfg.Paths.PathsBase, agentDataPath, "nomad")
l.Infof("Nomad data directory is not configured and will be set to %s", cfg.Paths.NomadDataDir)
l.Infof("Nomad data directory will default to %s", cfg.Paths.NomadDataDir)
}

if !filepath.IsAbs(cfg.Paths.TempDir) {
Expand Down Expand Up @@ -404,7 +404,7 @@ func Application(cfg *Config) (*kingpin.Application, *string) {
Envar("PMM_AGENT_PATHS_PT_MONGODB_SUMMARY").StringVar(&cfg.Paths.PTMongoDBSummary)
app.Flag("paths-pt-mysql-summary", "Path to pt my sql summary to use [PMM_AGENT_PATHS_PT_MYSQL_SUMMARY]").
Envar("PMM_AGENT_PATHS_PT_MYSQL_SUMMARY").StringVar(&cfg.Paths.PTMySQLSummary)
app.Flag("paths-nomad", "Path to nomad to use [PMM_AGENT_PATHS_NOMAD]").
app.Flag("paths-nomad", "Path to nomad binary. Can be overridden using [PMM_AGENT_PATHS_NOMAD]").
Envar("PMM_AGENT_PATHS_NOMAD").StringVar(&cfg.Paths.Nomad)
app.Flag("paths-nomad-data-dir", "Nomad data directory [PMM_AGENT_PATHS_NOMAD_DATA_DIR]").
Envar("PMM_AGENT_PATHS_NOMAD_DATA_DIR").StringVar(&cfg.Paths.NomadDataDir)
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/build-client-source
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ prepare_nomad_tarball() {
if [ -f "${tarball}" ]; then
echo ${tarball} already exists, skipping download
else
wget https://github.com/hashicorp/nomad/archive/${commit_hash}.tar.gz -O ${tarball}
curl -o ${tarball} -fSsL https://github.com/hashicorp/nomad/archive/${commit_hash}.tar.gz
fi
}

Expand Down
2 changes: 1 addition & 1 deletion build/scripts/install_tarball
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ ${INSTALL_COMMAND} -m 0755 queries-mysqld-group-replication.yml "${PMM_DIR}"/col
for FILE in $( ls ${PWD}/bin ); do
if [ "x${FILE}" = "xpmm-admin" ] || [ "x${FILE}" = "xpmm-agent" ] || [ "x${FILE}" = "xpmm-agent-entrypoint" ]; then
${INSTALL_COMMAND} -m 0755 ${PWD}/bin/${FILE} "${PMM_DIR}"/bin
elif [ "x${FILE}" = "xpt-summary" ] || [ "x${FILE}" = "xpt-mysql-summary" ] || [ "x${FILE}" = "xpt-pg-summary" ] || [ "x${FILE}" = "xpt-mongodb-summary" ] || [ "x${FILE}" = "xnomad" ]; then
elif [[ "${FILE}" =~ pt-summary|pt-mysql-summary|pt-pg-summary|pt-mongodb-summary|nomad ]]; then
${INSTALL_COMMAND} -m 0755 ${PWD}/bin/"${FILE}" "${PMM_DIR}"/tools
else
${INSTALL_COMMAND} -m 0755 ${PWD}/bin/"${FILE}" "${PMM_DIR}"/exporters
Expand Down

0 comments on commit f34a6c3

Please sign in to comment.