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

Move filter replication json document under etc/ #12150

Merged
merged 4 commits into from
Oct 22, 2024

Conversation

amaltaro
Copy link
Contributor

@amaltaro amaltaro commented Oct 17, 2024

Fixes #11192

Status

ready

Description

Given that the json file isn't packaged into the distribution uploaded to PyPi, nor it can be packaged by instrumenting setup_dependencies.py [1] and [2]; I decided to move the json file under the etc/ directory, which can be looked up through the WMA_DEPLOY_DIR environment variable (suffixed with etc).

Summary of changes are:

  • remove ParentQueueUrl from the replication filter function
  • reposition replication_selector.json under etc/
  • fixed AgentStatusPoller unit tests have been instrumented such that it works in all scenarios (CC7 RPM, CC7 Docker, Alma9).
  • lastly, added RucioUtils_t.RucioUtilsTest:testWeightedChoice to the unstable tests.

Is it backward compatible (if not, which system it affects?)

YES

Related PRs

Follow up of #12143

External dependencies / deployment changes

[1] ### Using the statics option like:

        'statics': ['bin+',
                         ...
                         'src/python/WMComponent/AgentStatusWatcher/replication_selector.json'],

### python3 setup.py clean sdist, fails with:
Traceback (most recent call last):
  File "/home/alan/build_pypi/WMCore/setup.py", line 26, in <module>
    data_files = list_static_files(dependencies[package_name])
  File "/home/alan/build_pypi/WMCore/setup_build.py", line 118, in list_static_files
    static_files.extend(data_files_for(static_dir))
  File "/home/alan/build_pypi/WMCore/setup_build.py", line 96, in data_files_for
    for ifile in os.listdir(dir):
NotADirectoryError: [Errno 20] Not a directory: 'src/python/WMComponent/AgentStatusWatcher/replication_selector.json'

[2] ### Using the modules option like:

        'modules': ['WMComponent.AgentStatusWatcher.replication_selector.json'],

### python3 setup.py clean sdist, fails with:
writing manifest file 'src/python/wmagent.egg-info/SOURCES.txt'
error: package directory 'src/python/WMComponent/AgentStatusWatcher/replication_selector' does not exist

@amaltaro
Copy link
Contributor Author

And I can confirm that:

  1. the json file is now packaged into the tarball uploaded to PyPi (tested private building in my private VM)
  2. and upon patching AgentStatusWatcher - and locating this file under /usr/local/etc - it is able to find it and properly create the database replication documents.

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 1 new failures
    • 1 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 3 warnings
    • 27 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 5 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15336/artifact/artifacts/PullRequestReport.html

Copy link
Contributor

@todor-ivanov todor-ivanov left a comment

Choose a reason for hiding this comment

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

looking good. Thanks @amaltaro

Copy link
Member

@mapellidario mapellidario left a comment

Choose a reason for hiding this comment

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

thanks alan! looks perfect

@amaltaro
Copy link
Contributor Author

Thanks for the review!
I still have to figure what to do with the failing unit test though:

    WMComponent_t.AgentStatusWatcher_t.AgentStatusWatcher_t.AgentStatusWatcher_t:testAgentStatusPoller changed from success to error

given that Jenkins is currently running in the RPM base deployment, I will have to adapt it somehow.

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 2 new failures
    • 1 tests no longer failing
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 3 warnings
    • 27 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 5 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15337/artifact/artifacts/PullRequestReport.html

@cmsdmwmbot
Copy link

Can one of the admins verify this patch?

@amaltaro
Copy link
Contributor Author

test this please

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 2 new failures
    • 1 tests no longer failing
    • 2 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 3 warnings
    • 27 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 5 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15341/artifact/artifacts/PullRequestReport.html

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 1 new failures
    • 2 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 3 warnings
    • 32 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 7 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15343/artifact/artifacts/PullRequestReport.html

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 2 new failures
    • 1 tests no longer failing
    • 2 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 3 warnings
    • 32 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 8 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15348/artifact/artifacts/PullRequestReport.html

@amaltaro
Copy link
Contributor Author

test this please

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 1 new failures
    • 1 tests no longer failing
    • 2 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 3 warnings
    • 32 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 9 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15350/artifact/artifacts/PullRequestReport.html

unit test with all possible fallbacks

unit test: WMCORE_ROOT has double install dir now
@amaltaro
Copy link
Contributor Author

test this please

@cmsdmwmbot
Copy link

Jenkins results:

  • Python3 Unit tests: failed
    • 1 new failures
    • 1 tests no longer failing
    • 1 changes in unstable tests
  • Python3 Pylint check: failed
    • 5 warnings and errors that must be fixed
    • 3 warnings
    • 32 comments to review
  • Pylint py3k check: succeeded
  • Pycodestyle check: succeeded
    • 9 comments to review

Details at https://cmssdt.cern.ch/dmwm-jenkins/view/All/job/DMWM-WMCore-PR-test/15352/artifact/artifacts/PullRequestReport.html

@amaltaro amaltaro requested a review from mapellidario October 22, 2024 03:19
Copy link
Member

@mapellidario mapellidario left a comment

Choose a reason for hiding this comment

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

thanks for the changes and upgrading the list of unstable unittests!

@amaltaro
Copy link
Contributor Author

Thanks Dario! Failing unit test seems to actually be unstable:

    WMCore_t.WorkQueue_t.WorkQueue_t.WorkQueueTest:testProductionMultiQueue changed from success to failure

let us keep an eye on it in near future PRs and set it appropriately, if needed.

@amaltaro amaltaro merged commit 3917282 into dmwm:master Oct 22, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace replicator filters by selector objects
4 participants