Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Conversation

@ggonzr
Copy link
Contributor

@ggonzr ggonzr commented Aug 25, 2023

This PR includes some updates to retrieve user credentials from the new CERN SSO and refactors the code to avoid using configuration files, all the configuration variables are now taken from environment variables managed by the module environment.py. Also, formats the code using Black formatter and configures the remote scripts executed in HTCondor to request access_tokens via a client_credential request to stop using session cookies. To conclude, this update includes the container definition for this application to be able to deploy it via Kubernetes or OpenShift

REMINDER: After merging the WebCore changes and this PR, please update the core_lib submodule to use the version available in master. Also, please update the local/file_creator.py, specifically, create_job_script_file() function to clone the repository directly from the master branch and not the SSOMigrationV2 branch

ggonzr and others added 14 commits August 3, 2023 14:55
Also include mypy into requirements.txt file
All the required configuration is now being set as environment variables
Also, packages used are updated
Include AuthenticationMiddleware via core_lib
This configures two modules: `remote_apparatus.py` for requesting an access token
via client credentials grant and `controller.py` to give the required credentials via
environment variables when the job is submitted
Fix a logic error on /api/update endpoint that impedes the batch job running into HTCondor to update the RelMon status
Bugfix: RelMon validation status
Also, update how environment variables are sent to HTCondor into JDS configuration file
Clone directly the specific desired branch
Remove access token from log file
@ggonzr
Copy link
Contributor Author

ggonzr commented Sep 13, 2023

PdmV WebCore has been updated. Let's proceed with the other changes and update the GitHub Actions.

Use Ubuntu 22.04 for the runner and update Python version to 3.11.4
Some features the old Pylint version used where removed in Python 3.11
For more details, please see: python/cpython#28618
1. Update Pylint configuration (.pylintrc)
2. Raise the acceptance score to 9.75
3. Fix some linting issues: Encoding errors, broad exceptions, etc.
4. Increase the GitHub Action checkout version to 4
5. Disable linting for core_lib and venv packages
1. Update core_lib to use the version available in PdmVWebCore/master
2. Update `local/file_creator.py` to pull the remote code from `master` instead of `SSOMigrationV2`
@ggonzr ggonzr merged commit 00b0811 into master Sep 13, 2023
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.

2 participants