-
Notifications
You must be signed in to change notification settings - Fork 38
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
Issues: Install test does not test validity of packages (rpm/deb) #556
Issues: Install test does not test validity of packages (rpm/deb) #556
Conversation
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
@@ -18,6 +18,8 @@ before_install: | |||
|
|||
install: | |||
- pip install tox | |||
- pip install ordereddict |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ordereddict and six packages are not required for the build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. I had forgotten that I had put this in travis. I'll remove them and recommit
from collections import deque, namedtuple | ||
|
||
f5_sdk_rest_pattern = re.compile("^f5-sdk\s*=\s*(\d+\.\d+\.\d+)$") | ||
f5_sdk_rest_pattern = re.compile( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this redefined? I am not sure that the f5-sdk-rest pattern will match what you want it to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern is not used anymore. Will remove.
match = dep_match_re.match(line) | ||
if match: | ||
groups = list(match.groups()) | ||
my_dep = ReqDetails(groups[0], groups[2], groups[3]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is groups[0] the whole line? Or is this the package name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stumbled upon this too. Python2.7's re (at least) is behaving a little differently than I would expect here, and I had to work through it in the debugger. This was what I found:
Normally, groups[0] would be the whole match; however, in this case because I'm doing a match within a match, I get:
dep_match_re = re.compile('^((python|f5-sdk)[\w-]*)\s([<>=]{1,2})\s(\S+)')
dependent = 'python-six >= 1.10.2'
match = dep_match_re.search(dependent)
match
<_sre.SRE_Match object at 0x100e6cca8>
match.groups()
('python-six', 'python', '>=', '1.10.2')
0: 'python-six' is given by the ^((python|f5-sdk)[\w-]+)
1: 'python' is given by the internal expression (python|f5-sdk)
2: '>=' is given by the ([<>=]{1,2})
3: (\S+)
Python acts a little differently when you're doing match within a match... it's a little hairy and unfortunate that it behaves this way. I would, like what you're implying, expect it to be 0 - the full match 1 - the python-six 2 - the python|f5-sdk matching. It normally behaves this way, so for it to be different for a match-within-a-match was confusing.
RUN apt-get install python-requests git curl -y --force-yes | ||
RUN apt-get install python-six | ||
|
||
COPY ./fetch_and_install_deps.py / | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While you are at it you might as well change the way this is invoked so that invocation fails by using CMD or ENTRYPOINT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can do. Will grep for where else 'ENTRYPOINT' and 'CMD' is being used in-code and try and script-kitty. Hopefully, I'll have it working by the time you get in this afternoon.
@@ -4,7 +4,10 @@ FROM ubuntu:trusty | |||
RUN apt-get update -y && apt-get install software-properties-common -y | |||
RUN apt-add-repository cloud-archive:liberty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work. Would you remove the cloud-archive:mitaka and run this test with cloud-archive:liberty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err... right. Will remove the additional apt-add-repository...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed to work with just liberty repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments. We can discuss this. I like what you have done to manage the dependencies.
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
Forgot the travis change... please ignore this latest push... |
…so/f5-openstack-agent into feature_packaging_testing_fix_494
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
Okay... I think this is ready for review again... Changes made:
|
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
Failed in Travis... Will have a fix shortly. |
Fixes F5Networks#494 Problem: The test install algorithm to work with a more generic pool Analysis: I made the changes to make it so that the .deb and .rpm install tests would do what they're supposed to do. Before this change, the .deb and .rpm failures were not being properly tracked and would always fail due to improper regExp handling of expected strings. Tests: This is a test. To validate that this executes properly, use the .travis_yml file in its normal execution phasing.
Unsupported features page is incorrect
Fixes #494
Problem:
The test install algorithm to work with a more generic pool
Analysis:
I made the changes to make it so that the .deb and .rpm install tests
would do what they're supposed to do. Before this change, the .deb and
.rpm failures were not being properly tracked and would always fail due
to improper regExp handling of expected strings.
Tests:
This is a test. To validate that this executes properly, use the
.travis_yml file in its normal execution phasing.
@<reviewer_id>
What issues does this address?
Fixes #
WIP #
...
What's this change do?
Where should the reviewer start?
Any background context?