Skip to content

Configure size deltas report for public repository #96

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

Merged
merged 1 commit into from
Jun 21, 2023
Merged

Configure size deltas report for public repository #96

merged 1 commit into from
Jun 21, 2023

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jun 21, 2023

This repository uses the "arduino/report-size-deltas" GitHub Actions action to cause a report to be commented to pull request threads of the change in the memory usage of the example sketches caused by the changes proposed in the pull request.

This system was set up during the initial development of the library, when the repository was private. The configuration was specially tailored for use in a private repository. Since that time, the repository has been made public, which has implications for the configuration of this report system.

In order to make this comment, the GitHub Actions workflow must have write permissions in the repository. The "Compile Examples" workflow will not have these permissions when it is triggered by a pull request from a fork. This causes the "report-size-deltas" job of the workflow to fail:

https://github.com/arduino-libraries/Arduino_Threads/actions/runs/5323101288/jobs/9640663125?pr=95#step:4:12

WARNING:__main__:Temporarily unable to open URL (HTTP Error 403: Forbidden), retrying
WARNING:__main__:Temporarily unable to open URL (HTTP Error 403: Forbidden), retrying
WARNING:__main__:Temporarily unable to open URL (HTTP Error 403: Forbidden), retrying
WARNING:__main__:Temporarily unable to open URL (HTTP Error 403: Forbidden), retrying
Traceback (most recent call last):
  File "/reportsizedeltas/reportsizedeltas.py", line 797, in <module>
    main()  # pragma: no cover
    ^^^^^^
  File "/reportsizedeltas/reportsizedeltas.py", line [32](https://github.com/arduino-libraries/Arduino_Threads/actions/runs/5323101288/jobs/9640663125?pr=95#step:4:33), in main
    report_size_deltas.report_size_deltas()
  File "/reportsizedeltas/reportsizedeltas.py", line 92, in report_size_deltas
    self.report_size_deltas_from_local_reports()
  File "/reportsizedeltas/reportsizedeltas.py", line 109, in report_size_deltas_from_local_reports
    self.comment_report(pr_number=pr_number, report_markdown=report)
  File "/reportsizedeltas/reportsizedeltas.py", line 537, in comment_report
    self.http_request(url=url, data=report_data)
  File "/reportsizedeltas/reportsizedeltas.py", line 601, in http_request
    with self.raw_http_request(url=url, data=data) as response_object:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/reportsizedeltas/reportsizedeltas.py", line 636, in raw_http_request
    raise TimeoutError("Maximum number of URL load retries exceeded")
TimeoutError: Maximum number of URL load retries exceeded

For this reason, there a different configuration of the report system is used in public repositories. The alternative configuration uses a dedicated workflow to produce the report. That workflow is triggered on a schedule rather than by the pull request event. That gives it the required write permissions in the repository.

This repository uses the "arduino/report-size-deltas" GitHub Actions action to cause a report to be commented to pull
request threads of the change in the memory usage of the example sketches caused by the changes proposed in the pull
request.

This system was set up during the initial development of the library, when the repository was private. The configuration
was specially tailored for use in a private repository. Since that time, the repository has been made public, which has
implications for the configuration of this report system.

In order to make this comment, the GitHub Actions workflow must have write permissions in the repository. The "Compile
Examples" workflow will not have these permissions when it is triggered by a pull request from a fork. This causes the
"report-size-deltas" job of the workflow to fail. For this reason, there a different configuration of the report system
is used in public repositories. The alternative configuration uses a dedicated workflow to produce the report. That
workflow is triggered on a schedule rather than by the pull request event. That gives it the required write permissions
in the repository.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: infrastructure Related to project infrastructure labels Jun 21, 2023
@per1234 per1234 requested a review from aentinger June 21, 2023 08:15
@per1234 per1234 self-assigned this Jun 21, 2023
Copy link
Contributor

@aentinger aentinger left a comment

Choose a reason for hiding this comment

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

Hi @per1234 ☕ 👋 Thank you for patching this up 🙇

@aentinger aentinger merged commit 123e6f6 into arduino-libraries:main Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants