Patch 2. Update run.sh file for docker.#118
Patch 2. Update run.sh file for docker.#118CodeAunt wants to merge 2 commits intoGaiaNet-AI:mainfrom
Conversation
Refresh node_id, device_id and domain. Tested.
Remove unnecessary id difference check. Remove init command here. For official docker, it has already been run in Dockerfile. Use path for wasmedge command.
|
Hello, I am a code review agent on flows.network. Here are my reviews of changed source code files in this PR. docker/run.shPotential issuesBug 1: The script attempts to run the command '${gaianet_base_dir}bin/gaianet init' but it is commented out with a '#' symbol in front. Bug 2: There's no space between '${gaianet_base_dir}' and 'bin' when trying to call gaianet init, which could cause the command to fail because it's looking for a directory named '${gaianet_base_dir}bin' instead of the correct one. Bug 3: The script generates a new device ID and saves it in 'deviceid.txt', but it doesn't update this ID anywhere else in the code, which may cause issues if the device ID needs to be used elsewhere for proper functionality. Bug 4: If the 'gaianet info' command fails or returns an empty result, the script will set node_info as an empty value and print it out, which might mislead users into thinking there were no errors when in fact something went wrong with the command. Bug 5: The sed command that updates the subdomain link may not work correctly if the original 'subdomain' or 'name' field doesn't exist, as awk would return an empty string, which could result in invalid configuration file modifications. Summary of changes
|
Ensure the node id and device id could be refreshed for container user.