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

Create a developer guide #126

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

gilles-peskine-arm
Copy link
Contributor

  • Describe the general structure of the CI and the CI scripts.
  • Write a few points of advice. There could be plenty more.
  • Write a bit of guidance on validating CI changes.

There are no completeness goals here. I will take requests but I don't intend to spend much more time on this. Follow-ups are very welcome.

Describe the general structure of the CI and the CI scripts.

Write a few points of advice. There could be plenty more.

Write a bit of guidance on validating CI changes.

Signed-off-by: Gilles Peskine <[email protected]>
@gilles-peskine-arm gilles-peskine-arm added needs: review needs: reviewer priority-medium size-xs Estimated task size: extra small (a few hours at most) labels Sep 27, 2023
@bensze01 bensze01 self-requested a review October 4, 2023 09:48
So much better than anything I found with Google!

Signed-off-by: Gilles Peskine <[email protected]>
Copy link

@tgonzalezorlandoarm tgonzalezorlandoarm left a comment

Choose a reason for hiding this comment

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

This all looks good and I found it quite useful, thanks!

Copy link

@tom-daubney-arm tom-daubney-arm left a comment

Choose a reason for hiding this comment

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

Looks mostly good to me. Well written and clear and I learned a lot reading this.

Few small nits to sort out before approval. I am sorry I didn't use the suggestions feature for typos but for some reason this button does not appear on comment boxes for me in the "review view" but only when I look at the "files changed" tab, which I don't really understand but there we are.

Comment on lines 59 to 60
What goes for `mbedtls` also goes for other repositories tested by `mbedtls-test`, such as the upcoming PSA crypto implementation repository.

Choose a reason for hiding this comment

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

Now that TF-PSA-Crypto has been released we should probably change the wording here and perhaps link to it as well.

Perhaps: "... such as the TF-PSA-Crypto repository."


#### Global variables

Note that Groovy does not have global variables as such. Each module (`*.groovy` file) is a class, and that class can have multiple instances. Therefore, avoid using script-scope variables in a Groovy module that is loaded from another module. There's existing code that does this, but it's fragile and has caused us headache so we are moving away from that.

Choose a reason for hiding this comment

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

'headache' wants to be plural here.


## Validating changes

There is to continuous integration on the `mbedtls-test` repository (except a DCO check for the rare external contributions). Therefore, whenever you change the code, you must run some test jobs manually. What to run depends on what you're changing.

Choose a reason for hiding this comment

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

Typo: There is no continuous integration on the mbedtls-test repository...


If you make changes that affect error reporting, make sure that failures are still caught properly. We don't want to accidentally make a change that is fine if the tests pass, but hide failures!

There are pull requests for testing various kinds of failure in the [`mbedtls-restricted` repository](https://github.com/Mbed-TLS/mbedtls-restricted/labels/ci-testing) (private link). See [“CI testing: development, good”](https://github.com/Mbed-TLS/mbedtls-restricted/pull/906) for more information.

Choose a reason for hiding this comment

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

Typo: "failure" --> "failures"

Signed-off-by: Gilles Peskine <[email protected]>
Signed-off-by: Gilles Peskine <[email protected]>
tom-daubney-arm
tom-daubney-arm previously approved these changes Nov 6, 2023
Copy link

@tom-daubney-arm tom-daubney-arm left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@gilles-peskine-arm
Copy link
Contributor Author

I didn't use the suggestions feature for typos

I don't mind, it's more work to use that for typos anyway.

but for some reason this button does not appear on comment boxes for me in the "review view" but only when I look at the "files changed" tab, which I don't really understand but there we are.

The button only appears when GitHub knows how to generate a usable patch. It appears when you look at the whole diff, but not always when you're looking at a subset of the commits. In particular it never appears if there's a commit that's not included in your view that affects the same lines, since the patch couldn't be applied to the pull request.

@tom-daubney-arm
Copy link

I didn't use the suggestions feature for typos

I don't mind, it's more work to use that for typos anyway.

but for some reason this button does not appear on comment boxes for me in the "review view" but only when I look at the "files changed" tab, which I don't really understand but there we are.

The button only appears when GitHub knows how to generate a usable patch. It appears when you look at the whole diff, but not always when you're looking at a subset of the commits. In particular it never appears if there's a commit that's not included in your view that affects the same lines, since the patch couldn't be applied to the pull request.

Ah cool, good to know. Thanks.

Copy link

@tgonzalezorlandoarm tgonzalezorlandoarm left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks!

Signed-off-by: Gilles Peskine <[email protected]>
Harry-Ramsey
Harry-Ramsey previously approved these changes Nov 18, 2024
Copy link
Contributor

@Harry-Ramsey Harry-Ramsey left a comment

Choose a reason for hiding this comment

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

LGTM.

Thanks to recent improvements, it's now easier to test ABI-check and email reporting.

Signed-off-by: Gilles Peskine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: review priority-medium size-xs Estimated task size: extra small (a few hours at most)
Projects
Status: In Progress
Status: Has Approval
Development

Successfully merging this pull request may close these issues.

4 participants