use result files for deployment#263
Merged
laraPPr merged 10 commits intoEESSI:developfrom Mar 27, 2024
Merged
Conversation
- defines a number of constant strings (to be used in tasks/deploy.py) - defines a new function determine_job_id_from_job_directory - defines a new function get_section_from_file - removes function read_job_metadata_from_file (calls to be replaced by get_section_from_file)
- includes numerous related changes
- uses job_metadata.get_section_from_file to read job metadata and return PR
section
- renames determine_eessi_tarballs to determine_artefacts
- uses _bot_jobSLURM_JOBID.result file to obtain artefacts
- it relies on what the script bot/check-build.sh in the target GitHub
repository determines as artefacts, thus it does need to know anything about
the target GitHub repository
- renames check_build_status to check_job_status
- completely overhauled logic which essentially relies on the value of the
status attribute in the _bot_jobSLURM_JOBID.result file
- it relies on what the script bot/check-build.sh in the target GitHub
repository determines as status, thus it does need to know anything about
the target GitHub repository
- renames upload_tarball to upload_artefact
- no changes of logic
- mostly renamed 'tarball' to 'artefact' (except for tarball_prefix* related
variables; these might be changed in a later PR; a change would also require
changes to the configurations, app.cfg.example and README.md)
- also changed 'build_target' to 'payload' and made clear that
'eessi-VERSION-COMPONENT-OS-ARCH' is just format used within EESSI to
describe the contents of a payload (or build_target)
- updated uploaded_before
- no changes of logic
- uses 'payload' instead of 'build_target'
- updated determine_successful_jobs
- removes unnecessary function calls: determine_slurm_out
- removes unnecessary key/value pair in job dictionary: 'slurm_out'
- switches to using 'artefact' instead of 'eessi_tarball' for variables and
functions (determine_artefacts)
- uses renamed and overhauled check_job_status
- minor polishing of log messages: 'build' -> 'job'
- renames determine_tarballs_to_deploy to determine_artefacts_to_deploy
- removes mentioning of 'slurm_out' data in job dictionary (docstring)
- rephrases 'build*target' to 'payload' (docstring)
- rephrases '(built/eessi) tarballs' to 'artefacts' (docstring, variables, log
messages)
- renames 'tb0' to 'artefact'
- updated deploy_built_artefacts
- uses determine_artefacts_to_deploy instead of determine_tarballs_to_deploy
- rephrases 'target' to 'payload'
- uses upload_artefact instead of upload_tarball
- file 'tools/job_metadata.py' - add constant for 'TEST' section - file 'eessi_bot_job_manager.py' - replace read_job_metadata_from_file, read_job_test and read_job_result with get_section_from_file - some polishing: changing imports, removing unused functions - file 'tests/test_tools_job_metadata.py' - replaced read_job_metadata_from_file with get_section_from_file - updated log file name accordingly
laraPPr
reviewed
Mar 25, 2024
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a long awaited PR for making the bot more agnostic to what it builds for. Specifically this removes code in the deployment procedure that was only correct for deploying tarballs created by build jobs for the (EESSI) software-layer.
It contains necessary changes in the logic but also some improvements to reduce boiler-plate code (handling/reading of information from
ini/cfg-type files) and some renaming of variables, functions and log messages.Below is a breakdown of the major changes
file
tasks/deploy.pyget_section_from_file(tools/job_metadata.py) to read job metadata and returnPRsection
determine_eessi_tarballstodetermine_artefacts_bot_jobSLURM_JOBID.resultfile to obtain list of artefacts (previously named tarballs)bot/check-build.shin the target GitHubrepository determines as artefacts, thus it does need to know anything about
the target GitHub repository
check_build_statustocheck_job_statusattribute
statusin the_bot_jobSLURM_JOBID.resultfilebot/check-build.shin the target GitHubrepository determines as status, thus it does need to know anything about
the target GitHub repository
upload_tarballtoupload_artefacttarball_prefix*relatedvariables; these might be changed in a later PR; a change would also require
changes to the configurations of bot instances,
app.cfg.exampleandREADME.md)'eessi-VERSION-COMPONENT-OS-ARCH' is just a format used within EESSI to
describe the contents of a 'payload' (or 'build_target')
uploaded_beforedetermine_successful_jobsdetermine_slurm_outfunctions (
determine_artefacts)check_job_statusdetermine_tarballs_to_deploytodetermine_artefacts_to_deploymessages)
deploy_built_artefactsdetermine_artefacts_to_deployinstead ofdetermine_tarballs_to_deployupload_artefactinstead ofupload_tarballfile
tools/job_metadata.pytasks/deploy.py)determine_job_id_from_job_directoryget_section_from_fileread_job_metadata_from_file(calls to be replaced byget_section_from_file)file
eessi_bot_job_manager.pyread_job_metadata_from_file,read_job_testandread_job_resultwith functionget_section_from_filefile
tests/test_tools_job_metadata.pyread_job_metadata_from_filewith functionget_section_from_filefiles
README.md,app.cfg.example,scripts/eessi-upload-to-staging,tasks/deploy.pyandtests/test_app.cfgtarballwithartefactandTARBALLwithARTEFACT, respectively (wherever it makes sensetarballwhere it makes sense)files
README.md,app.cfg.exampleandtests/test_app.cfgbot/check-build.shscript in the target repository of a pull request and the bot does not need to know anything about those specific messages ... it just prints whatever thebot/check-build.shscript generatesTODOs
app.cfg; to ensure that those updates are made we should enhance the event handler and the job manager via a separate PR as described in check for needed configuration settings at the start of bot components #264