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: reduce git load #5490

Merged
merged 1 commit into from
Dec 15, 2018
Merged

CI: reduce git load #5490

merged 1 commit into from
Dec 15, 2018

Conversation

d-a-v
Copy link
Collaborator

@d-a-v d-a-v commented Dec 12, 2018

  • git: clone with depth=1
  • git: no recursive submodule
    no more dependency on savannah.nongnu.org nor bearssl.org

@d-a-v d-a-v requested a review from igrr December 12, 2018 21:38
if [ ! -z "$CI_GITHUB_API_KEY" ]; then
if [ -z "$CI_GITHUB_API_KEY" ]; then
echo "curl: API key not present, exit with no error"
exit 0
Copy link
Member

Choose a reason for hiding this comment

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

I think that not preparing the package and exiting with 0 exit code is a bad behavior for the script. If I run it locally, it should either generate a package or exit with an error.

Skipping this script if the API key is not set should be handled by if: env(CI_GITHUB_API_KEY) IS present in travis yml. If you have observed that that does not work, it should be fixed there, I think.

Copy link
Member

Choose a reason for hiding this comment

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

Nevermind, I see now the link to the failed job in gitter. It seems that the condition in the yml does not work correctly, as variables get removed after the job has started. I think we need some other condition there, like fork = false...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No more condition in yml.

  • In a PR, package script is verbose and does not fail whether or not curl is failing.
  • In a branch, curl failing makes the job failed.

@igrr
Copy link
Member

igrr commented Dec 13, 2018

Also need to push the same branch to esp8266/Arduino and check that CI passes, before merging.

@d-a-v
Copy link
Collaborator Author

d-a-v commented Dec 14, 2018

d-a-v approved this pull request.

Also need to push the same branch to esp8266/Arduino and check that CI passes, before merging.

Countless tests above were always made simultaneously in a PR and in a branch.
Sorry for the noise in your mailboxes, thanks for your patience, CI cannot be tested locally.

No more "Travis failed with some weird error"

if [ -z "$CI_GITHUB_API_KEY" ]; then
# github api is rate-limiting
echo "---- Bad moon phase, in a PR, exit successfully"
exit 0
Copy link
Member

Choose a reason for hiding this comment

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

My comment above about failing with non-zero exit code is still valid, I think. If this is started from command line, it should not pretend to succeed without doing anything useful.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@igrr my (limited) understanding here is as follows:

  • when run from the main repo, this will always work.
  • when in a forked PR, the CI run may or may not hit the api limit. With this change, if the limit is hit, it won't cause the run to fail, hence still allowing a merge.
  • Without this change, if the limit is hit, the run will fail, which leaves as only choice restarting the job.
  • Skipping the deploy job based on the existence of the key apparently doesn't work.

Assuming the above is correct, what alternative is there?

@d-a-v d-a-v reopened this Dec 15, 2018
@d-a-v d-a-v changed the title CI: update git configuration CI: reduce git load Dec 15, 2018
@d-a-v
Copy link
Collaborator Author

d-a-v commented Dec 15, 2018

requested changes addressed in #5496

@d-a-v d-a-v merged commit e563cdb into esp8266:master Dec 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants