-
Notifications
You must be signed in to change notification settings - Fork 380
Release
PKing70 edited this page May 19, 2020
·
67 revisions
These are instructions on the various steps necessary to cut out a new release of the Splunk SDK for Python. Even though the instructions are public, these steps are only meant to be taken by the SDK maintainers.
- Read through all of these release instructions.
- Update the version numbers in this document to the verison you're about to release.
- Update any steps if necessary.
- For updates that could apply to other SDKs as well, update the release instructions page for every other SDK.
- Update changelog.
- Run test suite on full test matrix - partially documented on the internal Confluence.
- Run
python setup.py dist
on the repository, this will generate the app builds inbuild/
folder. Installrandom_numbers.spl
,github_forks.spl
, andsearchcommands_app.tar.gz
in enterprise Splunk UI.-
For each of the
random_numbers
andgithub
apps, add a new data input for both kinds, and check that they generate events by running the search "*" with time range "Real time (all time)". -
For
searchcommands_app
, verify that each of these commands produces sensible results:| inputlookup tweets | countmatches fieldname=word_count pattern="\\w+" text
| generatetext text="Hello world! How the heck are you?" count=6 | filter predicate="(long(_serial) & 1) == 0" update="_raw = _raw.replace('world', 'Splunk')"
| generatetext count=10 text="Hello world!"
| pypygeneratetext count=10 text="Hello world!"
| simulate csv=$SPLUNK_HOME/etc/apps/searchcommands_app/data/population.csv rate=50 interval=00:00:01 duration=00:00:05 | countmatches fieldname=word_count pattern="\\w+" text | stats mean(word_count) stdev(word_count)
| inputlookup tweets | countmatches fieldname=word_count pattern="\\w+" text | sum total=word_counts word_count
-
- Run all examples.
- Remove old temporary branches. This includes feature branches, old release branches, and most branches that have been merged to develop.
- Ensure that all .rst files in the the docs directory include any new APIs added for this release.
- Update the version number in
-
splunklib/__init__.py
, -
README.md
, -
examples/searchcommands_app/setup.py
, and - the user agent string at the bottom of
splunklib/binding.py
.
-
- Create release branch off of develop (
release/1.6.4
)git checkout develop
git pull
git checkout -b release/1.6.4
- Make sure the version number change didn't break anything:
- Install the SDK in a clean VM and in a clean virtualenv.
- Wait for Travis CI to run tests against the
release/1.6.4
branch. - Run the SDK examples.
- Make sure the docs are up to date
- Follow steps given here: Build API docs
- Create a zip of the html folder (API docs) created in folder '/splunk-sdk-python/docs/_build'
- Make sure your zip file does not include an extra top-level directory. If you use the Mac OS Finder Compress feature, it will add one. Other file compression utilities, such as YemuZip, work.
- Make sure that your .zip file does not contain any .DS_store files. This is a hidden file that Mac OS sometimes adds when it compresses files. From the command line, navigate to the root directory, then use ls -a to list all hidden files, then delete the .DS_store file.
- Upload the html.zip created in the previous step to the release Jira
- Merge to
master
locally. Ensure the commit message is "Release 1.6.4".git checkout master
git merge --no-ff -m "Release 1.6.4" release/1.6.4
- Tag the above commit as
1.6.4
.git tag 1.6.4
- Push the
master
and the1.6.4
tag to GitHub.git push origin master
git push --tags
- Upload to PyPI:
- Create a
~/.pypirc
file containing:
[distutils] index-servers = pypi [pypi] repository: https://upload.pypi.org/legacy/ username: <user> password: <pw>
- Where
<user>
and<pw>
can be found here pip install twine
python setup.py sdist
twine upload dist/*
- Create a
- Create the new release from the new tag here: Release Tags page
- Include the changelog statements in 'Write' text field
- Delete the release branch:
git push origin :release/1.6.4
git branch -d release/1.6.4
- Sanity check that released version works:
- Run examples locally
- Create a ZIP of the SDK and send it to your Docs team:
- Download the ZIP from the GitHub releases page.
- Make sure the file reflects the current version (for example,
splunk-sdk-python-1.6.4.zip
).
- Work with Docs team to:
- Post ZIP file.
- Update Readme. For point releases, the version number needs to be updated at a minimum.
- Update Changelog, includes a list of changes for the current version.
- Push Dev Portal updates. For point releases, the "What's new" page and download links need to be updated at the very least.
- Publish updated API Reference (docs.splunk.com/Documentation/SDK).
- Create both MD5 and SHA-512 hashes from final ZIP download. Docs will contact the Web team to upload these files.
- Hand off to marketing to announce. See next section.
- Update the internal version of the SDK
Hurrah, the new release is basically done! You can now announce it on the following channels:
- Twitter (@splunkdev, maybe @splunk)
- Google Groups (splunkdev)
- Dev Portal (http://dev.splunk.com)
- Dev Blog (http://blogs.splunk.com/dev)