Skip to content

[build] 'make reset' target will continue recursive operations even if some fail#4675

Merged
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:make_reset_ignore_errors
Jun 1, 2020
Merged

[build] 'make reset' target will continue recursive operations even if some fail#4675
jleveque merged 1 commit intosonic-net:masterfrom
jleveque:make_reset_ignore_errors

Conversation

@jleveque
Copy link
Contributor

This change allows the recursive git clean and git reset commands to continue even if they encounter an error in one of the submodules. Previously, if an error was encountered, the operation would terminate with a message similar to the following:

Stopping at 'src/sonic-mgmt-framework'; script returned non-zero status.

@jleveque
Copy link
Contributor Author

Retest vs please

@lguohan
Copy link
Collaborator

lguohan commented May 31, 2020

when would the command fail on the mgmt-framework submodule?

@lguohan
Copy link
Collaborator

lguohan commented May 31, 2020

retest vs please

@jleveque
Copy link
Contributor Author

@lguohan: It fails to delete files in the gopkgs subdirectory. This permissions issue needs further investigation. Some example messages:

...
warning: failed to remove gopkgs/pkg/mod/github.com/golang/[email protected]/proto/map_test.go: Permission denied
warning: failed to remove gopkgs/pkg/mod/github.com/golang/[email protected]/proto/properties.go: Permission denied
warning: failed to remove gopkgs/pkg/mod/github.com/golang/[email protected]/ptypes/duration_test.go: Permission denied
warning: failed to remove gopkgs/pkg/mod/github.com/golang/[email protected]/ptypes/timestamp/timestamp.pb.go: Permission denied
...

@jleveque
Copy link
Contributor Author

Retest vsimage please

@lguohan
Copy link
Collaborator

lguohan commented May 31, 2020

retest vsimage please

@lguohan
Copy link
Collaborator

lguohan commented May 31, 2020

why in this case, we should skip these errors and let it continue? shouldn't we ask broadcom to fix the reset issue on their repo?

@jleveque
Copy link
Contributor Author

@lguohan: Yes, Broadcom should fix the root cause, but this patch allows the command to continue and reset the remaining submodules. The error messages still get printed to stdout, so it will be noticed, it's not suppressed. This patch just prevents the need to manually clean up multiple submodules if any one fails to clean up.

@lguohan
Copy link
Collaborator

lguohan commented May 31, 2020

retest vsimage please

@lguohan
Copy link
Collaborator

lguohan commented Jun 1, 2020

when you merge, can you make sure you edited the commit message to include what you have in the pr.

@jleveque jleveque merged commit 336cf2a into sonic-net:master Jun 1, 2020
@jleveque jleveque deleted the make_reset_ignore_errors branch June 1, 2020 20:28
abdosi pushed a commit that referenced this pull request Jun 3, 2020
… fail (#4675)

This change allows the recursive `git clean` and `git reset` commands to continue even if they encounter an error in one of the submodules. Previously, if an error was encountered, the operation would terminate with a message similar to the following:

Stopping at 'src/sonic-mgmt-framework'; script returned non-zero status.
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.

3 participants