Skip to content

Commit f274d37

Browse files
committed
Resolved merge conflicts
Signed-off-by: Rashmi <[email protected]>
2 parents a3b791b + 6e947e9 commit f274d37

File tree

2,237 files changed

+124291
-183038
lines changed

Some content is hidden

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

2,237 files changed

+124291
-183038
lines changed

.bazelrc

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,46 @@ build:production --config=lsan --strip=never --copt=-O3
99

1010
# C/C++ CONFIGS
1111
build --cxxopt=-std=c++14
12-
build --experimental_strict_action_env
1312
build --compilation_mode=dbg
1413

15-
# Default test configuration
14+
# DEFAULT TEST CONFIGURATION
15+
# Please read the GH issue #13073 before adding "test" options.
1616
test --test_output=errors
17-
test --flaky_test_attempts=5
17+
18+
# Use dynamically linked folly library
19+
build --define=folly_so=1
1820

1921
# MAGMA VM CONFIGS
2022
build:specify_vm_cc --action_env=CC=/usr/bin/gcc
21-
build:vm --disk_cache=/home/vagrant/magma/.bazel-cache
22-
common:vm --repository_cache=/home/vagrant/magma/.bazel-cache-repo
23-
build:vm --define=folly_so=1
2423
build:vm --config=specify_vm_cc
2524

26-
# MAGMA-BUILDER DOCKER CONTAINER CONFIGS
27-
build:docker --define=folly_so=1
28-
29-
# DEVCONTAINER CONFIGS
30-
build:devcontainer --disk_cache=/workspaces/magma/.bazel-cache
31-
common:devcontainer --repository_cache=/workspaces/magma/.bazel-cache-repo
32-
build:devcontainer --define=folly_so=1
25+
# DISK CACHE CONFIGS
26+
# The locations of the disk_cache/repository_cache are symlinks in the
27+
# docker containers/magma-vm. They point to the correct cache locations
28+
# $MAGMA/.bazel-cache and $MAGMA/.bazel-cache-repo inside the magma repository.
29+
build:disk_cache --disk_cache=/var/cache/bazel-cache
30+
common:disk_cache --repository_cache=/var/cache/bazel-cache-repo
3331

3432
# REMOTE CACHING READ AND WRITE CONFIGS
3533
# The file bazel/bazelrcs/remote_caching_rw.bazelrc is templated in CI
36-
# The full config is then written to remote-cache.bazelrc
37-
build:remote_caching_rw --remote_download_toplevel
34+
# The full config is then written to bazel/bazelrcs/cache.bazelrc
35+
build:remote_caching_rw --remote_download_minimal
36+
# --remote_download_toplevel instead of --remote_download_minimal is
37+
# needed for 'bazel run' due to https://github.com/bazelbuild/bazel/issues/11920
38+
run:remote_caching_rw --remote_download_toplevel
3839

3940
# REMOTE CACHING READ-ONLY CONFIGS
4041
# The file bazel/bazelrcs/remote_caching_ro.bazelrc is templated in CI
41-
# The full config is then written to remote-cache.bazelrc
42-
build:remote_caching_ro --remote_download_toplevel
42+
# The full config is then written to bazel/bazelrcs/cache.bazelrc
4343
build:remote_caching_ro --remote_upload_local_results=false
44+
build:remote_caching_ro --remote_download_minimal
45+
# --remote_download_toplevel instead of --remote_download_minimal is
46+
# needed for 'bazel run' due to https://github.com/bazelbuild/bazel/issues/11920
47+
run:remote_caching_ro --remote_download_toplevel
4448

45-
# Try importing the bazel remote caching config (relevant in CI)
46-
try-import remote-cache.bazelrc
49+
# Import the bazel caching config, with default disk cache,
50+
# which in CI gets overwritten by the remote caching config.
51+
import bazel/bazelrcs/cache.bazelrc
4752

4853
# TEST CONFIGS
4954
# Bazel test runtime default: PATH=/bin:/usr/bin:/usr/local/bin
@@ -52,10 +57,12 @@ build --test_env=PATH=/bin:/usr/bin:/usr/local/bin:/usr/sbin
5257
# Use MAGMA_ROOT from the host system in tests.
5358
# Needed by python tests (e.g. freedomfi_one_tests in enodebd)
5459
build --test_env=MAGMA_ROOT
60+
build --test_env=S1AP_TESTER_ROOT
5561

5662
# MME specific compile time defines
5763
# Compile mme libraries with unit test flag
58-
test --per_file_copt=^lte/gateway/c/core/.*$@-DMME_UNIT_TEST
64+
test --per_file_copt=^lte/gateway/c/core/.*$@-DMME_UNIT_TEST # See GH issue #13073
65+
build:mme_unit_test --per_file_copt=^lte/gateway/c/core/.*$@-DMME_UNIT_TEST # See GH issue #13073
5966
# TODO: deprecate these flags used for logging if possible
6067
build --per_file_copt=^lte/gateway/c/core/.*$@-DPACKAGE_BUGREPORT=\"TBD\"
6168
build --per_file_copt=^lte/gateway/c/core/.*$@-DPACKAGE_VERSION=\"0.1\"

.devcontainer/Dockerfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
################################################################
44
FROM ghcr.io/magma/magma/bazel-base:latest as devcontainer
55

6+
ARG HOME=/home/vscode
67
# [Option] Install zsh
78
ARG INSTALL_ZSH="true"
89
# [Option] Upgrade OS packages to their latest versions
@@ -37,7 +38,6 @@ ENV MAGMA_ROOT=/workspaces/magma
3738
ENV BUILD_TYPE=Debug
3839
ENV C_BUILD=/workspaces/magma/build/c
3940

40-
4141
RUN echo "Install general purpose packages" && \
4242
apt-get update && \
4343
apt-get upgrade -y && \
@@ -77,12 +77,12 @@ RUN echo "Install general purpose packages" && \
7777

7878
# Install golang 1.18
7979
WORKDIR /usr/local
80-
ARG GOLANG_VERSION="1.18"
80+
ARG GOLANG_VERSION="1.18.3"
8181
RUN GO_TARBALL="go${GOLANG_VERSION}.linux-amd64.tar.gz" \
8282
&& curl https://artifactory.magmacore.org/artifactory/generic/${GO_TARBALL} --remote-name --location \
8383
&& tar -xzf ${GO_TARBALL} \
8484
&& rm ${GO_TARBALL}
85-
ENV PATH=$PATH:/usr/local/go/bin
85+
ENV PATH=${PATH}:/usr/local/go/bin:${HOME}/go/bin
8686

8787
RUN echo "Install 3rd party dependencies" && \
8888
apt-get update && \
@@ -207,7 +207,7 @@ RUN ldconfig -v
207207
##### Install Python requirements
208208

209209
### create virtualenv
210-
ARG PYTHON_VENV=/home/vscode/build/python
210+
ARG PYTHON_VENV=${HOME}/build/python
211211
ENV PYTHON_VENV_EXECUTABLE=${PYTHON_VENV}/bin/python${PYTHON_VERSION}
212212
# PYTHON_VENV must by in sync with "python.defaultInterpreterPath", "python.analysis.extraPaths" and magtivate path in "postCreateCommand" in .devcontainer/devcontainer.json
213213

@@ -278,6 +278,4 @@ RUN for SWAGGER_SRC in lte orc8r; \
278278
rm -r ${PYTHON_VENV}/${GEN_DIR}/${SWAGGER_SRC}/swagger/test; \
279279
done
280280

281-
RUN ln -fs $MAGMA_ROOT/bazel/bazelrcs/devcontainer.bazelrc /etc/bazelrc
282-
283281
WORKDIR $MAGMA_ROOT

.devcontainer/bazel-base/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ RUN wget --progress=dot:giga https://github.com/bazelbuild/bazelisk/releases/dow
128128
# Update shared library configuration
129129
RUN ldconfig -v
130130

131-
RUN ln -s /workspaces/magma/bazel/bazelrcs/docker.bazelrc /etc/bazelrc
131+
RUN ln -s /workspaces/magma/.bazel-cache /var/cache/bazel-cache
132+
RUN ln -s /workspaces/magma/.bazel-cache-repo /var/cache/bazel-cache-repo
132133

133134
WORKDIR /workspaces/magma

.devcontainer/bazel-base/bazelrcs/devcontainer.bazelrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/bazel-base/bazelrcs/docker.bazelrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/bazel-base/bazelrcs/vm.bazelrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/post-create-commands.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ echo "alias magtivate='source /home/vscode/build/python/bin/activate'" >> ~/.bas
99
# Locally opened Devcontainer has access to persistent cache directory in .bazel-cache and .bazel-cache-repo.
1010
# This is a little hacky, but GITHUB_CODESPACE_TOKEN should only be defined for the Codespace case
1111
if [[ -z $GITHUB_CODESPACE_TOKEN ]]; then
12-
echo "Assuming the devcontainer is opened locally, not pulling in Bazel cache..."
12+
echo "Assuming the devcontainer is opened locally, not using Bazel remote cache..."
1313
else
14-
echo "Assuming the devcontainer is opened in GitHub Codespaces, pulling in Bazel cache..."
15-
# Pull in cache to speed up Bazel build. The cache is populated by a GitHub Action job periodically (.github/workflows/bazel-cache-push.yml)
16-
# Fetch repository cache
17-
wget -qO- https://magma-cache.s3.amazonaws.com/bazel-cache-repo-devcontainer.tar.gz | tar xvfz -
18-
# Fetch build cache
19-
wget -qO- https://magma-cache.s3.amazonaws.com/bazel-cache-devcontainer.tar.gz | tar xvfz -
14+
echo "Assuming the devcontainer is opened in GitHub Codespaces, using read-only Bazel remote cache..."
15+
cache_key=bazel-base-image # the devcontainer is based on the bazel-base container
16+
(cd "$1" && bazel/scripts/remote_cache_bazelrc_setup.sh $cache_key)
2017
fi
2118

2219
echo "Generating compile_commands.json for C/C++ code navigation"
23-
"$1"/dev_tools/gen_compilation_database.py
20+
"$1"/dev_tools/gen_compilation_database.py

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
!dp/protos/
5858
!dp/Makefile
5959

60+
!build/gen
61+
6062
!protos/
6163

6264
!xwf/gateway/

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# GitHub-specific: https://github.com/github/linguist/blob/master/docs/overrides.md
44

55
# Monolithic swagger.yml is generated
6-
/orc8r/cloud/go/obsidian/swagger/v1/swagger.yml linguist-generated
6+
/orc8r/cloud/go/services/obsidian/swagger/v1/swagger.yml linguist-generated
77
# NMS bindings are generated
8-
/nms/generated/MagmaAPIBindings.js linguist-generated
8+
/nms/generated/** linguist-generated
99
# SBI openapi interface generated files
1010
/feg/gateway/sbi/specs/** linguist-generated
1111
# requirements.txt for bazel builds is generated from requirements.in

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: "\U0001F41E Bug report"
2+
name: "\U0001F41E Bug report"
33
about: Report a bug or known issue
44
title: ''
55
labels: 'type: bug'
@@ -20,17 +20,21 @@ Prior to submitting an issue, check to see if one has already been created. If t
2020

2121
A clear and concise description of what the bug is.
2222

23-
**To Reproduce**
23+
#### To Reproduce
24+
2425
1. Go to '...'
2526
2. Click on '....'
2627
3. Scroll down to '....'
2728
4. See error
2829

29-
**Expected behavior**
30+
#### Expected behavior
31+
3032
A clear and concise description of what you expected to happen.
3133

32-
**Screenshots**
34+
#### Screenshots
35+
3336
If applicable, add screenshots to help explain your problem.
3437

35-
**Additional context**
38+
#### Additional context
39+
3640
Add any other context about the problem here (e.g. logs).

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: "\U0001F680 Feedback form"
33
about: Describe a problem, suggest a new idea or functionality for the project
44
title: ''
55
labels: 'type: feature'
6-
assignees: aswin-alexander, talkhasib
6+
assignees: ''
77

88
---
99

@@ -16,19 +16,24 @@ assignees: aswin-alexander, talkhasib
1616

1717
### Describe the problem
1818

19-
**Description**
19+
#### Description
20+
2021
A clear and concise description of what the problem is, under which scenarios or how frequent it happen
2122

22-
**Additional context**
23+
#### Additional context
24+
2325
Add any other context or screenshots about the problem here. You can also provide links to relevant resources.
2426

2527
### Describe your idea (optional)
2628

27-
**Description**
29+
#### Description
30+
2831
A clear and concise description of any alternative solutions or features you've considered.
2932

30-
**Additional context**
33+
#### Additional context
34+
3135
Add any other context or screenshots about your solution.
3236

33-
**Desired timelines**
37+
#### Desired timelines
38+
3439
Share any information about timeline expectations.

.github/ISSUE_TEMPLATE/proposal.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: "💡 Proposal"
2+
name: "\U0001F4A1 Proposal"
33
about: Propose a change to the Magma project
44
title: ''
55
labels: 'type: proposal'
@@ -23,16 +23,14 @@ For non-trivial proposals, consider following this standard pitch template, repr
2323
2424
-->
2525

26-
# TITLE OF YOUR PROPOSAL
27-
28-
## Problem
26+
### Problem
2927

3028
The raw idea, a use case, or something that motivates acting on this proposal
3129

32-
## Solution
30+
### Solution
3331

3432
The core elements of the solution, presented concisely, targeting an audience with high-breadth but low-depth understanding of Magma
3533

36-
## Non-goals
34+
### Non-goals
3735

3836
Anything specifically excluded from the concept

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: AGW docker load test
33

4-
on: # yamllint disable-line rule:truthy
4+
on:
55
workflow_run:
66
workflows:
77
- build-all
@@ -25,16 +25,16 @@ jobs:
2525
WORK_DIR: "${{ github.workspace }}/experimental/cloudstrapper/playbooks"
2626
AGW_DOCKER_AMI: "ami-0150e153a94c122b5"
2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2
2929
- name: Run apt
3030
run: sudo apt-get update && sudo apt -y upgrade
3131
- name: setup pyenv
32-
uses: "gabrielfalcao/pyenv-action@v8"
32+
uses: "gabrielfalcao/pyenv-action@5327db2939908b2ef8f62d284403d678c4b611d0" # pin@v8
3333
with:
34-
default: 3.7.0
35-
- uses: actions/setup-python@v2
34+
default: 3.8.10
35+
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a # pin@v2
3636
with:
37-
python-version: '3.7'
37+
python-version: '3.8.10'
3838
- name: Install Dependencies
3939
run: |
4040
pip install ansible awscli boto3 boto

0 commit comments

Comments
 (0)