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

recompiled binaries using go-compiler and btf updates #46

Merged
merged 2 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .framework-config
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SRC_FILE_PATH="${CURRENT_COMPILED_RELATIVE_FILE#/}"
BASH_FRAMEWORK_THEME="${BASH_FRAMEWORK_THEME:-default}"
BASH_FRAMEWORK_LOG_LEVEL="${BASH_FRAMEWORK_LOG_LEVEL:-0}"
BASH_FRAMEWORK_DISPLAY_LEVEL="${BASH_FRAMEWORK_DISPLAY_LEVEL:-3}"
BASH_FRAMEWORK_LOG_FILE="${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/${0##*/}.log}"
BASH_FRAMEWORK_LOG_FILE="${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/${0##*/}.log}"
BASH_FRAMEWORK_LOG_FILE_MAX_ROTATION="${BASH_FRAMEWORK_LOG_FILE_MAX_ROTATION:-5}"

# display elapsed time since last log
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ repos:
)$

- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
rev: v1.7.2
hooks:
- id: actionlint
stages: [pre-commit, pre-push, manual]
Expand Down Expand Up @@ -210,6 +210,6 @@ repos:
stages: [manual] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: v1.0.0
rev: v1.1.0
hooks:
- id: buildBashBinaries
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ repos:
)$

- repo: https://github.com/rhysd/actionlint
rev: v1.7.1
rev: v1.7.2
hooks:
- id: actionlint
stages: [pre-commit, pre-push, manual]
Expand Down Expand Up @@ -205,6 +205,6 @@ repos:
stages: [] # GITHUB

- repo: https://github.com/fchastanet/bash-compiler
rev: v1.0.0
rev: v1.1.0
hooks:
- id: buildBashBinaries
51 changes: 40 additions & 11 deletions bin/cli
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}

###
### LOG Level
Expand Down Expand Up @@ -862,6 +862,19 @@ Log::displayInfo() {
}


# @description Display message using success color (bg green/fg white)
# @arg $1 message:String the message to display
# @env DISPLAY_DURATION int (default 0) if 1 display elapsed time information between 2 info logs
# @env LOG_CONTEXT String allows to contextualize the log
Log::displaySuccess() {
if ((BASH_FRAMEWORK_DISPLAY_LEVEL >= __LEVEL_INFO)); then
Log::computeDuration
echo -e "${__SUCCESS_COLOR}SUCCESS - ${LOG_CONTEXT:-}${LOG_LAST_DURATION_STR:-}${1}${__RESET_COLOR}" >&2
fi
Log::logSuccess "$1"
}


# @description Display message using warning color (yellow)
# @arg $1 message:String the message to display
# @env DISPLAY_DURATION int (default 0) if 1 display elapsed time information between 2 info logs
Expand Down Expand Up @@ -958,6 +971,15 @@ Log::logMessage() {
}


# @description log message to file
# @arg $1 message:String the message to display
Log::logSuccess() {
if ((BASH_FRAMEWORK_LOG_LEVEL >= __LEVEL_INFO)); then
Log::logMessage "${2:-SUCCESS}" "$1"
fi
}


# @description log message to file
# @arg $1 message:String the message to display
Log::logWarning() {
Expand Down Expand Up @@ -1188,17 +1210,20 @@ Version::checkMinimal() {

Log::displayDebug "check ${commandName} version ${version} against minimal ${minimalVersion}"

Version::compare "${version}" "${minimalVersion}" || {
local result=$?
if [[ "${result}" = "1" ]]; then
local result=0
Version::compare "${version}" "${minimalVersion}" || result=$?
case "${result}" in
1)
Log::displayInfo "${commandName} version is ${version} greater than ${minimalVersion}"
elif [[ "${result}" = "2" ]]; then
;;
2)
Log::displayError "${commandName} minimal version is ${minimalVersion}, your version is ${version}"
return 1
fi
return 0
}

;;
*)
Log::displaySuccess "${commandName} version is matching exactly the expected minimal version ${version}"
;;
esac
}


Expand Down Expand Up @@ -1251,7 +1276,6 @@ Version::parse() {
}
# FUNCTIONS


declare -a BASH_FRAMEWORK_ARGV_FILTERED=()

beforeParseCallback() {
Expand Down Expand Up @@ -1690,14 +1714,17 @@ cliCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

containerArg=""

local -i options_parse_argParsedCountContainerArg
((options_parse_argParsedCountContainerArg = 0)) || true

userArg=""

local -i options_parse_argParsedCountUserArg
((options_parse_argParsedCountUserArg = 0)) || true

commandArg=""

local -i options_parse_argParsedCountCommandArg
((options_parse_argParsedCountCommandArg = 0)) || true

Expand Down Expand Up @@ -2054,7 +2081,6 @@ cliCommandParse() {
cliCommandHelp() {
echo -e "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}"
Array::wrap2 ' ' 76 4 " " "Easy connection to docker container."

echo
echo

Expand Down Expand Up @@ -2082,14 +2108,17 @@ cliCommandHelp() {
containerArgHelpFunction



Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}user${__HELP_NORMAL} {single}]"
userArgHelpFunction



Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}command${__HELP_NORMAL} {single}]"
commandArgHelpFunction



# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
49 changes: 38 additions & 11 deletions bin/dbImport
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}

###
### LOG Level
Expand Down Expand Up @@ -1092,6 +1092,19 @@ Log::displayInfo() {
}


# @description Display message using success color (bg green/fg white)
# @arg $1 message:String the message to display
# @env DISPLAY_DURATION int (default 0) if 1 display elapsed time information between 2 info logs
# @env LOG_CONTEXT String allows to contextualize the log
Log::displaySuccess() {
if ((BASH_FRAMEWORK_DISPLAY_LEVEL >= __LEVEL_INFO)); then
Log::computeDuration
echo -e "${__SUCCESS_COLOR}SUCCESS - ${LOG_CONTEXT:-}${LOG_LAST_DURATION_STR:-}${1}${__RESET_COLOR}" >&2
fi
Log::logSuccess "$1"
}


# @description Display message using warning color (yellow)
# @arg $1 message:String the message to display
# @env DISPLAY_DURATION int (default 0) if 1 display elapsed time information between 2 info logs
Expand Down Expand Up @@ -1188,6 +1201,15 @@ Log::logMessage() {
}


# @description log message to file
# @arg $1 message:String the message to display
Log::logSuccess() {
if ((BASH_FRAMEWORK_LOG_LEVEL >= __LEVEL_INFO)); then
Log::logMessage "${2:-SUCCESS}" "$1"
fi
}


# @description log message to file
# @arg $1 message:String the message to display
Log::logWarning() {
Expand Down Expand Up @@ -1418,17 +1440,20 @@ Version::checkMinimal() {

Log::displayDebug "check ${commandName} version ${version} against minimal ${minimalVersion}"

Version::compare "${version}" "${minimalVersion}" || {
local result=$?
if [[ "${result}" = "1" ]]; then
local result=0
Version::compare "${version}" "${minimalVersion}" || result=$?
case "${result}" in
1)
Log::displayInfo "${commandName} version is ${version} greater than ${minimalVersion}"
elif [[ "${result}" = "2" ]]; then
;;
2)
Log::displayError "${commandName} minimal version is ${minimalVersion}, your version is ${version}"
return 1
fi
return 0
}

;;
*)
Log::displaySuccess "${commandName} version is matching exactly the expected minimal version ${version}"
;;
esac
}


Expand Down Expand Up @@ -1481,7 +1506,6 @@ Version::parse() {
}
# FUNCTIONS


declare -a BASH_FRAMEWORK_ARGV_FILTERED=()

beforeParseCallback() {
Expand Down Expand Up @@ -2059,10 +2083,12 @@ dbImportCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

fromDbName=""

local -i options_parse_argParsedCountFromDbName
((options_parse_argParsedCountFromDbName = 0)) || true

targetDbName=""

local -i options_parse_argParsedCountTargetDbName
((options_parse_argParsedCountTargetDbName = 0)) || true

Expand Down Expand Up @@ -2586,7 +2612,6 @@ dbImportCommandParse() {
dbImportCommandHelp() {
echo -e "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}"
Array::wrap2 ' ' 76 4 " " "Import source db into target db using eventual table filter."

echo
echo

Expand Down Expand Up @@ -2614,10 +2639,12 @@ dbImportCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
echo


Array::wrap2 " " 80 2 " [${__HELP_OPTION_COLOR}<targetDbName>${__HELP_NORMAL} {single}]"
Array::wrap2 ' ' 76 4 " " "The name of the target database" "Default value: <fromDbName>(without extension)" ""
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
47 changes: 36 additions & 11 deletions bin/dbImportProfile
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ DISPLAY_DURATION=${DISPLAY_DURATION:0}
### all log messages will be redirected to log file specified
### this same path will be used inside and outside of the container
###
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${FRAMEWORK_ROOT_DIR}/logs/bash.log}
BASH_FRAMEWORK_LOG_FILE=${BASH_FRAMEWORK_LOG_FILE:-${BASH_TOOLS_ROOT_DIR}/logs/bash.log}

###
### LOG Level
Expand Down Expand Up @@ -971,6 +971,19 @@ Log::displayInfo() {
}


# @description Display message using success color (bg green/fg white)
# @arg $1 message:String the message to display
# @env DISPLAY_DURATION int (default 0) if 1 display elapsed time information between 2 info logs
# @env LOG_CONTEXT String allows to contextualize the log
Log::displaySuccess() {
if ((BASH_FRAMEWORK_DISPLAY_LEVEL >= __LEVEL_INFO)); then
Log::computeDuration
echo -e "${__SUCCESS_COLOR}SUCCESS - ${LOG_CONTEXT:-}${LOG_LAST_DURATION_STR:-}${1}${__RESET_COLOR}" >&2
fi
Log::logSuccess "$1"
}


# @description Display message using warning color (yellow)
# @arg $1 message:String the message to display
# @env DISPLAY_DURATION int (default 0) if 1 display elapsed time information between 2 info logs
Expand Down Expand Up @@ -1067,6 +1080,15 @@ Log::logMessage() {
}


# @description log message to file
# @arg $1 message:String the message to display
Log::logSuccess() {
if ((BASH_FRAMEWORK_LOG_LEVEL >= __LEVEL_INFO)); then
Log::logMessage "${2:-SUCCESS}" "$1"
fi
}


# @description log message to file
# @arg $1 message:String the message to display
Log::logWarning() {
Expand Down Expand Up @@ -1297,17 +1319,20 @@ Version::checkMinimal() {

Log::displayDebug "check ${commandName} version ${version} against minimal ${minimalVersion}"

Version::compare "${version}" "${minimalVersion}" || {
local result=$?
if [[ "${result}" = "1" ]]; then
local result=0
Version::compare "${version}" "${minimalVersion}" || result=$?
case "${result}" in
1)
Log::displayInfo "${commandName} version is ${version} greater than ${minimalVersion}"
elif [[ "${result}" = "2" ]]; then
;;
2)
Log::displayError "${commandName} minimal version is ${minimalVersion}, your version is ${version}"
return 1
fi
return 0
}

;;
*)
Log::displaySuccess "${commandName} version is matching exactly the expected minimal version ${version}"
;;
esac
}


Expand Down Expand Up @@ -1360,7 +1385,6 @@ Version::parse() {
}
# FUNCTIONS


declare -a BASH_FRAMEWORK_ARGV_FILTERED=()

beforeParseCallback() {
Expand Down Expand Up @@ -1870,6 +1894,7 @@ dbImportProfileCommandParse() {
((options_parse_optionParsedCountOptionQuiet = 0)) || true

fromDbName=""

local -i options_parse_argParsedCountFromDbName
((options_parse_argParsedCountFromDbName = 0)) || true

Expand Down Expand Up @@ -2281,7 +2306,6 @@ dbImportProfileCommandParse() {
dbImportProfileCommandHelp() {
echo -e "${__HELP_TITLE_COLOR}SYNOPSIS:${__RESET_COLOR}"
Array::wrap2 ' ' 76 4 " " "Generate optimized profiles to be used by dbImport."

echo
echo

Expand Down Expand Up @@ -2309,6 +2333,7 @@ dbImportProfileCommandHelp() {
Array::wrap2 ' ' 76 4 " " "The name of the source/remote database."
echo


# ------------------------------------------
# options section
# ------------------------------------------
Expand Down
Loading