Skip to content

Commit cd8575e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 11190_spgw_ue_context_ht
Signed-off-by: Rashmi <[email protected]>
2 parents a35732f + 5a72ab8 commit cd8575e

File tree

127 files changed

+761
-474
lines changed

Some content is hidden

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

127 files changed

+761
-474
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ build --test_env=MAGMA_ROOT
6565
build --test_env=S1AP_TESTER_ROOT
6666

6767
# Needed for go tests to generate the test result XML in the correct format
68-
test --test_env=GO_TEST_WRAP_TESTV=1
68+
build --test_env=GO_TEST_WRAP_TESTV=1
6969

7070
# MME specific compile time defines
7171
# Compile mme libraries with unit test flag

.devcontainer/Dockerfile

Lines changed: 1 addition & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ RUN echo "Install general purpose packages" && \
6060
perl \
6161
pkg-config \
6262
python3-pip \
63+
python3-venv \
6364
redis-server \
6465
ruby \
6566
rubygems \
@@ -207,74 +208,4 @@ RUN GOBIN="/usr/bin/" go install -v golang.org/x/tools/[email protected] && \
207208
#### Update shared library configuration
208209
RUN ldconfig -v
209210

210-
211-
##### Install Python requirements
212-
213-
### create virtualenv
214-
ARG PYTHON_VENV=/home/vscode/build/python
215-
ENV PYTHON_VENV_EXECUTABLE=${PYTHON_VENV}/bin/python${PYTHON_VERSION}
216-
# PYTHON_VENV must by in sync with "python.defaultInterpreterPath", "python.analysis.extraPaths" and magtivate path in "postCreateCommand" in .devcontainer/devcontainer.json
217-
218-
RUN virtualenv --system-site-packages --python=/usr/bin/python${PYTHON_VERSION} ${PYTHON_VENV}
219-
RUN ${PYTHON_VENV_EXECUTABLE} -m pip install --quiet --upgrade --no-cache-dir "setuptools==49.6.0"
220-
221-
### install eggs (lte, orc8r)
222-
COPY /lte/gateway/python/ ${MAGMA_ROOT}/lte/gateway/python/
223-
WORKDIR ${MAGMA_ROOT}/lte/gateway/python/
224-
RUN ${PYTHON_VENV_EXECUTABLE} -m pip install --quiet --upgrade --no-build-isolation --no-cache-dir --verbose --editable .[dev] && \
225-
rm -rf lte.egg-info
226-
227-
COPY /orc8r/gateway/python/ ${MAGMA_ROOT}/orc8r/gateway/python/
228-
WORKDIR ${MAGMA_ROOT}/orc8r/gateway/python/
229-
RUN ${PYTHON_VENV_EXECUTABLE} -m pip install --quiet --upgrade --no-build-isolation --no-cache-dir --verbose --editable .[dev] && \
230-
rm -rf orc8r.egg-info
231-
232-
### install formatter autopep8
233-
RUN ${PYTHON_VENV_EXECUTABLE} -m pip install --no-cache-dir autopep8
234-
235-
#### protos
236-
ARG GEN_DIR=lib/python${PYTHON_VERSION}/gen
237-
238-
COPY /protos/ ${MAGMA_ROOT}/protos/
239-
COPY /lte/protos/ ${MAGMA_ROOT}/lte/protos/
240-
COPY /orc8r/protos/ ${MAGMA_ROOT}/orc8r/protos/
241-
COPY /feg/protos/ ${MAGMA_ROOT}/feg/protos/
242-
COPY /dp/protos/ ${MAGMA_ROOT}/dp/protos/
243-
WORKDIR ${MAGMA_ROOT}
244-
RUN ${PYTHON_VENV_EXECUTABLE} -m pip install --no-cache-dir "mypy-protobuf==2.4" && \
245-
mkdir ${PYTHON_VENV}/${GEN_DIR} && \
246-
for PROTO_SRC in orc8r lte feg dp; \
247-
do \
248-
${PYTHON_VENV_EXECUTABLE} protos/gen_protos.py ${PROTO_SRC}/protos ${MAGMA_ROOT},orc8r/protos/prometheus ${MAGMA_ROOT} ${PYTHON_VENV}/${GEN_DIR} && \
249-
${PYTHON_VENV_EXECUTABLE} protos/gen_prometheus_proto.py ${MAGMA_ROOT} ${PYTHON_VENV}/${GEN_DIR}; \
250-
done && \
251-
echo "${PYTHON_VENV}/${GEN_DIR}" > ${PYTHON_VENV}/lib/python${PYTHON_VERSION}/site-packages/magma_gen.pth
252-
253-
### swagger
254-
ENV SWAGGER_CODEGEN_DIR=/var/tmp/codegen
255-
ENV SWAGGER_CODEGEN_JAR=${SWAGGER_CODEGEN_DIR}/swagger-codegen-cli.jar
256-
ARG CODEGEN_VERSION=2.2.3
257-
258-
RUN mkdir -p ${SWAGGER_CODEGEN_DIR}; \
259-
wget --no-verbose https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/${CODEGEN_VERSION}/swagger-codegen-cli-${CODEGEN_VERSION}.jar -O ${SWAGGER_CODEGEN_JAR}
260-
261-
# Copy swagger specs over to the build directory,
262-
# so that eventd can access them at runtime
263-
COPY lte/swagger/*.yml ${PYTHON_VENV}/${GEN_DIR}/lte/swagger/specs/
264-
COPY orc8r/swagger/*.yml ${PYTHON_VENV}/${GEN_DIR}/orc8r/swagger/specs/
265-
RUN for SWAGGER_SRC in lte orc8r; \
266-
do \
267-
# Generate the files
268-
ls ${PYTHON_VENV}/${GEN_DIR}/${SWAGGER_SRC}/swagger/specs/*.yml \
269-
| xargs -t -I% /usr/bin/java -jar ${SWAGGER_CODEGEN_JAR} generate \
270-
-i % \
271-
-o ${PYTHON_VENV}/${GEN_DIR}/${SWAGGER_SRC}/swagger \
272-
-l python \
273-
-D models && \
274-
# Flatten and clean up directory
275-
mv ${PYTHON_VENV}/${GEN_DIR}/${SWAGGER_SRC}/swagger/swagger_client/* ${PYTHON_VENV}/${GEN_DIR}/${SWAGGER_SRC}/swagger/ && \
276-
rmdir ${PYTHON_VENV}/${GEN_DIR}/${SWAGGER_SRC}/swagger/swagger_client && \
277-
rm -r ${PYTHON_VENV}/${GEN_DIR}/${SWAGGER_SRC}/swagger/test; \
278-
done
279-
280211
WORKDIR $MAGMA_ROOT

.devcontainer/devcontainer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,9 @@
8282
"python.terminal.activateEnvironment": true,
8383
"python.analysis.extraPaths": [
8484
"${containerWorkspaceFolder}/orc8r/gateway/python/",
85-
"${containerWorkspaceFolder}/lte/gateway/python/",
86-
"/home/vscode/build/python/lib/python3.8/site-packages" // has to be in sync with $PYTHON_VENV and $PYTHON_VERSION from .devcontainer/Dockerfile
85+
"${containerWorkspaceFolder}/lte/gateway/python/"
8786
],
88-
"python.defaultInterpreterPath": "/home/vscode/build/python/bin/python3.8", // has to be in sync with $PYTHON_VENV and $PYTHON_VERSION from .devcontainer/Dockerfile
87+
"python.defaultInterpreterPath": "/home/vscode/python_ide_env/bin/python3",
8988
"python.formatting.provider": "autopep8",
9089
"python.formatting.autopep8Args": [
9190
// This should be the same set of flags as ones specified in `lte/gateway/precommit.py`

.github/workflows/agw-coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
github.repository_owner == 'magma' &&
104104
github.ref_name == 'master'
105105
with:
106-
name: Bazel test C/C++ coverage profile
106+
name: Bazel test C and C++ coverage profile
107107
path: Bazel_test_cc_coverage_profile
108108
- name: Build space left after run
109109
shell: bash
@@ -118,7 +118,7 @@ jobs:
118118
github.event_name == 'push'
119119
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # [email protected]
120120
env:
121-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_BAZEL_CI }}
121+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
122122
SLACK_TITLE: "C / C++ code coverage with Bazel"
123123
SLACK_USERNAME: "${{ github.workflow }}"
124124
SLACK_ICON_EMOJI: ":boom:"
@@ -189,7 +189,7 @@ jobs:
189189
github.event_name == 'push'
190190
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # [email protected]
191191
env:
192-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_BAZEL_CI }}
192+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
193193
SLACK_TITLE: "Python code coverage with Bazel"
194194
SLACK_USERNAME: "${{ github.workflow }}"
195195
SLACK_ICON_EMOJI: ":boom:"

.github/workflows/agw-docker-load-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
name: AGW docker load test
12+
name: AGW Test Load Docker AMI
1313

1414
on:
1515
workflow_run:

.github/workflows/agw-workflow.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
name: agw-workflow
12+
name: AGW Lint & Test
1313

1414
on:
1515
push:
@@ -28,10 +28,6 @@ concurrency:
2828

2929
env:
3030
DEVCONTAINER_IMAGE: "ghcr.io/magma/magma/devcontainer:latest"
31-
BAZEL_BASE_IMAGE: "ghcr.io/magma/magma/bazel-base:latest"
32-
# see GH14041
33-
CACHE_KEY: bazel-base-image-sha-c4de1e5
34-
REMOTE_DOWNLOAD_OPTIMIZATION: true
3531

3632
jobs:
3733
path_filter:

.github/workflows/autolabel-pullrequests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
name: AutoLabel PR
12+
name: PR Generate Labels
1313
on:
1414
# Use pull_request_target to gain write permissions.
1515
# Ref: https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/

.github/workflows/backport-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# Based on https://github.com/sqren/backport-github-action/blob/main/README.md under MIT license.
1313

14-
name: backport-pull-request
14+
name: PR Backport
1515
on:
1616
pull_request_target:
1717
types:

.github/workflows/bazel.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
name: "Bazel Build & Test"
12+
name: AGW Build, Format & Test Bazel
1313
on:
1414
# yamllint disable-line rule:truthy
1515
workflow_dispatch:
@@ -123,8 +123,8 @@ jobs:
123123
printf '\r%s\r' '###############################' 1>&2
124124
bazel build \
125125
${{ matrix.bazel-target }} \
126-
${{ matrix.bazel-config }} \
127126
--config=mme_unit_test \
127+
${{ matrix.bazel-config }} \
128128
--profile=Bazel_build_all_profile
129129
130130
printf '\r%s\r' '###############################' 1>&2
@@ -207,7 +207,7 @@ jobs:
207207
if: failure() && github.event_name == 'push' && github.repository_owner == 'magma'
208208
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # [email protected]
209209
env:
210-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_BAZEL_CI }}
210+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
211211
SLACK_TITLE: "Bazel Build & Test Job `bazel build //...; bazel test //...` ${{ matrix.bazel-config }}"
212212
SLACK_USERNAME: "Bazel Build & Test"
213213
SLACK_ICON_EMOJI: ":boom:"
@@ -227,7 +227,7 @@ jobs:
227227
success: ${{ steps.setoutput.outputs.success }}
228228
steps:
229229
- id: setoutput
230-
run: echo "::set-output name=success::true"
230+
run: echo "success=true" >> $GITHUB_OUTPUT
231231

232232
report_result_bazel_build_and_test:
233233
name: Bazel build and test status
@@ -309,7 +309,7 @@ jobs:
309309
if: failure() && github.event_name == 'push' && github.repository_owner == 'magma'
310310
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # [email protected]
311311
env:
312-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_BAZEL_CI }}
312+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
313313
SLACK_TITLE: "Bazel Package Job"
314314
SLACK_USERNAME: "Bazel Build & Test"
315315
SLACK_ICON_EMOJI: ":boom:"
@@ -331,7 +331,7 @@ jobs:
331331
if: failure() && github.event_name == 'push' && github.repository_owner == 'magma'
332332
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # [email protected]
333333
env:
334-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_BAZEL_CI }}
334+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
335335
SLACK_TITLE: "Bazel Python Check Job `./bazel/scripts/check_py_bazel.sh`"
336336
SLACK_USERNAME: "Bazel Build & Test"
337337
SLACK_ICON_EMOJI: ":boom:"
@@ -353,7 +353,7 @@ jobs:
353353
if: failure() && github.event_name == 'push' && github.repository_owner == 'magma'
354354
uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 # [email protected]
355355
env:
356-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_BAZEL_CI }}
356+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
357357
SLACK_TITLE: "Bazel C/C++ Check Job `./bazel/scripts/check_c_cpp_bazel.sh`"
358358
SLACK_USERNAME: "Bazel Build & Test"
359359
SLACK_ICON_EMOJI: ":boom:"

.github/workflows/build_all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# See the License for the specific language governing permissions and
1010
# limitations under the License.
1111

12-
name: build-all
12+
name: Magma Build & Publish
1313

1414
on:
1515
workflow_dispatch: null

0 commit comments

Comments
 (0)