Skip to content

Fix false positives from CI build #102

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
Mar 19, 2020
Merged

Fix false positives from CI build #102

merged 1 commit into from
Mar 19, 2020

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Mar 18, 2020

The previous configuration would only fail if the last compilation of one of the list items failed. Failure of any of the prior compilations in the list item would be masked by a successful final compilation.

For example, compilation of the WiFi_Cloud_Blink example is failing:
https://travis-ci.org/github/arduino-libraries/ArduinoIoTCloud/jobs/663401484#L1782
but the build is passing:
https://travis-ci.org/github/arduino-libraries/ArduinoIoTCloud/builds/663401482

The solution I chose is to use a single buildSketch() function instead of the buildExampleSketch() and buildUtilitySketch() functions. The example sketches to compile are passed as arguments to buildSketch(). The logic for determining the appropriate exit status is built into buildSketch().

The previous configuration would only fail if the last compilation of one of the list items failed. Failure of any of the prior compilations in the list item would be masked by a successful final compilation.
@TravisBuddy
Copy link

Travis tests have failed

Hey @per1234,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: 90ebd5f0-6926-11ea-bcbf-610c438bd3d3

@TravisBuddy
Copy link

Travis tests have failed

Hey @per1234,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: edf47250-6928-11ea-bcbf-610c438bd3d3

@aentinger
Copy link
Contributor

Hi @per1234 👋 Thank you very much for reacting so fast on my question with preparing this PR. Do I understand correctly that the CI checks for this PR fail because we already had failing builds inside from before your change? If that's the case I'd still go ahead and merge this in and fix the failing code in a separate PR. What's your opinion?

@per1234
Copy link
Contributor Author

per1234 commented Mar 19, 2020

Do I understand correctly that the CI checks for this PR fail because we already had failing builds inside from before your change?

Correct. The cause of the failed jobs:

/home/travis/build/arduino-libraries/ArduinoIoTCloud/examples/WiFi_Cloud_Blink/WiFi_Cloud_Blink.ino:17:53: error: 'SECRET_WIFI_NAME' was not declared in this scope

 WiFiConnectionHandler ArduinoIoTPreferredConnection(SECRET_WIFI_NAME, SECRET_PASSWORD);

                                                     ^~~~~~~~~~~~~~~~
/home/travis/build/arduino-libraries/ArduinoIoTCloud/examples/WiFi_Cloud_Blink/WiFi_Cloud_Blink.ino:17:71: error: 'SECRET_PASSWORD' was not declared in this scope

 WiFiConnectionHandler ArduinoIoTPreferredConnection(SECRET_WIFI_NAME, SECRET_PASSWORD);

                                                                       ^~~~~~~~~~~~~~~

So the failing CI build actually shows that my change fixes the problem with the false negatives.

I agree that the error in the example sketch should be fixed in a separate PR, since it's not directly related to this one.

@aentinger aentinger merged commit e7fd93c into arduino-libraries:master Mar 19, 2020
@per1234 per1234 deleted the fix-ci-false-negative branch April 15, 2020 04:15
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