Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Revert "Merge pull request #191 from winniex1/get_property" #200

Merged
merged 1 commit into from
Dec 19, 2017

Conversation

pmasrani
Copy link

This reverts commit 29b7198, reversing
changes made to fb2009d.

Conflicts:

liota/lib/utilities/utility.py

packages/liotad/liotapkg.sh

…rty"

This reverts commit 29b7198, reversing
changes made to fb2009d.

# Conflicts:
#	liota/lib/utilities/utility.py
#	packages/liotad/liotapkg.sh
Copy link

@gkmccready gkmccready left a comment

Choose a reason for hiding this comment

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

The backout looks good; what testing did you perform?

@pmasrani
Copy link
Author

Reply to Glen's comment: After reverting the changes, i tried out load, unload, unload_all, reload and list pkg commands.

@@ -40,7 +40,8 @@
from Queue import Queue
from time import sleep
from abc import ABCMeta, abstractmethod
from liota.lib.utilities.utility import read_liota_config, sha1sum, validate_named_pipe

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the extra line

Copy link
Author

Choose a reason for hiding this comment

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

This is a revert of a commit. I don't want to introduce changes in a revert.

Copy link
Contributor

Choose a reason for hiding this comment

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

They are not changes, it is code formatting as this is getting introduced as part of the new commit.

if command in ["load", "reload", "update"]:
#-----------------------------------------------------------
# Use these commands to handle package management tasks

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the extra line, reformat all the files using autopep format.

Copy link
Author

Choose a reason for hiding this comment

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

This is a revert of a commit. I don't want to introduce changes in a revert. Ideally, each developer should take care of formatting during initial check-in itself or there should be tests in the code base which fail if there are formatting issues.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now the changes are getting introduced in form of code revert and formatting should be done.

Copy link
Author

Choose a reason for hiding this comment

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

As discussed, formatting and all should not be taken care of as part of a git revert. It should ideally just revert whatever was introduced,


if ! [ `ps -ef | grep "liotad.py" | grep -v grep | wc -l` -gt 0 ]
then
echo "Liota package manager is not running. Please run it first!"
exit 1
exit -1
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the significance of changing it to "-1"????

I think they should be positive integers as they are independent of the rollback.

Choose a reason for hiding this comment

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

You're right. I missed it in my review. All exit values should be >= 0.

Copy link
Author

Choose a reason for hiding this comment

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

This is a revert of a commit. I don't want to introduce changes in a revert. This is what happens when we address more than one issue in a single commit/merge :-)

I validated that ICE client is not consuming these values. It is still a bug in liota. Please raise a separate bug for this. Also, exit values 1 and 2 have special meaning, so we should not use them in the return status. Hence, with or without this revert, the bug still needs to be raised.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a new commit which is getting introduced and shouldn't change the fixed issue of exit status under the revert tag. It can be handled in separate commit but the correct code shouldn't be affected due to this commit.

What is the significance of exit values "1" and "2" and "-1" and "-2"?

Copy link
Author

Choose a reason for hiding this comment

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

Exit code 1 and 2 have special meanings: http://tldp.org/LDP/abs/html/exitcodes.html

As discussed, this is a git revert commit, and we should not introduce new changes.

Choose a reason for hiding this comment

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

That page is describing what bash itself exits with; we can define whatever exit codes we want for when our scripts exit.

pass

def validate_named_pipe(self, pipe_file):
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see comment section added which wasn't part of Winnie`s initial commit. Hence, this is not a revert commit.

Copy link
Author

Choose a reason for hiding this comment

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

As discussed, this is a revert commit. utility.py and liotapkg.sh where having merge conflicts, and hence, these changes were manually merged.

A revert commit should only take care of reverting the changes, and should not introduce any new changes.

@KohliDev
Copy link
Contributor

The above-mentioned issues should be handled in separate pull request as it changes the existing code in the Liota codebase by the dev reverting the commit.

@pmasrani
Copy link
Author

Reply to Vaibhav: yes agreed. Please raise separate bugs for the issues. Can you please approve the changes if the revert seems fine?

@KohliDev
Copy link
Contributor

The issue has been opened and should be resolved, approving the pull request;

#201

Copy link
Contributor

@KohliDev KohliDev left a comment

Choose a reason for hiding this comment

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

Issue marked that current code changes introduced by this PR should be resolved;

#201

@pmasrani pmasrani merged commit 84f546e into vmware-archive:master Dec 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants