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

CTX-6123: Added --verbose flag for all commands that could have detai… #241

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

bogdant36
Copy link
Collaborator

…led execution output. Added message that leads to log file with detailed output after exception happened.

…led execution output. Added message that leads to log file with detailed output after exception happened.
coretex/cli/commands/node.py Outdated Show resolved Hide resolved
coretex/cli/commands/node.py Outdated Show resolved Hide resolved
coretex/cli/commands/node.py Outdated Show resolved Hide resolved
Bogdan Tintor added 2 commits August 16, 2024 14:39
# Conflicts:
#	coretex/cli/commands/node.py
#	coretex/cli/modules/intercept.py
#	coretex/cli/modules/node.py
#	coretex/cli/modules/utils.py
#	coretex/utils/docker.py
pass

# if ctx.params.get('verbose'):
# VERBOSE = True
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this comment be removed?

if param["name"] == "verbose" and param["flag_value"] == True:
CLISettings.verbose = True
except:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

Set verbose to false here

@@ -178,16 +183,16 @@ def getTagFromImageUrl(image: str) -> str:
return "latest"


def shouldUpdate(image: str) -> bool:
def shouldUpdate(image: str, ) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove comma

logFiles = list(logPath.glob("*.log"))
latestLogFile = max(logFiles, key = lambda f: f.stat().st_mtime)

errorEcho(f"Exception: {str(exc)}.\nYou can see detailed logs here: {latestLogFile}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

An error occured. You can see the detailed logs at {filepath}

@onBeforeCommandExecute(node_module.initializeNodeConfiguration)
def update(autoAccept: bool, autoDecline: bool) -> None:
def update(autoAccept: bool, autoDecline: bool, verbose: bool = False) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to have verbose defined explicitly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

@onBeforeCommandExecute(node_module.initializeNodeConfiguration)
def start(image: Optional[str]) -> None:
def start(image: Optional[str], verbose: bool = False) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to have verbose defined explicitly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

…click.group and click.command decorator with slight changes that serve our needs. onBeforeCommandExecute callback is deleted all functionality is now in base_group and base_command. Minor code cleanup in scope of this task (unused imports etc.)
…true since they change the output of the command and json cant be loaded no more.
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.

3 participants