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

Fix the failture of ubipop for rhel7 #240

Closed

Conversation

LinglingXiang
Copy link
Contributor

After the slave update from fedora 38 to fedora 40, the module query list return empty string, so remove the empty string and make the test case is pass.

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.77%. Comparing base (6e9ba2a) to head (4335d49).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #240   +/-   ##
=======================================
  Coverage   98.77%   98.77%           
=======================================
  Files           7        7           
  Lines         732      732           
=======================================
  Hits          723      723           
  Misses          9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

1.remove the  empty string when query module in fedora 40 slave node
@LinglingXiang
Copy link
Contributor Author

@rbikar @drepelov , could you help review it, thanks

@@ -427,14 +427,18 @@ def test_run_ubi_pop_for_rhel7(pulp_client):
), "Can't find the modulemd_default :{}".format(modulemd_defaults)

# verify the modulemd exist and modulemd default in the cdn server
modulemds = query_repo_modules(None, "ubi", rpm_repo_url, full_data=True)
modulemds = query_repo_modules(None, "ubi", rpm_repo_url)
Copy link
Member

Choose a reason for hiding this comment

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

you do another unnecessary call for the second time a few lines later, can you please refactor this so it does only one call and then filters received data in query_repo_modules ?

@@ -427,14 +427,18 @@ def test_run_ubi_pop_for_rhel7(pulp_client):
), "Can't find the modulemd_default :{}".format(modulemd_defaults)

# verify the modulemd exist and modulemd default in the cdn server
modulemds = query_repo_modules(None, "ubi", rpm_repo_url, full_data=True)
modulemds = query_repo_modules(None, "ubi", rpm_repo_url)
while "" in modulemds:
Copy link
Member

Choose a reason for hiding this comment

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

can you move this to query_repo_modules function? This filtering shouldn't be part of test. You can likely need this operation for other tests in future, so it's better to be done once in the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the same as below comments, i will close the merge request.
and submit a patch for changing the slave

mod_name, mod_profile = separate_modules(modulemds)[0]
assert mod_name == "httpd", "Expected modulemd: httpd, found modulemd: {}".format(
mod_name
)
assert (
"common [d]" in mod_profile
"common" in mod_profile
Copy link
Member

Choose a reason for hiding this comment

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

Did really the output changed for default modules? Or do we have rather problem in testing data or ubi-population-tool?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi Robert, the cause is the same as previous one query_repo_modules. After some investigation, the method works well in fedora38, in fedora 40, it will return in wrong format
Name Stream Profiles Summary
httpd 2.4 [d] common [ Apache HTTP Server
d], defa
ult, dev
el
if i update the yum update util-linux in fedora 40, the method can return mormally.
In summary, nothing wrong in this method, but something problem in os.
so i will change the fedora 40 slave script instead of changing the method

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.

2 participants