All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
verify_signed_tag
, which verifies the tag's signature and makes sure we're updated to it.
rebuild_gpg_homedirs
now uses git tags instead of checking for signed commits.get_git_revision
now takes aref
kwarg; it finds the revision for that ref (e.g., tag, branch).update_signed_git_repo
revision
kwarg is now namedref
. It also verifies and updates to the signed git tag instead ofref
.update_signed_git_repo
now returns a tuple (revision, tag)build_gpg_homedirs_from_repo
now usesverify_signed_tag
instead ofverify_signed_git_commit
, and takes a newtag
arg.
- the curl command in
Dockerfile.gnupg
now retries on failure.
verify_signed_git_commit_output
verify_signed_git_commit
- beetmover and balrog scriptworker support in chain of trust verification
cot_restricted_trees
config, which maps branch-nick to branches
- Changed
cot_restricted_scopes
to be a scope to branch-nick dict, indexed bycot_product
- nuke then move the tmp gpg homedir, rather than trying to [wrongly] use
overwrite_gpg_home
on a parent dir
- Dockerfiles: one for general testing and one for gpg homedir testing, with readme updates
flake8_docstrings
in tox.ini- log chain of trust verification more verbosely, since we no longer have real artifacts uploaded alongside
- download cot artifacts into
work_dir/cot
instead ofartifact_dir/public/cot
, to avoid massive storage dups download_artifacts
now returns a list of full paths instead of relative paths. SinceupstreamArtifacts
contains the relative paths, this should be more helpful.contextual_log_handler
now takes alogging.Formatter
kwarg rather than a log format string.
- check for a new gpg homedir before
run_loop
, because puppet will now userebuild_gpg_homedirs
- updated all docstrings to pass
flake8_docstrings
- switched to a three-phase lockfile for gpg homedir creation to avoid race conditions (locked, ready, unlocked)
- catch
aiohttp.errors.DisconnectedError
andaiohttp.errors.ClientError
inrun_loop
duringupload_artifacts
- compare the built docker-image tarball hash against
imageArtifactHash
- the
create_initial_gpg_homedirs
entry point has been removed in favor ofrebuild_gpg_homedirs
.
scriptworker.cot.verify.raise_on_errors
now takes a kwarg oflevel
, which defaults tologging.CRITICAL
. This is to support fuzzy task matching, where not matching a task is non-critical.scriptworker.cot.verify.verify_link_in_task_graph
now supports fuzzy task matching. If the Link'stask_id
isn't in the task graph, try to match the task definition against the task graph definitions, and throwCoTError
on failure. This is to support Taskcluster retriggers.verify_cot
is now an entry point, rather than a helper script inscriptworker/test/data/
.
- allowed for
USE_SCCACHE
as a build env var
scriptworker.cot.verify
now verifies the chain of trust for the graph.scriptworker.exceptions.CoTError
now marks chain of trust validation errors.scriptworker.task.get_task_id
,scriptworker.task.get_run_id
,scriptworker.task.get_decision_task_id
,scriptworker.task.get_worker_type
scriptworker.log.contextual_log_handler
for short-term logs- added framework for new docs
- config files are now yaml, to enable comments.
config_example.json
andcot_config_example.json
have been consolidated intoscriptworker.yaml.tmpl
.context.cot_config
items now live incontext.config
. validate_artifact_url
now takes a list of dictionaries as rules, leading to more configurable url checking.scriptworker.cot
is nowscriptworker.cot.generate
. Theget_environment
function has been renamed toget_cot_environment
.scriptworker.gpg.get_body
now takes averify_sig
kwarg.download_artifacts
now takesvalid_artifact_task_ids
as a kwarg.max_connections
is nowaiohttp_max_connections
- scriptworker task definitions now expect an
upstreamArtifacts
list of dictionaries
- docstring single backticks are now double backticks
- catch aiohttp exceptions on upload
- removed all references to
cot_config
- removed the credential update, since puppet restarts scriptworker on config change.
gpg_lockfile
andlast_good_git_revision_file
in configget_last_good_git_revision
andwrite_last_good_git_revision
now return the last good git revision, and write it tolast_good_git_revision_file
, respectively.get_tmp_base_gpg_home_dir
is a helper function to avoid duplication in logic.rebuild_gpg_homedirs
is a new entry point script that allows us to recreate the gpg homedirs in a tmpdir, in a separate processis_lockfile_present
,create_lockfile
, andrm_lockfile
as helper functions for the two gpg homedir entry points.
sign_key
,rebuild_gpg_home_flat
,rebuild_gpg_home_signed
,build_gpg_homedirs_from_repo
are no longer async.overwrite_gpg_home
only keeps one backup.update_signed_git_repo
now returns the latest git revision, instead of a boolean marking whether the revision is new or not. This will help avoid the scenario where we update, fail to generate the gpg homedirs, and then stay on an old revision until the next push.update_logging_config
now takes afile_name
kwarg, which allows us to create new log files for therebuild_gpg_homedirs
andcreate_initial_gpg_homedirs
entry points.
build_gpg_homedirs_from_repo
now waits to verify the contents of the updated git repo before nuking the previous base gpg homedir.create_initial_gpg_homedirs
now creates a logfile
rebuild_gpg_homedirs_loop
is no longer needed, and is removed.
- logged the stacktrace if the
main
loop hits an exception. No longer catch and ignoreRuntimeError
, since it wasn't clear why that was put in. - updated
check_config
to make sure taskcluster-related configs match taskcluster requirements
- changed the way the polling loop works:
async_main
is now a single pass, whichmain
calls in awhile True
loop. This should fix the situation where polling was dying silently while the git update loop continued running every 5 minutes.
- explicitly pass
taskId
andrunId
toclaim_task
. There's a newhintId
property that appears inmessage_info['task_info']
that broke things.
- added
git_key_repo_dir
,base_gpg_home_dir
,my_email
, andgpg_path
toconfig_example.json
- added
cot_config_example.json
,cot_config_schema.json
, andscriptworker.config.get_cot_config
for ChainOfTrust config - added
update_signed_git_repo
,verify_signed_git_commit
,build_gpg_homedirs_from_repo
,rebuild_gpg_homedirs_loop
, andcreate_initial_gpg_homedirs
for gpg homedir creation and updates in the background. - added a background call to update the gpg homedirs in
scriptworker.worker.async_main
- added another entry point,
create_initial_gpg_homedirs
, for puppet to create the first gpg homedirs
- default config filename is now
scriptworker.json
instead ofconfig.json
- moved
scriptworker.config.get_context_from_cmdln
out ofscriptworker.worker.main
; now using argparse - changed default
sign_chain_of_trust
to True scriptworker.gpg.sign_key
,scriptworker.gpg.rebuild_gpg_home_flat
, andscriptworker.gpg.rebuild_gpg_home_signed
are now async, so they can happen in parallel in the background- renamed
scriptworker.gpg.latest_signed_git_commit
toscriptworker.gpg.verify_signed_git_commit_output
- combined
scriptworker.log.log_errors
andscriptworker.log.read_stdout
intoscriptworker.log.pipe_to_log
- added
taskGroupId
to the list of default validtaskId
s to download from. This logic will need to change in version 0.9.0 due to the new chain of trust dependency traversal logic
- added missing docstrings to the
download_artifacts
anddownload_file
functions - fixed coverage version in
tox.ini py35-coveralls
sign_key
now supports signing keys with multiple subkeys
- added
DownloadError
exception fordownload_file
- added
scriptworker.task.download_artifacts
- added
scriptworker.util.download_file
DEFAULT_CONFIG
,STATUSES
, andREVERSED_STATUSES
have moved toscriptworker.constants
.list_to_tuple
has been renamedfreeze_values
, and also converts dict values to frozendicts.
- significant gpg support
- ability to create new gpg homedirs
- scriptworker now requires
pexpect
for gpg key signing - docstrings!
- helper scripts to generate 1000 pubkeys and time importing them.
- added
scriptworker.utils.rm
as anrm -rf
function
utils.makedirs
now throwsScriptWorkerException
if the path exists and is not a directory or a softlink pointing to a directory.- gpg functions now take a
gpg_home
kwarg to specify a different homedir - moved
scriptworker.client.integration_create_task_payload
intoscriptworker.test
- renamed
scriptworker.util.get-_hash
kwarghash_type
tohash_alg
- renamed
firefox_cot_schema.json
tocot_v1_schema.json
; also, the schema has changed. - the chain of trust schema has changed to version 1.
- pass a
task
toscriptworker.task.reclaimTask
and exit the loop if it doesn't matchcontext.task
- we now verify that
context.task
is the same task we scheduledreclaim_task
for.
- Removed
get_temp_creds_from_file
, since we're not writingtemp_creds
to disk anymore - Removed
scriptworker.task.get_temp_queue
, since we already havecontext.temp_queue
- Removed
pytest-asyncio
dependency. It doesn't play well withpytest-xdist
. - Removed
scriptworker.task.get_temp_queue
; we can usecontext.temp_queue
- Removed
pytest-asyncio
usage to try to usepytest-xdist
, then turned that back off when it conflicted with the event loop
- added
firefox_cot_schema.json
for firefox chain of trust - added gpg signature creation + verification
- added chain of trust generation
- added
scriptworker.task.worst_level
function for determining overall result of task
unsignedArtifacts
url paths are now unquoted, so%2F
becomes/
validate_task_schema
renamed tovalidate_json_schema
- write task log files directly to the
task_log_dir
; this should be a subdir ofartifact_dir
if we want them uploaded. ScriptWorkerException
now has anexit_code
of 5 (internal-error
);ScriptWorkerRetryException
now has anexit_code
of 4 (resource-unavailable
)- moved
tests
directory toscriptworker/test
- Functions in
test_config
now ignore existingTASKCLUSTER_
env vars for a clean testing environment raise_future_exceptions
no longer throws an exception for an empty list of tasks- Updated
CONTRIBUTING.rst
to reflect reality
- add
scriptworker.utils.filepaths_in_dir
- added setup.cfg for wheels
- added
scriptworker.client.validate_artifact_url
. - added python-gnupg dependency
- test files no longer use a test class.
upload_artifacts
now uploads files in subdirectories ofartifact_dir
, preserving the relative paths.
- Removed unneeded creds file generation.
- Added
requirements-*.txt
files. The-prod
files have pinned versions+hashes, viareqhash
. - Added
raise_future_exceptions
function from signingscript
- Upload artifacts to public/env/
filename
. - Enabled coverage branches in testing.
- Enabled environment variable configuration for credentials+workerid
- Moved source repo to mozilla-releng/scriptworker
- No longer prepend stderr log lines with ERROR
- Reduced debug logging
- Tweaked the config defaults to be a bit more sane.
- Fixed an exception where automated processes without HOME set would fail to launch scriptworker
- Removed
scheduler_id
from config; it's only used to schedule integration tests.
upload_artifacts
now specifies acontent_type
oftext/plain
for the task logfiles, to fix linux uploading.
- Context now has a
claim_task
property that stores the output fromclaimTask
.Context.task
is now the task definition itself. scriptworker.utils.request
now takes additional kwargs to be a more versatile function.
- bundled version.json
- CHANGELOG.md
- Pinned
pytest-asyncio
to 0.3.0 because 0.4.1 hits closed event loop errors.