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

[Ci]: check if there is a sonic dirty version issue #10445

Merged
merged 2 commits into from
Apr 8, 2022

Conversation

xumia
Copy link
Collaborator

@xumia xumia commented Apr 2, 2022

Why I did it

[Ci]: check if there is a sonic dirty version issue
If there is a dirty version issue in PR build, the build will be failed.

How I did it

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@xumia xumia added the ci label Apr 2, 2022
@xumia xumia requested a review from lguohan as a code owner April 2, 2022 05:22
# Print the detail dirty info
git status --untracked-files=no -s --ignore-submodules

# Exit with error, if it is a PR build
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can block official build if the issue has fixed in all release branches.

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that this step will change in future.
Can we use a template in master branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The check-dirty-version.yml is a template file.

@xumia xumia marked this pull request as draft April 2, 2022 08:47
@xumia xumia requested a review from qiluo-msft April 2, 2022 08:49
@xumia xumia force-pushed the check-dirty-version branch from b06db58 to c715d22 Compare April 2, 2022 10:37
@xumia xumia marked this pull request as ready for review April 2, 2022 23:35
@xumia xumia requested a review from liushilongbuaa April 7, 2022 00:13
liushilongbuaa
liushilongbuaa previously approved these changes Apr 7, 2022
# Print the detail dirty info
git status --untracked-files=no -s --ignore-submodules

# Exit with error, if it is a PR build
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that this step will change in future.
Can we use a template in master branch?

@xumia
Copy link
Collaborator Author

xumia commented Apr 7, 2022

@liushilongbuaa , please help review again, fix a bash string any string comparing issue, and verify it works as expected. See the check in #10495

@@ -131,3 +131,4 @@ jobs:
make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin
fi
displayName: "Build sonic image"
- template: check-dirty-version.yml
Copy link
Collaborator

Choose a reason for hiding this comment

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

template: check-dirty-version.yml

Is it too late. If we detect dirty, we don't need to build at all.

Copy link
Collaborator Author

@xumia xumia Apr 8, 2022

Choose a reason for hiding this comment

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

@qiluo-msft , the dirty is detected after build, during the build, we do not know which target introduce the dirty issue. In most cases, no one changes the source code, if some one changes it, it has value to wait for the build complete and detect it.
The check only impacts someone tries to do some bad thing, and not have any impact on the other cases.

@xumia xumia merged commit f24a04f into sonic-net:master Apr 8, 2022
@xumia xumia deleted the check-dirty-version branch April 8, 2022 02:49
judyjoseph pushed a commit that referenced this pull request Apr 11, 2022
Why I did it
[Ci]: check if there is a sonic dirty version issue
If there is a dirty version issue in PR build, the build will be failed.
qiluo-msft pushed a commit that referenced this pull request Apr 11, 2022
Why I did it
[Ci]: check if there is a sonic dirty version issue
If there is a dirty version issue in PR build, the build will be failed.
liushilongbuaa pushed a commit to liushilongbuaa/sonic-buildimage that referenced this pull request Jun 20, 2022
Related work items: #49, #58, #107, sonic-net#247, sonic-net#249, sonic-net#277, sonic-net#593, sonic-net#597, sonic-net#1035, sonic-net#2130, sonic-net#2150, sonic-net#2165, sonic-net#2169, sonic-net#2178, sonic-net#2179, sonic-net#2187, sonic-net#2188, sonic-net#2191, sonic-net#2195, sonic-net#2197, sonic-net#2198, sonic-net#2200, sonic-net#2202, sonic-net#2206, sonic-net#2209, sonic-net#2211, sonic-net#2216, sonic-net#7909, sonic-net#8927, sonic-net#9681, sonic-net#9733, sonic-net#9746, sonic-net#9850, sonic-net#9967, sonic-net#10104, sonic-net#10152, sonic-net#10168, sonic-net#10228, sonic-net#10266, sonic-net#10288, sonic-net#10294, sonic-net#10313, sonic-net#10394, sonic-net#10403, sonic-net#10404, sonic-net#10421, sonic-net#10431, sonic-net#10437, sonic-net#10445, sonic-net#10457, sonic-net#10458, sonic-net#10465, sonic-net#10467, sonic-net#10469, sonic-net#10470, sonic-net#10474, sonic-net#10477, sonic-net#10478, sonic-net#10482, sonic-net#10485, sonic-net#10488, sonic-net#10489, sonic-net#10492, sonic-net#10494, sonic-net#10498, sonic-net#10501, sonic-net#10509, sonic-net#10512, sonic-net#10514, sonic-net#10516, sonic-net#10517, sonic-net#10523, sonic-net#10525, sonic-net#10531, sonic-net#10532, sonic-net#10538, sonic-net#10555, sonic-net#10557, sonic-net#10559, sonic-net#10561, sonic-net#10565, sonic-net#10572, sonic-net#10574, sonic-net#10576, sonic-net#10578, sonic-net#10581, sonic-net#10585, sonic-net#10587, sonic-net#10599, sonic-net#10607, sonic-net#10611, sonic-net#10616, sonic-net#10618, sonic-net#10619, sonic-net#10623, sonic-net#10624, sonic-net#10633, sonic-net#10646, sonic-net#10655, sonic-net#10660, sonic-net#10664, sonic-net#10680, sonic-net#10683
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.

4 participants