Skip to content

Commit fcd99b3

Browse files
committed
Merge branch 'master' into visi-aha-gather
2 parents a146c86 + 135465b commit fcd99b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2359
-464
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.193.0
2+
current_version = 2.194.0
33
commit = True
44
tag = True
55
tag_message =

.circleci/config.yml

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,10 @@ commands:
5959
command: |
6060
. venv/bin/activate
6161
mkdir test-reports
62-
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}"
63-
64-
check_runner_has_work:
65-
description: Check that this runner has work to do
66-
steps:
67-
- run:
68-
name: Check workload
69-
command: |
70-
mkdir -p ./tmp && \
71-
>./tmp/tests.txt && \
72-
circleci tests glob synapse/tests/test_*.py synapse/vendor/**/test_*.py | circleci tests run --split-by=timings --command ">./tmp/tests.txt xargs echo"
73-
[ -s tmp/tests.txt ] || circleci-agent step halt #if there are no tests, terminate execution after this step
62+
circleci tests glob synapse/tests/test_*.py synapse/vendor/**/test_*.py | \
63+
circleci tests run \
64+
--timings-type=name \
65+
--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}"
7466
7567
test_steps_doc:
7668
description: "Documentation test steps"
@@ -121,7 +113,15 @@ commands:
121113
steps:
122114
- checkout
123115

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

147-
- run:
148-
name: syntax
149-
command: |
150-
. venv/bin/activate
151-
if [ -n "${RUN_SYNTAX}" ]; then pycodestyle synapse; fi;
152-
if [ -n "${RUN_SYNTAX}" ]; then pycodestyle scripts; fi;
153-
154-
155147
- do_test_execution
148+
156149
- do_report_coverage
157150

158151
- store_test_results:
@@ -439,7 +432,7 @@ commands:
439432
jobs:
440433

441434
python311:
442-
parallelism: 8
435+
resource_class: xlarge
443436
docker:
444437
- image: cimg/python:3.11
445438
environment:
@@ -456,7 +449,7 @@ jobs:
456449
- test_steps_python
457450

458451
python311_replay:
459-
parallelism: 6
452+
resource_class: xlarge
460453
docker:
461454
- image: cimg/python:3.11
462455
environment:
@@ -473,7 +466,6 @@ jobs:
473466
- test_steps_python
474467

475468
doctests:
476-
parallelism: 1
477469
docker:
478470
- image: cimg/python:3.11
479471
environment:

CHANGELOG.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,66 @@
66
Synapse Changelog
77
*****************
88

9+
v2.194.0 - 2025-01-16
10+
=====================
11+
12+
Model Changes
13+
-------------
14+
- Added ``alts`` definitions to the following forms: ``geo:place``,
15+
``it:prod:soft``, ``it:prod:softver``, ``ou:campaign``, ``ou:conference``,
16+
``ou:goal``, ``ou:industry``, ``pol:country``, ``ps:contact``, ``ps:person``,
17+
``risk:threat``, ``risk:tool:software``, and ``risk:vuln``.
18+
(`#4064 <https://github.com/vertexproject/synapse/pull/4064>`_)
19+
- See :ref:`userguide_model_v2_194_0` for more detailed model changes.
20+
21+
Features and Enhancements
22+
-------------------------
23+
- Added syntax for conditional node property edit operators in Storm.
24+
(`#4046 <https://github.com/vertexproject/synapse/pull/4046>`_)
25+
- Updated the ``pkg.load`` Storm command to include an ``X-Synapse-Version``
26+
HTTP header in requests.
27+
(`#4074 <https://github.com/vertexproject/synapse/pull/4074>`_)
28+
29+
Bugfixes
30+
--------
31+
- Fixed an issue with the Storm loop and generator keywords, ``continue``,
32+
``break``, and ``stop``. Using these keywords outside of a loop or generator
33+
function will now raise a ``StormRuntimeError`` exception. Using these
34+
keywords to tear down the Storm runtime will now emit an ``err`` message with
35+
the type ``StormRuntimeError`` and a message indicating the invalid use of
36+
the keywords. The use of these keywords or ``$lib.exit()`` in
37+
``$lib.cache.fixed`` callbacks will now raise a ``StormRuntimeError``.
38+
(`#4025 <https://github.com/vertexproject/synapse/pull/4025>`_)
39+
(`#4073 <https://github.com/vertexproject/synapse/pull/4073>`_)
40+
- Fixed a Cortex cron scheduler loop error during a mirror promotion.
41+
(`#4058 <https://github.com/vertexproject/synapse/pull/4058>`_)
42+
- Fixed bug in password complexity rules where setting a password to (null) or
43+
None would fail.
44+
(`#4059 <https://github.com/vertexproject/synapse/pull/4059>`_)
45+
- Fixed an issue in Storm where attempting to iterate a non-iterable object
46+
would raise a Python exception rather than a ``StormRuntimeError``.
47+
(`#4066 <https://github.com/vertexproject/synapse/pull/4066>`_)
48+
- Fixed an issue in Storm functions where using the return keyword in a
49+
subquery used as a value could incorrectly change the function type.
50+
(`#4066 <https://github.com/vertexproject/synapse/pull/4066>`_)
51+
- Fixed an issue where invalid dictionary constructor values would result in
52+
unhandled Python ``AttributeError`` exceptions leaking into the Storm
53+
runtime.
54+
(`#4068 <https://github.com/vertexproject/synapse/pull/4068>`_)
55+
- Fixed an issue where the dictionary based guid constructor could raise
56+
unclear Python ``IndexError`` exceptions. It now raises ``BadTypeValu``
57+
exceptions detailing the problem.
58+
(`#4068 <https://github.com/vertexproject/synapse/pull/4068>`_)
59+
60+
Deprecations
61+
------------
62+
- The Storm function ``$lib.list()`` has been deprecated, in favor of using the
63+
``()`` or ``([])`` style syntax for directly declaring a list in Storm.
64+
(`#4071 <https://github.com/vertexproject/synapse/pull/4071>`_)
65+
- Deprecated ``$lib.text()``. Please use a list to append strings to, and then
66+
use ``$lib.str.join()`` to join them on demand.
67+
(`#4072 <https://github.com/vertexproject/synapse/pull/4072>`_)
68+
969
v2.193.0 - 2025-01-06
1070
=====================
1171

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Learn More About Synapse
99
------------------------
1010

1111
* Visit our website_ to learn more about Synapse.
12-
* Watch `Synapse 101`_!
12+
* Watch the `Synapse Guided Tour`_!
1313

1414

1515
Installation & Documentation
@@ -40,7 +40,7 @@ Connect With Us
4040

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

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

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

changes/e1b7c7693e7454c32ca657a2bed734d5.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
desc: The ``forms`` key in Storm package command definitions has been deprecated. The
3+
``cmdinputs`` key may still be used to specify node forms that commands are intended
4+
to accept as input.
5+
prs: []
6+
type: deprecation
7+
...

changes/fd2d79b0daf0705278a48e86b15524c7.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
codecov:
22
notify:
3-
after_n_builds: 8
3+
after_n_builds: 1
44

55
coverage:
66
status:
@@ -12,4 +12,4 @@ coverage:
1212
target: 96%
1313

1414
comment:
15-
after_n_builds: 8
15+
after_n_builds: 1

conftest.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import os
2+
import sys
3+
import warnings
4+
5+
import synapse.common as s_common
6+
7+
THROW = False
8+
9+
def audithook(event, args):
10+
if event == 'socket.bind':
11+
_, addr = args
12+
if isinstance(addr, tuple) and (port := addr[1]) != 0:
13+
14+
testname = os.environ.get('PYTEST_CURRENT_TEST', '<unknown>').split(' ')[0]
15+
16+
mesg = f'Synapse tests should not bind to fixed ports: {testname=} {port=}'
17+
warnings.warn(mesg)
18+
19+
if THROW:
20+
raise RuntimeError(mesg)
21+
22+
def pytest_sessionstart(session):
23+
if s_common.envbool('SYNDEV_AUDIT_PORT_BINDS'):
24+
sys.addaudithook(audithook)
25+
26+
if s_common.envbool('SYNDEV_AUDIT_PORT_BINDS_RAISE'):
27+
global THROW
28+
THROW = True

docs/docdata/foopkg/foopkg.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,5 @@ commands:
3838
help: Specify a timeout in seconds.
3939
cmdconf:
4040
srcguid: f751f9ad20e75547be230ae1a425fb9f
41-
forms:
42-
input:
43-
- inet:ipv4
44-
output:
45-
- inet:ipv4
46-
nodedata:
47-
- [ foodata, file:bytes ]
41+
cmdinputs:
42+
- form: inet:ipv4

0 commit comments

Comments
 (0)