utf-queue-client 1.20.0__tar.gz → 1.20.1b2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/.gitignore +14 -14
  2. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/.gitmodules +3 -3
  3. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/.idea/.gitignore +13 -13
  4. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/.idea/modules.xml +7 -7
  5. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/.idea/utf_queue_client_python.iml +16 -16
  6. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/.idea/vcs.xml +6 -6
  7. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/.pre-commit-config.yaml +9 -9
  8. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/Jenkinsfile +135 -135
  9. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/PKG-INFO +20 -20
  10. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/examples/example_async_consumer.py +20 -20
  11. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/pyproject.toml +72 -72
  12. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/requirements.txt +13 -13
  13. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/setup.cfg +4 -4
  14. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/sonar-project.properties +9 -9
  15. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/Dockerfile.script_test +12 -12
  16. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/conftest.py +353 -353
  17. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/pytest.ini +6 -6
  18. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/script_test.groovy +37 -37
  19. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/stopwatch.py +21 -21
  20. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_amqp_connections.py +47 -47
  21. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_async_consumer.py +14 -14
  22. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_connection_retry.py +41 -41
  23. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_data_lake_data_producer.py +58 -58
  24. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_http_producer.py +91 -91
  25. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_models.py +129 -129
  26. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_opentelemetry_data_producer.py +167 -167
  27. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_publish_test_results.py +256 -256
  28. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_rail_data_producer_tests.py +64 -64
  29. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_sqa_test_result_producer.py +54 -54
  30. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_ubai_search.py +83 -83
  31. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_ubai_update_retention.py +63 -63
  32. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_ubai_upload.py +131 -131
  33. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_utils.py +78 -78
  34. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_xray_data_producer.py +65 -65
  35. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test-requirements-pydantic-v1.txt +13 -13
  36. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test-requirements.txt +13 -13
  37. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/build_dist.bat +14 -14
  38. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/setup_venv.bat +7 -7
  39. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/silabs-net.pem +20 -20
  40. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/silabs.pem +174 -174
  41. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/update_schema.bat +2 -2
  42. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/upload_to_nexus.bat +18 -18
  43. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/upload_to_pypi.bat +14 -14
  44. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tools/upload_to_testpypi.bat +14 -14
  45. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/tox.ini +17 -17
  46. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/__init__.py +1 -1
  47. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/__init__.py +47 -47
  48. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/async_consumer.py +581 -581
  49. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/base_producer.py +163 -163
  50. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/data_lake_data_producer.py +136 -136
  51. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/http_producer.py +210 -210
  52. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/opentelemetry_data_producer.py +53 -53
  53. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/sqa_test_result_producer.py +202 -202
  54. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/test_rail_data_producer.py +97 -97
  55. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/ubai_artifact_upload_request_producer.py +126 -126
  56. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/clients/xray_data_producer.py +95 -95
  57. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/exceptions/__init__.py +20 -20
  58. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/__init__.py +1 -1
  59. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/base_model.py +57 -57
  60. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/model_factory.py +13 -13
  61. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/schemas/__init__.py +22 -22
  62. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/schemas/utf_queue_models/models/python/generated_models.py +81 -81
  63. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/schemas/utf_queue_models/models/python/generated_models_pydantic_v1.py +389 -377
  64. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/schemas/utf_queue_models/models/python/generated_models_pydantic_v2.py +400 -388
  65. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/schemas/utf_queue_models/schema/queue_message.json +980 -962
  66. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/scripts/__init__.py +88 -88
  67. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/scripts/publish_test_results_cli.py +176 -174
  68. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/scripts/ubai_search_cli.py +80 -80
  69. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/scripts/ubai_update_retention_cli.py +75 -75
  70. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/scripts/ubai_upload_cli.py +133 -133
  71. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/utils/__init__.py +94 -94
  72. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/utils/queue_metrics_exporter.py +87 -87
  73. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/utils/queue_span_exporter.py +87 -87
  74. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client.egg-info/PKG-INFO +20 -20
  75. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/README.md +0 -0
  76. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/.gitattributes +0 -0
  77. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test.hex +0 -0
  78. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_publish_release_info.py +0 -0
  79. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/test/test_ubai_copy.py +0 -0
  80. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/models/schemas/utf_queue_models/models/python/__init__.py +0 -0
  81. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/scripts/publish_release_info_cli.py +0 -0
  82. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client/scripts/ubai_copy_cli.py +0 -0
  83. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client.egg-info/SOURCES.txt +0 -0
  84. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client.egg-info/dependency_links.txt +0 -0
  85. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client.egg-info/entry_points.txt +0 -0
  86. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client.egg-info/requires.txt +0 -0
  87. {utf_queue_client-1.20.0 → utf_queue_client-1.20.1b2}/utf_queue_client.egg-info/top_level.txt +0 -0
@@ -1,14 +1,14 @@
1
- *.pyc
2
- **/venv/
3
- **/venv2/
4
- **/venv_2/
5
- build/
6
- dist/
7
- utf_queue_client.egg-info/
8
- test/vault-ca-dev.crt
9
- test/vault-ca.crt
10
- test/silabs-net.pem
11
- test/test_results/
12
- .coverage*
13
- /*idea
14
- **/*.env
1
+ *.pyc
2
+ **/venv/
3
+ **/venv2/
4
+ **/venv_2/
5
+ build/
6
+ dist/
7
+ utf_queue_client.egg-info/
8
+ test/vault-ca-dev.crt
9
+ test/vault-ca.crt
10
+ test/silabs-net.pem
11
+ test/test_results/
12
+ .coverage*
13
+ /*idea
14
+ **/*.env
@@ -1,3 +1,3 @@
1
- [submodule "models/schemas/utf_queue_models"]
2
- path = utf_queue_client/models/schemas/utf_queue_models
3
- url = ../../utf/utf_queue_models
1
+ [submodule "models/schemas/utf_queue_models"]
2
+ path = utf_queue_client/models/schemas/utf_queue_models
3
+ url = ../../utf/utf_queue_models
@@ -1,13 +1,13 @@
1
- # Default ignored files
2
- /shelf/
3
- /workspace.xml
4
- misc.xml
5
- inspectionProfiles/
6
- sonarlint/
7
- watcherTasks.xml
8
- # Datasource local storage ignored files
9
- dataSources/
10
- /dataSources.local.xml
11
- # Editor-based HTTP Client requests
12
- /httpRequests/
13
-
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ misc.xml
5
+ inspectionProfiles/
6
+ sonarlint/
7
+ watcherTasks.xml
8
+ # Datasource local storage ignored files
9
+ dataSources/
10
+ /dataSources.local.xml
11
+ # Editor-based HTTP Client requests
12
+ /httpRequests/
13
+
@@ -1,8 +1,8 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/utf_queue_client_python.iml" filepath="$PROJECT_DIR$/.idea/utf_queue_client_python.iml" />
6
- </modules>
7
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/utf_queue_client_python.iml" filepath="$PROJECT_DIR$/.idea/utf_queue_client_python.iml" />
6
+ </modules>
7
+ </component>
8
8
  </project>
@@ -1,17 +1,17 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="PYTHON_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/venv" />
6
- </content>
7
- <orderEntry type="inheritedJdk" />
8
- <orderEntry type="sourceFolder" forTests="false" />
9
- </component>
10
- <component name="PyDocumentationSettings">
11
- <option name="format" value="PLAIN" />
12
- <option name="myDocStringFormat" value="Plain" />
13
- </component>
14
- <component name="TestRunnerService">
15
- <option name="PROJECT_TEST_RUNNER" value="pytest" />
16
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="PYTHON_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/venv" />
6
+ </content>
7
+ <orderEntry type="inheritedJdk" />
8
+ <orderEntry type="sourceFolder" forTests="false" />
9
+ </component>
10
+ <component name="PyDocumentationSettings">
11
+ <option name="format" value="PLAIN" />
12
+ <option name="myDocStringFormat" value="Plain" />
13
+ </component>
14
+ <component name="TestRunnerService">
15
+ <option name="PROJECT_TEST_RUNNER" value="pytest" />
16
+ </component>
17
17
  </module>
@@ -1,7 +1,7 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- <mapping directory="$PROJECT_DIR$/utf_queue_client/models/schemas/utf_queue_models" vcs="Git" />
6
- </component>
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$/utf_queue_client/models/schemas/utf_queue_models" vcs="Git" />
6
+ </component>
7
7
  </project>
@@ -1,10 +1,10 @@
1
- repos:
2
- - repo: https://github.com/astral-sh/ruff-pre-commit
3
- # Ruff version.
4
- rev: v0.8.3
5
- hooks:
6
- # Run the linter.
7
- - id: ruff
8
- args: [ --fix ]
9
- # Run the formatter.
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ # Ruff version.
4
+ rev: v0.8.3
5
+ hooks:
6
+ # Run the linter.
7
+ - id: ruff
8
+ args: [ --fix ]
9
+ # Run the formatter.
10
10
  - id: ruff-format
@@ -1,136 +1,136 @@
1
- @Library('utf-pipeline-libraries') _
2
-
3
- def vaultSecrets = [
4
- [
5
- path: 'teams/infra-sw/app/pypi-tokens',
6
- secretValues: [
7
- [
8
- envVar: 'TWINE_PASSWORD',
9
- vaultKey: 'utf-queue-client'
10
- ]
11
- ]
12
- ]
13
- ]
14
-
15
- pipeline {
16
- agent {
17
- label "AWSLinuxWorker"
18
- }
19
- options {
20
- disableConcurrentBuilds()
21
- lock(resource: 'utf-queue-central-testing')
22
- }
23
- environment {
24
- GIT_HASH = GIT_COMMIT.take(10)
25
- TEST_RESULTS_DIR = 'test/test_results'
26
- OTEL_EXPORTER_OTLP_ENDPOINT = "https://otel-collector-http.silabs.net"
27
- OTEL_EXPORTER_OTLP_PROTOCOL = "http/protobuf"
28
- UTF_QUEUE_VIRTUAL_HOST = "testing"
29
- OTEL_SERVICE_NAME = "utf-queue-client-tests"
30
- PYENV_VERSION = "3.9"
31
- }
32
- stages {
33
- stage("environment setup") {
34
- steps {
35
- withCredentials([sshUserPrivateKey(credentialsId: '87616d18-3af5-4fa6-b20f-538f92b10079',
36
- keyFileVariable: 'JENKINS_SSH_KEY_PATH',
37
- passphraseVariable: 'PASSPHRASE_UNUSED', \
38
- usernameVariable: 'USERNAME_UNUSED')]) {
39
- sh '''
40
- export GIT_SSH_COMMAND=ssh\\ -o\\ StrictHostKeyChecking=no\\ -i\\ \\"$JENKINS_SSH_KEY_PATH\\"
41
- git fetch --no-tags --force --progress -- ssh://git@stash.silabs.com/utf/utf_queue_client_python.git +refs/heads/main:refs/remotes/origin/main
42
- '''
43
- }
44
- // set up first venv with test-requirements.txt
45
- sh '''
46
- python3 -m venv venv
47
- . venv/bin/activate
48
- uv pip install --upgrade pip wheel
49
- uv pip install -r test-requirements.txt
50
-
51
- pre-commit run --all-files
52
- '''
53
- // set up second venv with test-requirements-pydantic-v1.txt
54
- sh '''
55
- python3 -m venv venv_2
56
- . venv_2/bin/activate
57
- uv pip install --upgrade pip wheel
58
- uv pip install -r test-requirements-pydantic-v1.txt
59
- '''
60
- }
61
- }
62
- stage('Run Tests') {
63
- steps {
64
- withCredentials([usernamePassword(credentialsId: 'sqatest_readwrite', passwordVariable: 'UTF_QUEUE_PASSWORD', usernameVariable: 'UTF_QUEUE_USERNAME'),
65
- usernamePassword(credentialsId: 'mwlabuser_jenkins', passwordVariable: 'UTF_QUEUE_PASSWORD_LDAP', usernameVariable: 'UTF_QUEUE_USERNAME_LDAP')]) {
66
- catchError(buildResult: 'FAILURE', message: "[ERROR] One or more unit tests have failed", stageResult: 'FAILURE') {
67
- sh '''
68
- . venv/bin/activate
69
- rm -rf ${TEST_RESULTS_DIR}
70
- mkdir -p ${TEST_RESULTS_DIR}
71
- set +e
72
- export PYTHONPATH=$PWD
73
-
74
- # test with venv from test-requirements.txt
75
- python -m pytest test -n auto --dist loadscope --junit-prefix=test --junitxml=${TEST_RESULTS_DIR}/junit_report_unit.xml --cov-branch --cov=utf_queue_client
76
- exitcode=$?
77
-
78
- . venv_2/bin/activate
79
- # test with venv from test-requirements-pydantic-v1.txt
80
- python -m pytest test -n auto --dist loadscope --cov-append --cov-report xml:${TEST_RESULTS_DIR}/coverage.xml --cov-report html:${TEST_RESULTS_DIR}/cov_html --cov-branch --cov=utf_queue_client
81
- exitcode_2=$?
82
-
83
- if [ $exitcode -ne 0 ] || [ $exitcode_2 -ne 0 ]; then
84
- exit 1
85
- fi
86
- '''
87
- }
88
- }
89
-
90
- archiveArtifacts artifacts: "${TEST_RESULTS_DIR}/junit_report_*.xml,${TEST_RESULTS_DIR}/cov_html/*.*"
91
- junit allowEmptyResults: false, testResults: "${TEST_RESULTS_DIR}/junit_report_*.xml"
92
- cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: "${TEST_RESULTS_DIR}/coverage.xml", conditionalCoverageTargets:'70,0,0', failUnhealthy:false, failUnstable:false, lineCoverageTargets: '80,0,0', maxNumberOfBuilds:0, methodCoverageTargets: '80,0,0', onlyStable:false, sourceEncoding:'ASCII', zoomCoverageChart: false
93
-
94
- withSonarQubeEnv(installationName: 'SILABS_SONARQUBE_SERVER') {
95
- sh '''
96
- ${SONAR_SCANNER} -Dsonar.projectVersion=${GIT_HASH}
97
- '''
98
- }
99
- timeout(time: 5, unit: 'MINUTES') {
100
- waitForQualityGate abortPipeline: true
101
- }
102
- }
103
- post {
104
- failure {
105
- error 'The "Run Tests" stage has failed'
106
- }
107
- }
108
- }
109
- stage('Deploy to pypi') {
110
- when {
111
- branch 'main'
112
- }
113
- environment {
114
- TWINE_REPOSITORY_URL = "https://upload.pypi.org/legacy/"
115
- TWINE_USERNAME = "__token__"
116
- }
117
- steps {
118
- withVaultOnAgent(vaultSecrets: vaultSecrets) {
119
- sh '''
120
- if [ ! -f venv/bin/activate ]; then
121
- python3 -m venv venv
122
- fi
123
- . venv/bin/activate
124
- pip3 install wheel && pip3 install -r test-requirements.txt build
125
- rm -rf build
126
- rm -rf dist
127
- rm -rf utf_queue_client.egg-info
128
- python3 -m build
129
-
130
- twine upload dist/*
131
- '''
132
- }
133
- }
134
- }
135
- }
1
+ @Library('utf-pipeline-libraries') _
2
+
3
+ def vaultSecrets = [
4
+ [
5
+ path: 'teams/infra-sw/app/pypi-tokens',
6
+ secretValues: [
7
+ [
8
+ envVar: 'TWINE_PASSWORD',
9
+ vaultKey: 'utf-queue-client'
10
+ ]
11
+ ]
12
+ ]
13
+ ]
14
+
15
+ pipeline {
16
+ agent {
17
+ label "AWSLinuxWorker"
18
+ }
19
+ options {
20
+ disableConcurrentBuilds()
21
+ lock(resource: 'utf-queue-central-testing')
22
+ }
23
+ environment {
24
+ GIT_HASH = GIT_COMMIT.take(10)
25
+ TEST_RESULTS_DIR = 'test/test_results'
26
+ OTEL_EXPORTER_OTLP_ENDPOINT = "https://otel-collector-http.silabs.net"
27
+ OTEL_EXPORTER_OTLP_PROTOCOL = "http/protobuf"
28
+ UTF_QUEUE_VIRTUAL_HOST = "testing"
29
+ OTEL_SERVICE_NAME = "utf-queue-client-tests"
30
+ PYENV_VERSION = "3.9"
31
+ }
32
+ stages {
33
+ stage("environment setup") {
34
+ steps {
35
+ withCredentials([sshUserPrivateKey(credentialsId: '87616d18-3af5-4fa6-b20f-538f92b10079',
36
+ keyFileVariable: 'JENKINS_SSH_KEY_PATH',
37
+ passphraseVariable: 'PASSPHRASE_UNUSED', \
38
+ usernameVariable: 'USERNAME_UNUSED')]) {
39
+ sh '''
40
+ export GIT_SSH_COMMAND=ssh\\ -o\\ StrictHostKeyChecking=no\\ -i\\ \\"$JENKINS_SSH_KEY_PATH\\"
41
+ git fetch --no-tags --force --progress -- ssh://git@stash.silabs.com/utf/utf_queue_client_python.git +refs/heads/main:refs/remotes/origin/main
42
+ '''
43
+ }
44
+ // set up first venv with test-requirements.txt
45
+ sh '''
46
+ python3 -m venv venv
47
+ . venv/bin/activate
48
+ uv pip install --upgrade pip wheel
49
+ uv pip install -r test-requirements.txt
50
+
51
+ pre-commit run --all-files
52
+ '''
53
+ // set up second venv with test-requirements-pydantic-v1.txt
54
+ sh '''
55
+ python3 -m venv venv_2
56
+ . venv_2/bin/activate
57
+ uv pip install --upgrade pip wheel
58
+ uv pip install -r test-requirements-pydantic-v1.txt
59
+ '''
60
+ }
61
+ }
62
+ stage('Run Tests') {
63
+ steps {
64
+ withCredentials([usernamePassword(credentialsId: 'sqatest_readwrite', passwordVariable: 'UTF_QUEUE_PASSWORD', usernameVariable: 'UTF_QUEUE_USERNAME'),
65
+ usernamePassword(credentialsId: 'mwlabuser_jenkins', passwordVariable: 'UTF_QUEUE_PASSWORD_LDAP', usernameVariable: 'UTF_QUEUE_USERNAME_LDAP')]) {
66
+ catchError(buildResult: 'FAILURE', message: "[ERROR] One or more unit tests have failed", stageResult: 'FAILURE') {
67
+ sh '''
68
+ . venv/bin/activate
69
+ rm -rf ${TEST_RESULTS_DIR}
70
+ mkdir -p ${TEST_RESULTS_DIR}
71
+ set +e
72
+ export PYTHONPATH=$PWD
73
+
74
+ # test with venv from test-requirements.txt
75
+ python -m pytest test -n auto --dist loadscope --junit-prefix=test --junitxml=${TEST_RESULTS_DIR}/junit_report_unit.xml --cov-branch --cov=utf_queue_client
76
+ exitcode=$?
77
+
78
+ . venv_2/bin/activate
79
+ # test with venv from test-requirements-pydantic-v1.txt
80
+ python -m pytest test -n auto --dist loadscope --cov-append --cov-report xml:${TEST_RESULTS_DIR}/coverage.xml --cov-report html:${TEST_RESULTS_DIR}/cov_html --cov-branch --cov=utf_queue_client
81
+ exitcode_2=$?
82
+
83
+ if [ $exitcode -ne 0 ] || [ $exitcode_2 -ne 0 ]; then
84
+ exit 1
85
+ fi
86
+ '''
87
+ }
88
+ }
89
+
90
+ archiveArtifacts artifacts: "${TEST_RESULTS_DIR}/junit_report_*.xml,${TEST_RESULTS_DIR}/cov_html/*.*"
91
+ junit allowEmptyResults: false, testResults: "${TEST_RESULTS_DIR}/junit_report_*.xml"
92
+ cobertura autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: "${TEST_RESULTS_DIR}/coverage.xml", conditionalCoverageTargets:'70,0,0', failUnhealthy:false, failUnstable:false, lineCoverageTargets: '80,0,0', maxNumberOfBuilds:0, methodCoverageTargets: '80,0,0', onlyStable:false, sourceEncoding:'ASCII', zoomCoverageChart: false
93
+
94
+ withSonarQubeEnv(installationName: 'SILABS_SONARQUBE_SERVER') {
95
+ sh '''
96
+ ${SONAR_SCANNER} -Dsonar.projectVersion=${GIT_HASH}
97
+ '''
98
+ }
99
+ timeout(time: 5, unit: 'MINUTES') {
100
+ waitForQualityGate abortPipeline: true
101
+ }
102
+ }
103
+ post {
104
+ failure {
105
+ error 'The "Run Tests" stage has failed'
106
+ }
107
+ }
108
+ }
109
+ stage('Deploy to pypi') {
110
+ when {
111
+ branch 'main'
112
+ }
113
+ environment {
114
+ TWINE_REPOSITORY_URL = "https://upload.pypi.org/legacy/"
115
+ TWINE_USERNAME = "__token__"
116
+ }
117
+ steps {
118
+ withVaultOnAgent(vaultSecrets: vaultSecrets) {
119
+ sh '''
120
+ if [ ! -f venv/bin/activate ]; then
121
+ python3 -m venv venv
122
+ fi
123
+ . venv/bin/activate
124
+ pip3 install wheel && pip3 install -r test-requirements.txt build
125
+ rm -rf build
126
+ rm -rf dist
127
+ rm -rf utf_queue_client.egg-info
128
+ python3 -m build
129
+
130
+ twine upload dist/*
131
+ '''
132
+ }
133
+ }
134
+ }
135
+ }
136
136
  }
@@ -1,20 +1,20 @@
1
- Metadata-Version: 2.4
2
- Name: utf-queue-client
3
- Version: 1.20.0
4
- Summary: No description provided
5
- Author-email: Joe Savage <joe.savage@silabs.com>
6
- Keywords: UTF
7
- Requires-Python: >=3.8
8
- Requires-Dist: pika>=1.2.0
9
- Requires-Dist: jsonschema>=3.2.0
10
- Requires-Dist: msgpack>=1.0.2
11
- Requires-Dist: pydantic
12
- Requires-Dist: regex
13
- Requires-Dist: typing_extensions; python_version < "3.8"
14
- Requires-Dist: click
15
- Requires-Dist: ubai-client>=1.2.0
16
- Requires-Dist: opentelemetry-distro[otlp]
17
- Requires-Dist: otel-extensions>=0.1.2
18
- Requires-Dist: retry>=0.9.2
19
- Requires-Dist: requests
20
- Requires-Dist: ndjson~=0.3
1
+ Metadata-Version: 2.4
2
+ Name: utf-queue-client
3
+ Version: 1.20.1b2
4
+ Summary: No description provided
5
+ Author-email: Joe Savage <joe.savage@silabs.com>
6
+ Keywords: UTF
7
+ Requires-Python: >=3.8
8
+ Requires-Dist: pika>=1.2.0
9
+ Requires-Dist: jsonschema>=3.2.0
10
+ Requires-Dist: msgpack>=1.0.2
11
+ Requires-Dist: pydantic
12
+ Requires-Dist: regex
13
+ Requires-Dist: typing_extensions; python_version < "3.8"
14
+ Requires-Dist: click
15
+ Requires-Dist: ubai-client>=1.2.0
16
+ Requires-Dist: opentelemetry-distro[otlp]
17
+ Requires-Dist: otel-extensions>=0.1.2
18
+ Requires-Dist: retry>=0.9.2
19
+ Requires-Dist: requests
20
+ Requires-Dist: ndjson~=0.3
@@ -1,20 +1,20 @@
1
- import logging
2
-
3
- import msgpack
4
-
5
- from utf_queue_client.clients.async_consumer import LocalRaspiSqaTestResultConsumer
6
-
7
-
8
- def message_handler(body: bytes):
9
- logger = logging.getLogger("main")
10
- data = msgpack.loads(body)
11
- logger.info(f"message received: {data}")
12
-
13
-
14
- def main():
15
- consumer = LocalRaspiSqaTestResultConsumer("10.4.1.107", message_handler)
16
- consumer.run()
17
-
18
-
19
- if __name__ == "__main__":
20
- main()
1
+ import logging
2
+
3
+ import msgpack
4
+
5
+ from utf_queue_client.clients.async_consumer import LocalRaspiSqaTestResultConsumer
6
+
7
+
8
+ def message_handler(body: bytes):
9
+ logger = logging.getLogger("main")
10
+ data = msgpack.loads(body)
11
+ logger.info(f"message received: {data}")
12
+
13
+
14
+ def main():
15
+ consumer = LocalRaspiSqaTestResultConsumer("10.4.1.107", message_handler)
16
+ consumer.run()
17
+
18
+
19
+ if __name__ == "__main__":
20
+ main()
@@ -1,72 +1,72 @@
1
- [build-system]
2
- requires = ["setuptools", "setuptools-scm"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "utf-queue-client"
7
- version = "1.20.0"
8
- description = "No description provided"
9
- authors = [
10
- { name = "Joe Savage", email = "joe.savage@silabs.com" }
11
- ]
12
- requires-python = ">=3.8"
13
- dependencies = [
14
- "pika >= 1.2.0",
15
- "jsonschema >= 3.2.0",
16
- "msgpack >= 1.0.2",
17
- "pydantic",
18
- "regex",
19
- "typing_extensions; python_version < '3.8'",
20
- "click",
21
- "ubai-client >= 1.2.0",
22
- "opentelemetry-distro[otlp]",
23
- "otel-extensions >= 0.1.2",
24
- "retry>=0.9.2",
25
- "requests",
26
- "ndjson~=0.3",
27
- ]
28
- keywords = ["UTF"]
29
-
30
- [project.scripts]
31
- ubai_upload_cli = "utf_queue_client.scripts.ubai_upload_cli:cli_entrypoint"
32
- ubai_search_cli = "utf_queue_client.scripts.ubai_search_cli:cli_entrypoint"
33
- publish_test_results_cli = "utf_queue_client.scripts.publish_test_results_cli:cli_entrypoint"
34
- ubai_update_retention_cli = "utf_queue_client.scripts.ubai_update_retention_cli:cli_entrypoint"
35
- publish_release_info_cli = "utf_queue_client.scripts.publish_release_info_cli:cli_entrypoint"
36
- ubai_copy_cli = "utf_queue_client.scripts.ubai_copy_cli:cli_entrypoint"
37
-
38
- [tool.setuptools.packages.find]
39
- include = ["utf_queue_client"]
40
- exclude = ["tests", "test"]
41
-
42
- [tool.setuptools.package-data]
43
- utf_queue_client = [
44
- "models/schemas/utf_queue_models/models/python/*.py",
45
- "models/schemas/utf_queue_models/schema/*.json",
46
- ]
47
-
48
- [tool.ruff]
49
- fix = true
50
- line-length = 88
51
- target-version = "py38"
52
- exclude = ["archive"]
53
-
54
- [tool.ruff.lint]
55
- select = [
56
- "E", # pycodestyle errors
57
- "W", # pycodestyle warnings
58
- "F", # pyflakes
59
- "I", # isort
60
- "C", # flake8-comprehensions
61
- "B", # flake8-bugbear
62
- "Q", # flake8-quotes
63
- "UP",# pyupgrade
64
- ]
65
- ignore = [
66
- "E501", # line too long, handled by black
67
- "C901", # too complex
68
- "C408", # Unnecessary 'dict()' call
69
- ]
70
-
71
- [tool.ruff.lint.pydocstyle]
72
- convention = "google"
1
+ [build-system]
2
+ requires = ["setuptools", "setuptools-scm"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "utf-queue-client"
7
+ version = "1.20.1b2"
8
+ description = "No description provided"
9
+ authors = [
10
+ { name = "Joe Savage", email = "joe.savage@silabs.com" }
11
+ ]
12
+ requires-python = ">=3.8"
13
+ dependencies = [
14
+ "pika >= 1.2.0",
15
+ "jsonschema >= 3.2.0",
16
+ "msgpack >= 1.0.2",
17
+ "pydantic",
18
+ "regex",
19
+ "typing_extensions; python_version < '3.8'",
20
+ "click",
21
+ "ubai-client >= 1.2.0",
22
+ "opentelemetry-distro[otlp]",
23
+ "otel-extensions >= 0.1.2",
24
+ "retry>=0.9.2",
25
+ "requests",
26
+ "ndjson~=0.3",
27
+ ]
28
+ keywords = ["UTF"]
29
+
30
+ [project.scripts]
31
+ ubai_upload_cli = "utf_queue_client.scripts.ubai_upload_cli:cli_entrypoint"
32
+ ubai_search_cli = "utf_queue_client.scripts.ubai_search_cli:cli_entrypoint"
33
+ publish_test_results_cli = "utf_queue_client.scripts.publish_test_results_cli:cli_entrypoint"
34
+ ubai_update_retention_cli = "utf_queue_client.scripts.ubai_update_retention_cli:cli_entrypoint"
35
+ publish_release_info_cli = "utf_queue_client.scripts.publish_release_info_cli:cli_entrypoint"
36
+ ubai_copy_cli = "utf_queue_client.scripts.ubai_copy_cli:cli_entrypoint"
37
+
38
+ [tool.setuptools.packages.find]
39
+ include = ["utf_queue_client"]
40
+ exclude = ["tests", "test"]
41
+
42
+ [tool.setuptools.package-data]
43
+ utf_queue_client = [
44
+ "models/schemas/utf_queue_models/models/python/*.py",
45
+ "models/schemas/utf_queue_models/schema/*.json",
46
+ ]
47
+
48
+ [tool.ruff]
49
+ fix = true
50
+ line-length = 88
51
+ target-version = "py38"
52
+ exclude = ["archive"]
53
+
54
+ [tool.ruff.lint]
55
+ select = [
56
+ "E", # pycodestyle errors
57
+ "W", # pycodestyle warnings
58
+ "F", # pyflakes
59
+ "I", # isort
60
+ "C", # flake8-comprehensions
61
+ "B", # flake8-bugbear
62
+ "Q", # flake8-quotes
63
+ "UP",# pyupgrade
64
+ ]
65
+ ignore = [
66
+ "E501", # line too long, handled by black
67
+ "C901", # too complex
68
+ "C408", # Unnecessary 'dict()' call
69
+ ]
70
+
71
+ [tool.ruff.lint.pydocstyle]
72
+ convention = "google"