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

Reland 'Make changes to building and packaging sairedis (#1116)' #1194

Merged

Conversation

saiarcot895
Copy link
Contributor

@saiarcot895 saiarcot895 commented Jan 5, 2023

The vstest issues causing random test failures have since been fixed, and were not related to the changes in this PR.

  • Make changes to building and packaging sairedis

This commit includes the following changes:

  1. Use Debian build profiles instead of custom build targets to build different configurations of sairedis. Build profiles were designed for this purpose. This also makes the debian/rules file a bit cleaner.
  2. Rely on the debug packages being automatically created, instead of us explicitly specifying it in debian/control.
  3. Add actual support for excluding Python 2 binding during build.
  4. Make sure the compile flags used for building Python 2 and Python 3 are actually correct.

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

  • Update pipeline file

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

  • Fix argument for profile

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

  • Exclude libsai package from the list of dependencies

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

  • Allow multiple syslog artifacts during tests

Signed-off-by: Saikrishna Arcot sarcot@microsoft.com

Microsoft ADO: 24405994

…)'

* Make changes to building and packaging sairedis

This commit includes the following changes:
1. Use Debian build profiles instead of custom build targets to build
different configurations of sairedis. Build profiles were designed for
this purpose. This also makes the debian/rules file a bit cleaner.
2. Rely on the debug packages being automatically created, instead of us
explicitly specifying it in debian/control.
3. Add actual support for excluding Python 2 binding during build.
4. Make sure the compile flags used for building Python 2 and Python 3
are actually correct.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Update pipeline file

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Fix argument for profile

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Exclude libsai package from the list of dependencies

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>

* Allow multiple syslog artifacts during tests

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895
Copy link
Contributor Author

@qiluo-msft @kcudnik could you review this when you get a chance?

@saiarcot895
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@saiarcot895
Copy link
Contributor Author

/azp run Azure.sonic-sairedis

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
@saiarcot895
Copy link
Contributor Author

@kcudnik Can you review this when you get a chance?


AC_PATH_PROGS(SWIG, [swig3.0 swig])

CXXFLAGS_COMMON=""
CXXFLAGS_COMMON+=" -ansi"
CXXFLAGS_COMMON+=" -fPIC"
CXXFLAGS_COMMON+=" -pipe"
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this is added? something wrong with temporary files ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I don't remember why I added this. At best, this might give a bit of performance/space benefit since intermediate files will all get transferred in memory rather than needing to be saved to a file first. Using temporary files shouldn't cause any issue, unless disk space on /tmp is very low.

@saiarcot895 saiarcot895 merged commit a3f1f1a into sonic-net:master Jun 30, 2023
@saiarcot895 saiarcot895 deleted the reland-build-packaging-changes branch June 30, 2023 17:32
saiarcot895 added a commit to saiarcot895/sonic-swss-common that referenced this pull request Jun 30, 2023
The build rules for sairedis have been simplified in
sonic-net/sonic-sairedis#1194. As a result, build targets have changed.
Update the build step here accordingly.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
kcudnik pushed a commit that referenced this pull request Jul 4, 2023
This PR contains a fix of CodeQL bug introduced by: #1194

Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
saiarcot895 added a commit to saiarcot895/sonic-sairedis that referenced this pull request Jul 26, 2023
PR sonic-net#1194 removed the .ONESHELL flag (causing all commands for a target
to be executed in a single shell environment). Because of that,
multi-line shell code blocks aren't parsed correctly.

Since the `syncd_init_common.sh` file should always exist anyways (it's
unconditionally sourced by an init script and a start script), remove
the if-check around it, and always run `sed` when building rpc packages.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
saiarcot895 added a commit that referenced this pull request Jul 31, 2023
PR #1194 removed the .ONESHELL flag (causing all commands for a target
to be executed in a single shell environment). Because of that,
multi-line shell code blocks aren't parsed correctly.

Since the `syncd_init_common.sh` file should always exist anyways (it's
unconditionally sourced by an init script and a start script), remove
the if-check around it, and always run `sed` when building rpc packages.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Co-authored-by: xumia <59720581+xumia@users.noreply.github.com>
saiarcot895 added a commit to saiarcot895/sonic-sairedis that referenced this pull request Jan 11, 2024
This fixes a breakage from sonic-net#1194 where code coverage and ASAN were not
enabled, due to DEB_CONFIGURE_EXTRA_FLAGS no longer being used in
dh_auto_configure.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
saiarcot895 added a commit that referenced this pull request Jan 12, 2024
This fixes a breakage from #1194 where code coverage and ASAN were not
enabled, due to DEB_CONFIGURE_EXTRA_FLAGS no longer being used in
dh_auto_configure.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld pushed a commit to mssonicbld/sonic-sairedis that referenced this pull request Feb 2, 2024
This fixes a breakage from sonic-net#1194 where code coverage and ASAN were not
enabled, due to DEB_CONFIGURE_EXTRA_FLAGS no longer being used in
dh_auto_configure.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
mssonicbld pushed a commit that referenced this pull request Feb 10, 2024
This fixes a breakage from #1194 where code coverage and ASAN were not
enabled, due to DEB_CONFIGURE_EXTRA_FLAGS no longer being used in
dh_auto_configure.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants