Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agw): Upgrade ASN library to the new version #15369

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ganeshg87
Copy link
Contributor

Summary

Upgrade the ASN library to the new version

Test Plan

upgrading asn1 compiler

Step 1: Apply Patch to Magma Repo

# Navigate to the Magma repository
cd magma

# Apply the patch
git apply upgrade_asn.patch

Step 2: Build and Install ASN.1 Compiler (asn1c) from mouse07410

# Clone the asn1c repository from mouse07410
git clone https://github.com/mouse07410/asn1c.git

# Navigate to the cloned repository
cd asn1c

# Configure with default settings
test -f configure || autoreconf -iv
./configure

# Build the compiler
make

# Install the compiler into a standard location
sudo make install

Step 3: Build Magma Code Base
# Navigate back to the Magma repository if you're not already there
cd path/to/magma

# Build the Magma code base

Additional Information

  • This change is backwards-breaking

Security Considerations

@ganeshg87 ganeshg87 requested review from a team as code owners January 25, 2024 06:57
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines. label Jan 25, 2024
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added component: agw Access gateway-related issue component: ci All updates on CI (Jenkins/CircleCi/Github Action) labels Jan 25, 2024
Copy link
Contributor

github-actions bot commented Jan 25, 2024

Bazel unit-test results --config=production

    1 files  ±    0    86 suites   - 43   3m 14s ⏱️ -4s
415 tests  - 193  415 ✔️  - 193  0 💤 ±0  0 ±0 
416 runs   - 193  416 ✔️  - 193  0 💤 ±0  0 ±0 

Results for commit edd79c7. ± Comparison against base commit 81a6d4a.

This pull request removes 193 tests.
ChargingGrantTest ‑ test_get_action
ChargingGrantTest ‑ test_get_action_redirect
ChargingGrantTest ‑ test_get_action_restrict
ChargingGrantTest ‑ test_get_update_type
ChargingGrantTest ‑ test_marshal
ChargingGrantTest ‑ test_should_deactivate_service
ChargingGrantTest ‑ test_tolerance_quota_exhausted
EventHandlerTest ‑ test_event_handler_close_assoc
EventHandlerTest ‑ test_event_handler_new_assoc
EventHandlerTest ‑ test_event_handler_send_ul
…

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 25, 2024

Bazel unit-test results

    1 files    86 suites   3m 23s ⏱️
415 tests 415 ✔️ 0 💤 0
416 runs  416 ✔️ 0 💤 0

Results for commit edd79c7.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 25, 2024

Bazel unit-test results --config=asan

    1 files  ±    0    86 suites   - 43   3m 17s ⏱️ -10s
415 tests  - 193  415 ✔️  - 193  0 💤 ±0  0 ±0 
416 runs   - 193  416 ✔️  - 193  0 💤 ±0  0 ±0 

Results for commit edd79c7. ± Comparison against base commit 81a6d4a.

This pull request removes 193 tests.
ChargingGrantTest ‑ test_get_action
ChargingGrantTest ‑ test_get_action_redirect
ChargingGrantTest ‑ test_get_action_restrict
ChargingGrantTest ‑ test_get_update_type
ChargingGrantTest ‑ test_marshal
ChargingGrantTest ‑ test_should_deactivate_service
ChargingGrantTest ‑ test_tolerance_quota_exhausted
EventHandlerTest ‑ test_event_handler_close_assoc
EventHandlerTest ‑ test_event_handler_new_assoc
EventHandlerTest ‑ test_event_handler_send_ul
…

♻️ This comment has been updated with latest results.

Copy link
Contributor

@rdefosse rdefosse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ganeshg87

looks good to me.

could you please also patch these 2 files?

diff --git a/lte/gateway/docker/mme/Dockerfile.rhel8 b/lte/gateway/docker/mme/Dockerfile.rhel8
index 1903b2f412..709b918fb6 100644
--- a/lte/gateway/docker/mme/Dockerfile.rhel8
+++ b/lte/gateway/docker/mme/Dockerfile.rhel8
@@ -150,7 +150,7 @@ RUN  git clone --recurse-submodules -b v1.15.0 https://github.com/grpc/grpc && \
      wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz && \
      git clone https://liblfds.org/git/liblfds && \
      git clone https://gitea.osmocom.org/cellular-infrastructure/libgtpnl && \
-     git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
+     git clone https://github.com/mouse07410/asn1c.git && \
      git clone https://github.com/OPENAIRINTERFACE/opencord.org.freeDiameter.git freediameter && \
      git clone https://github.com/nlohmann/json.git
 
@@ -275,8 +275,8 @@ RUN cd libgtpnl && \
 
 #####  asn1c
 RUN cd asn1c && \
-    # Moved git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
-    git checkout f12568d617dbf48497588f8e227d70388fa217c9 && \
+    # Moved git clone https://github.com/mouse07410/asn1c.git && \
+    git checkout ebed802 && \
     autoreconf -iv && \
     ./configure && \
     make -j`nproc` && \
diff --git a/lte/gateway/docker/mme/Dockerfile.ubuntu18.04 b/lte/gateway/docker/mme/Dockerfile.ubuntu18.04
index 8f93634753..3c52a74f01 100644
--- a/lte/gateway/docker/mme/Dockerfile.ubuntu18.04
+++ b/lte/gateway/docker/mme/Dockerfile.ubuntu18.04
@@ -84,7 +84,7 @@ RUN  git clone --recurse-submodules -b v1.15.0 https://github.com/grpc/grpc && \
      wget https://www.gnupg.org/ftp/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz && \
      git clone https://liblfds.org/git/liblfds && \
      git clone https://gitea.osmocom.org/cellular-infrastructure/libgtpnl && \
-     git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
+     git clone https://github.com/mouse07410/asn1c.git && \
      git clone https://github.com/OPENAIRINTERFACE/opencord.org.freeDiameter.git freediameter && \
      git clone https://github.com/nlohmann/json.git
 
@@ -207,8 +207,8 @@ RUN cd libgtpnl && \
 
 #####  asn1c
 RUN cd asn1c && \
-    # Moved git clone https://github.com/OPENAIRINTERFACE/asn1c.git && \
-    git checkout f12568d617dbf48497588f8e227d70388fa217c9 && \
+    # Moved git clone https://github.com/mouse07410/asn1c.git && \
+    git checkout ebed802 && \
     autoreconf -iv && \
     ./configure && \
     make -j`nproc` && \

I've built and tested manually with these 2 modifications.

@ganeshg87
Copy link
Contributor Author

@rdefosse ,
updated docker files and included in patch. please have a look

Thanks
Ganesh

Signed-off-by: Ganesh Gedela <ganesh.gedela@veltris.com>
Signed-off-by: Ganesh Gedela <ganesh.gedela@veltris.com>
@Sujay-Radtonics
Copy link
Contributor

@ganeshg87 , Can you please give an example which can help us confirm that generated files are using new ASN library ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: agw Access gateway-related issue component: ci All updates on CI (Jenkins/CircleCi/Github Action) size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants