-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Enhancement] Add Special Handling of Rust Project Files; fixes #390 #413
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please tell me if you agree with this behaviour of Aeruginous for Cargo.lock
and Cargo.toml
files.
As you already mentioned in #390, some warning messages should be printed in case that the version increment should fail. I agree with you and will add them, in the following. But in contrast to exiting with code zero for "okay", I would prefer to make the workflow calling Aeruginous fail as any of the of the reasons for the version increment to fail indicates major problems which should be solved even before generating the RONLOG / CHANGELOG because their resolution might be relevant enough for being documented in there. Thus, I would like to suggest to leave the non-zero exiting behaviour in as a feature. Furthermore, this would prevent the tracked files from becoming out of sync as the code base will be left in an undefined state if the version increment should fail; it is not always possible to check for the version increment to succeed beforehand as some error conditions are rather random. Having to restart the entire workflow in case of an error will make sure that the code base will always be in a defined and known state. |
|
|
|
|
|
|
|
I added error messages to the logic; the keywords are highlighted in red. |
@kevinmatthes Blocking the pipeline because Aeruginous can't increase the version without giving an option to increase the version manually could block a release until changing the release pipeline itself and removing increase-version command from within the .yml file and the bring it back after that. |
|
|
|
|
|
I implemented the changes you requested regarding the updating logic; you are now free to choose whether you would like to update or to rewrite the Cargo.toml, defaulting to a simple update without reformatting the file. Regarding the exit codes in error cases, I disagree with you. If Aeruginous should consider the situation impossible to continue, it is most likely that either:
These reasons are nearly impossibly rare if:
Since these three conditions can be safely expected to be the normal style of developing a Rust project, the version increment on Cargo.lock and Cargo.toml would only fail if there are fundamental problems with the project's code base which require urgent fixes. In addition to the error conditions named above, there are also the usual file IO errors which can happen with any software and the simplest way fixing them is to check if the software is called correctly and to try again. Everything else is a bug which requires a bug report and deserves a fix. |
If you would like to continue the discussion on possible error causes during the release preparations, i.e. the RONLOG assembly, which might cause Aeruginous to block the release pipeline, please create a discussion of type "General" in the "Discussions" tab and explain the challenges you see with a concrete example. |
@kevinmatthes |
No description provided.