Skip to content

Commit

Permalink
Merge branch 'master' into visi-model-rail
Browse files Browse the repository at this point in the history
  • Loading branch information
invisig0th committed Jan 17, 2025
2 parents d432412 + ace3727 commit c72dfe1
Show file tree
Hide file tree
Showing 62 changed files with 1,567 additions and 362 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 2.193.0
current_version = 2.194.0
commit = True
tag = True
tag_message =
Expand Down
40 changes: 16 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,10 @@ commands:
command: |
. venv/bin/activate
mkdir test-reports
circleci tests glob synapse/tests/test_*.py synapse/vendor/**/test_*.py | circleci tests run --split-by=timings --command "xargs python3 -m pytest -v -s -rs --durations 6 --maxfail 6 -p no:logging --junitxml=test-reports/junit.xml -o junit_family=xunit1 ${COVERAGE_ARGS}"
check_runner_has_work:
description: Check that this runner has work to do
steps:
- run:
name: Check workload
command: |
mkdir -p ./tmp && \
>./tmp/tests.txt && \
circleci tests glob synapse/tests/test_*.py synapse/vendor/**/test_*.py | circleci tests run --split-by=timings --command ">./tmp/tests.txt xargs echo"
[ -s tmp/tests.txt ] || circleci-agent step halt #if there are no tests, terminate execution after this step
circleci tests glob synapse/tests/test_*.py synapse/vendor/**/test_*.py | \
circleci tests run \
--timings-type=name \
--command="xargs python3 -m pytest -n 8 --dist worksteal -v -rs --durations 6 -p no:logging --junitxml=test-reports/junit.xml -o junit_family=xunit1 ${COVERAGE_ARGS}"
test_steps_doc:
description: "Documentation test steps"
Expand Down Expand Up @@ -121,7 +113,15 @@ commands:
steps:
- checkout

- check_runner_has_work
- run:
# Run this first so we fail on syntax errors before installing a bunch
# of stuff and doing a bunch of work. It's easier now that we're only
# a single runner using xdist.
name: syntax
command: |
pip install "pycodestyle>=2.10.0,<3.0.0"
if [ -n "${RUN_SYNTAX}" ]; then pycodestyle synapse; fi;
if [ -n "${RUN_SYNTAX}" ]; then pycodestyle scripts; fi;
- run:
name: checkout regression repo
Expand All @@ -144,15 +144,8 @@ commands:
- ./venv
key: v5-venv-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum "pyproject.toml" }}-{{ checksum "/tmp/python.version" }}

- run:
name: syntax
command: |
. venv/bin/activate
if [ -n "${RUN_SYNTAX}" ]; then pycodestyle synapse; fi;
if [ -n "${RUN_SYNTAX}" ]; then pycodestyle scripts; fi;
- do_test_execution

- do_report_coverage

- store_test_results:
Expand Down Expand Up @@ -439,7 +432,7 @@ commands:
jobs:

python311:
parallelism: 8
resource_class: xlarge
docker:
- image: cimg/python:3.11
environment:
Expand All @@ -456,7 +449,7 @@ jobs:
- test_steps_python

python311_replay:
parallelism: 6
resource_class: xlarge
docker:
- image: cimg/python:3.11
environment:
Expand All @@ -473,7 +466,6 @@ jobs:
- test_steps_python

doctests:
parallelism: 1
docker:
- image: cimg/python:3.11
environment:
Expand Down
60 changes: 60 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,66 @@
Synapse Changelog
*****************

v2.194.0 - 2025-01-16
=====================

Model Changes
-------------
- Added ``alts`` definitions to the following forms: ``geo:place``,
``it:prod:soft``, ``it:prod:softver``, ``ou:campaign``, ``ou:conference``,
``ou:goal``, ``ou:industry``, ``pol:country``, ``ps:contact``, ``ps:person``,
``risk:threat``, ``risk:tool:software``, and ``risk:vuln``.
(`#4064 <https://github.com/vertexproject/synapse/pull/4064>`_)
- See :ref:`userguide_model_v2_194_0` for more detailed model changes.

Features and Enhancements
-------------------------
- Added syntax for conditional node property edit operators in Storm.
(`#4046 <https://github.com/vertexproject/synapse/pull/4046>`_)
- Updated the ``pkg.load`` Storm command to include an ``X-Synapse-Version``
HTTP header in requests.
(`#4074 <https://github.com/vertexproject/synapse/pull/4074>`_)

Bugfixes
--------
- Fixed an issue with the Storm loop and generator keywords, ``continue``,
``break``, and ``stop``. Using these keywords outside of a loop or generator
function will now raise a ``StormRuntimeError`` exception. Using these
keywords to tear down the Storm runtime will now emit an ``err`` message with
the type ``StormRuntimeError`` and a message indicating the invalid use of
the keywords. The use of these keywords or ``$lib.exit()`` in
``$lib.cache.fixed`` callbacks will now raise a ``StormRuntimeError``.
(`#4025 <https://github.com/vertexproject/synapse/pull/4025>`_)
(`#4073 <https://github.com/vertexproject/synapse/pull/4073>`_)
- Fixed a Cortex cron scheduler loop error during a mirror promotion.
(`#4058 <https://github.com/vertexproject/synapse/pull/4058>`_)
- Fixed bug in password complexity rules where setting a password to (null) or
None would fail.
(`#4059 <https://github.com/vertexproject/synapse/pull/4059>`_)
- Fixed an issue in Storm where attempting to iterate a non-iterable object
would raise a Python exception rather than a ``StormRuntimeError``.
(`#4066 <https://github.com/vertexproject/synapse/pull/4066>`_)
- Fixed an issue in Storm functions where using the return keyword in a
subquery used as a value could incorrectly change the function type.
(`#4066 <https://github.com/vertexproject/synapse/pull/4066>`_)
- Fixed an issue where invalid dictionary constructor values would result in
unhandled Python ``AttributeError`` exceptions leaking into the Storm
runtime.
(`#4068 <https://github.com/vertexproject/synapse/pull/4068>`_)
- Fixed an issue where the dictionary based guid constructor could raise
unclear Python ``IndexError`` exceptions. It now raises ``BadTypeValu``
exceptions detailing the problem.
(`#4068 <https://github.com/vertexproject/synapse/pull/4068>`_)

Deprecations
------------
- The Storm function ``$lib.list()`` has been deprecated, in favor of using the
``()`` or ``([])`` style syntax for directly declaring a list in Storm.
(`#4071 <https://github.com/vertexproject/synapse/pull/4071>`_)
- Deprecated ``$lib.text()``. Please use a list to append strings to, and then
use ``$lib.str.join()`` to join them on demand.
(`#4072 <https://github.com/vertexproject/synapse/pull/4072>`_)

v2.193.0 - 2025-01-06
=====================

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Learn More About Synapse
------------------------

* Visit our website_ to learn more about Synapse.
* Watch `Synapse 101`_!
* Watch the `Synapse Guided Tour`_!


Installation & Documentation
Expand Down Expand Up @@ -40,7 +40,7 @@ Connect With Us

.. _website: https://v.vtx.lk/vertex

.. _Synapse 101: https://v.vtx.lk/new-syn101
.. _Synapse Guided Tour: https://v.vtx.lk/synapse-tour

.. _pypi: https://v.vtx.lk/synapse-pypi

Expand Down
5 changes: 0 additions & 5 deletions changes/e1b7c7693e7454c32ca657a2bed734d5.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions changes/fd2d79b0daf0705278a48e86b15524c7.yaml

This file was deleted.

Binary file not shown.
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
codecov:
notify:
after_n_builds: 8
after_n_builds: 1

coverage:
status:
Expand All @@ -12,4 +12,4 @@ coverage:
target: 96%

comment:
after_n_builds: 8
after_n_builds: 1
28 changes: 28 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import os
import sys
import warnings

import synapse.common as s_common

THROW = False

def audithook(event, args):
if event == 'socket.bind':
_, addr = args
if isinstance(addr, tuple) and (port := addr[1]) != 0:

testname = os.environ.get('PYTEST_CURRENT_TEST', '<unknown>').split(' ')[0]

mesg = f'Synapse tests should not bind to fixed ports: {testname=} {port=}'
warnings.warn(mesg)

if THROW:
raise RuntimeError(mesg)

def pytest_sessionstart(session):
if s_common.envbool('SYNDEV_AUDIT_PORT_BINDS'):
sys.addaudithook(audithook)

if s_common.envbool('SYNDEV_AUDIT_PORT_BINDS_RAISE'):
global THROW
THROW = True
Loading

0 comments on commit c72dfe1

Please sign in to comment.