Skip to content

Commit

Permalink
Merge branch 'main' into nat-hld
Browse files Browse the repository at this point in the history
* main: (75 commits)
  [dash-SAI] Enable warnings as errors (sonic-net#466)
  [SAI] wrong code generated in libsai sonic-net#415 (sonic-net#463)
  Fix incorrect IP in SONiC-DASH HLD VNET to VNET example. (sonic-net#459)
  DASH pipeline packet flow update proposal. (sonic-net#449)
  [libsai] Add attr name logging when doing get api (sonic-net#451)
  Build libsai deb packages in github workflow (sonic-net#450)
  Add Private Link mapping (sonic-net#327)
  [SAI] Update SAI submodule to the latest origin/master (sonic-net#446)
  [dash] Add libsai-debs target to create libsai debian packages (sonic-net#444)
  update p4 compile dependancy to avoid parallel  docker runs (sonic-net#443)
  [dash] Refactor libsai (sonic-net#438)
  [dash] Update SAI to latest v1.13 (sonic-net#435)
  [dash-pipeline] Refactor Makefiles (sonic-net#432)
  Remove ACL tags from BM (sonic-net#425)
  [submodule] Update SAI submodule to origin/master (sonic-net#431)
  [sai-api-gen] Write files only when changes are detected (sonic-net#429)
  Adds SAI_ROUTE_ENTRY_ATTR_PACKET_ACTION api to dash_underlay_routing (sonic-net#422)
  [SAI] Add missing check for api initialized
  [SAI] Print oids in hex form
  [SAI] Change asserts to return error codes and add missing switch api
  ...
  • Loading branch information
clarklee-guizhao committed Dec 3, 2023
2 parents 4b824ba + 056d03e commit d5e6a83
Show file tree
Hide file tree
Showing 281 changed files with 18,344 additions and 4,062 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/dash-bmv2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,10 @@ jobs:
run: DOCKER_FLAGS=$docker_fg_flags make docker-saichallenger-client
- name: Run SAI-Challenger Tests
run: DOCKER_FLAGS=$docker_fg_root_flags make run-saichallenger-tests

- name: Build libsai debian packages
run: DOCKER_FLAGS=$docker_fg_root_flags make libsai-debs
- uses: actions/upload-artifact@v3
with:
name: libsai-debian-packages
path: /home/runner/work/DASH/DASH/dash-pipeline/SAI/debian/*deb
if-no-files-found: error
93 changes: 93 additions & 0 deletions .github/workflows/pre-commit-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: pre-commit-check

on:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: pip install pre-commit>=3.2.1
- run: pre-commit --version
- run: git --version
- run: git status
- run: pre-commit install
- run: git fetch origin
- run: |
set -x
set +e
OUTPUT=$(pre-commit run --color never --from-ref HEAD^ --to-ref HEAD 2>&1)
EXIT_CODE=$?
echo $OUTPUT
echo $EXIT_CODE
echo "pre_commit<<EOF" >> $GITHUB_ENV
echo $OUTPUT >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "exit_code=$EXIT_CODE" >> $GITHUB_ENV
continue-on-error: true
- name: Prepare comment
if: ${{ env.exit_code != 0 }}
env:
PRE_COMMIT: ${{ env.pre_commit }}
EXIT_CODE: ${{ env.exit_code }}
run: |
echo "$PRE_COMMIT"
echo $EXIT_CODE
if [[ `echo "$PRE_COMMIT" | wc -l` -gt 20 ]]; then
PRE_COMMIT=`echo "$PRE_COMMIT" | head -n 20`
PRE_COMMIT="$PRE_COMMIT\n...\n[truncated extra lines, please run pre-commit locally to view full check results]"
PRE_COMMIT=`printf "$PRE_COMMIT"`
fi
br='<br/>'
PR_MESSAGE="The [pre-commit](http://pre-commit.com/) check detected issues in the files touched by this pull request.
Detailed pre-commit check results:
<samp>$PRE_COMMIT</samp>
To run the pre-commit checks locally, you can follow below steps:
1. Ensure that default python is python3.
2. Ensure that the \`pre-commit\` package is installed:
\`\`\`sudo pip install pre-commit\`\`\`
3. Go to repository root folder
4. Install the pre-commit hooks:
\`\`\`pre-commit install\`\`\`
5. Use pre-commit to check staged file:
\`\`\`pre-commit\`\`\`
6. Alternatively, you can check committed files using:
\`\`\`pre-commit run --from-ref <commit_id> --to-ref <commit_id>\`\`\`
or
\`\`\`pre-commit run --all-files\`\`\`"
results=`echo "$PR_MESSAGE" | while read line; do echo $line$br; done | tr -d '\n'`
echo "pre_commit_mod=$results" >> $GITHUB_ENV
echo "exit_code=$EXIT_CODE" >> $GITHUB_ENV
- name: Add comment to PR
if: ${{ env.exit_code != 0 }}
env:
URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRE_COMMIT: ${{ env.pre_commit_mod }}
run: |
curl \
-X POST \
$URL \
-H "Content-Type: application/json" \
-H "Authorization: token $GITHUB_TOKEN" \
--data "{ \"body\": \"$PRE_COMMIT\" }"
- name: pre-commit exit code
env:
EXIT_CODE: ${{ env.exit_code }}
run: exit $EXIT_CODE
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**~
**.swp
.DS_STORE
.idea
*.bkp
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[submodule "dash-pipeline/SAI/SAI"]
path = dash-pipeline/SAI/SAI
url = https://github.com/reshmaintel/SAI.git
branch = dash-ptf-ci
url = https://github.com/opencomputeproject/SAI.git
branch = master
[submodule "test/SAI-Challenger"]
path = test/SAI-Challenger
url = https://github.com/opencomputeproject/SAI-Challenger
url = https://github.com/opencomputeproject/SAI-Challenger.git
branch = main
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: mixed-line-ending
args: [--fix=lf]
# - id: trailing-whitespace
# - id: end-of-file-fixer
# - id: check-case-conflict
# - id: check-ast
# - id: check-json
# - id: double-quote-string-fixer
# - repo: https://github.com/PyCQA/flake8
# rev: 6.0.0
# hooks:
# - id: flake8
# args: ["--max-line-length=201", "--extend-ignore=F601,F821"]
47 changes: 47 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ adaptor
adaptors
ADDR
addr
ae
afe
agnostically
amd
apache
Expand Down Expand Up @@ -88,7 +90,9 @@ conf
CONFDB
confgen
config
configurated
configs
Conntrack
Containerlab
CP
CreatedHalfOpenFlow
Expand Down Expand Up @@ -128,14 +132,19 @@ dataplanes
datastore
DBs
DDoS
de
deallocating
Decap
decap
decap'ed
decap'ing
decaps
deliverables
DemoDays
designator
DEST
dest
DestinationPort
dev
DHCP
dir
Expand Down Expand Up @@ -195,6 +204,7 @@ DUT's
EasyCLA
ECMP
encap
encaps
ENI
eni
Eni
Expand All @@ -204,12 +214,14 @@ entrypoints
enum
EPUs
EPYC
ethernet
executables
ExpressRoute
failover
failovers
fakesai
FastPath
fc
FEC
ffe
FINPackets
Expand Down Expand Up @@ -247,6 +259,7 @@ HSL
https
hw
HW
IETF
ICLA
ICMP
idempotency
Expand All @@ -257,9 +270,11 @@ impactful
incrementing
inband
InbfromLB
INET
INIT
Init
initializer
initialization
integrations
integrators
interoperable
Expand All @@ -276,6 +291,7 @@ IPv
irrespectively
ish
iso
isresourcetype
ISSU
iteratively
IxExplorer
Expand Down Expand Up @@ -309,12 +325,14 @@ LOOKUPs
loopback
LPM
lts
MACs
Macsec
makefile
Makefile
Makefiles
makefiles
MAPs
maprouting
MatchedHalfOpenFlow
MatchedOtherFlow
MatchedTcpFlow
Expand All @@ -337,7 +355,9 @@ MTU
MUX
MUXes
natively
nat
natted
NAT'ing
nb
nd
netdevs
Expand All @@ -349,13 +369,17 @@ noautoconsole
NonSynStateful
NorthBound
Novus
NPL
NPUS
NSG
NSGs
num
NumberOfFlowResimulated
NVA
NVidia
nvgre
Nvgre
NvGRE
NVMe
observability
OCP
Expand Down Expand Up @@ -416,6 +440,7 @@ Pritsak
PrivateAddress
programmability
programmatically
proto
protobuf
provids
PRs
Expand All @@ -435,6 +460,7 @@ qos
QoS
qos
Radv
recirculation
rdpty
reachability
reconvergence
Expand All @@ -447,6 +473,7 @@ redis
renderer
repo
repos
resimulated
resimulation
responder
Resttapi
Expand Down Expand Up @@ -490,6 +517,8 @@ SDK
SDKs
SDN
sdn
SequenceNumber
SetRequest
Sflow
SHA
sharding
Expand All @@ -513,6 +542,7 @@ SoCs
Sommers
SONiC
SONiC's
SourcePort
SpoofingPacket
SRC
src
Expand Down Expand Up @@ -563,6 +593,7 @@ TcpSynPacket
TDI
Teamd
teardown
techonology
templating
TEP
testbed
Expand Down Expand Up @@ -636,6 +667,7 @@ Vnic
vnic
vnics
VNID
VNIs
VPC
vpc
vport
Expand Down Expand Up @@ -664,9 +696,24 @@ xsight
YAML
yaml
yml
ZMQ
ZTVN
Mukesh
Velayudhan
deparsing
testability
autogeneration
IpAddress
IpPrefix
Ipv
bool
uint
AclRule
RangeOrValue
Srinivasan
Vijay
AppDB
Gan
Ze
AppDBMemoryEstimation
Ivantsiv
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ We prefer all communications to be in English.

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
<!-- END MICROSOFT SECURITY.MD BLOCK -->
2 changes: 1 addition & 1 deletion assets/cloud-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/dash-specs-flow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/express-route-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/on-prem-gateway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/vm-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d5e6a83

Please sign in to comment.