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

#1153 : improve offline capability #1364

Merged
merged 6 commits into from
Jan 30, 2024

Conversation

diiinesh
Copy link
Contributor

@diiinesh diiinesh commented Oct 16, 2023

fixes #1153
Added function: doCheckNetworkStatus()

adjusted function: doInstall()

specifically the if conditions where these functions are called:

doGitPullOrClone
doUpdateUrls
doDownload

If system is offline, skip these functions.

…adjusted the conditions for executing the functions doGitPullOrClone, DoUpdateUrls and doDownload when user is online, otherwise skip these functions.

Signed-off-by: diiinesh <[email protected]>
@github-actions github-actions bot added bash related to bash shell or scripts scripts related to shell scripts (bash and CMD) labels Oct 16, 2023
@diiinesh diiinesh changed the title #1153 - improve offline capability #1153 : improve offline capability Oct 16, 2023
@diiinesh diiinesh self-assigned this Oct 16, 2023
Copy link
Contributor

@jan-vcapgemini jan-vcapgemini left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@github-actions github-actions bot added the documentation related to documentation (AsciiDoc) label Oct 20, 2023
@diiinesh diiinesh requested a review from hohwille October 20, 2023 14:34
@tobka777 tobka777 marked this pull request as ready for review November 3, 2023 09:37
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@diiinesh thanks for your PR. Your function doCheckNetworkStatus looks perfect and you also properly documented it.
However, for the integration of the checks we need to adjust. I added comments to explain why the current approach is not working correctly.
My suggestion would be:

  • doGitPullOrClone: if repo is already there and pull fails, then add a doCheckNetworkStatus and if offline log a warning that the repo could not be updated because we are offline and return (continue flow)
  • doInstall: if software is already installed (maybe in a different version), then add a doCheckNetworkStatus and if offline log a warning that we cannot install update because we are offline and return (if ${version} was given per arg and matches .ide.software.version we should even suppress the check and the warning and then there is nothing to do anyways and also no problem if we are offline).

scripts/src/main/resources/scripts/functions Outdated Show resolved Hide resolved
scripts/src/main/resources/scripts/functions Outdated Show resolved Hide resolved
@hohwille hohwille added this to the release:2024.01.001 milestone Jan 5, 2024
@diiinesh diiinesh assigned hohwille and unassigned diiinesh Jan 26, 2024
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

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

@diiinesh thanks for your update. Looks sane to me now. 👍
It is still a little different to the behavior of IDEasy but fine to be merged.

@hohwille hohwille merged commit 95b5a75 into devonfw:master Jan 30, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bash related to bash shell or scripts documentation related to documentation (AsciiDoc) scripts related to shell scripts (bash and CMD)
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

improve offline capability
3 participants