Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Workflow to build contributor PRs #17843

Merged
merged 7 commits into from
Feb 18, 2021
Merged

Workflow to build contributor PRs #17843

merged 7 commits into from
Feb 18, 2021

Conversation

st3fan
Copy link
Contributor

@st3fan st3fan commented Feb 5, 2021

Experimental GitHub Actions Workflow to build contributor pull requests. I took most of this workflow from https://github.com/fork-maintainers/iceraven-browser and modified it slightly.

TODO Enable the checks to make sure this only runs on forks.

@st3fan st3fan requested review from a team as code owners February 5, 2021 01:33
@codecov-io
Copy link

codecov-io commented Feb 5, 2021

Codecov Report

Merging #17843 (8e2f17c) into master (d7f1117) will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #17843      +/-   ##
============================================
- Coverage     32.97%   32.96%   -0.02%     
+ Complexity     1383     1382       -1     
============================================
  Files           461      461              
  Lines         19426    19425       -1     
  Branches       2712     2712              
============================================
- Hits           6406     6403       -3     
- Misses        12487    12488       +1     
- Partials        533      534       +1     
Impacted Files Coverage Δ Complexity Δ
...java/org/mozilla/fenix/perf/PerformanceInflater.kt 80.00% <0.00%> (-15.00%) 4.00% <0.00%> (-1.00%)
.../org/mozilla/fenix/settings/DataChoicesFragment.kt 0.00% <0.00%> (ø) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b65e63...44b76e0. Read the comment docs.

Copy link
Contributor

@escapewindow escapewindow left a comment

Choose a reason for hiding this comment

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

Stamp!

@sv-ohorvath
Copy link
Contributor

Please rebase, the blocking test was disabled: f0b7b3b

@pocmo
Copy link
Contributor

pocmo commented Feb 5, 2021

Do we really want that though? We had travis/buddybuild and others in parallel and it was always triple the pain to have two build systems.

@st3fan
Copy link
Contributor Author

st3fan commented Feb 5, 2021

Do we really want that though? We had travis/buddybuild and others in parallel and it was always triple the pain to have two build systems.

@pocmo Very good point. We discussed with RelEng and agreed this would be a temporary solution until we can build contributor PRs on on Task Cluster using the same CI (or subset) of what we use. I also included checks in this workflow so that it will only run on forks so it should not get in the way of work happening in the main repo.

Copy link
Contributor

@eliserichards eliserichards left a comment

Choose a reason for hiding this comment

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

Awesome 🎉

@st3fan st3fan force-pushed the st3fan/workflow branch 2 times, most recently from 8e2f17c to 49d629a Compare February 17, 2021 18:26
@st3fan
Copy link
Contributor Author

st3fan commented Feb 17, 2021

Is this a test that requires a device?

2021-02-17T18:37:56.1296626Z SUITE: org.mozilla.fenix.utils.ManufacturerCodesTest
2021-02-17T18:37:56.1297736Z   TEST: testIsLG
2021-02-17T18:37:56.6293639Z   FAILURE

Similar ...

2021-02-17T18:37:56.6593564Z   TEST: testIsSamsung
2021-02-17T18:37:56.6594038Z   FAILURE

@st3fan
Copy link
Contributor Author

st3fan commented Feb 17, 2021

This is odd?

2021-02-17T18:34:58.6299793Z SUITE: org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding.OnboardingAutomaticSignInViewHolderTest
2021-02-17T18:34:58.7295652Z   TEST: sign in on click - MigrationResult WillRetry treated the same as Success
2021-02-17T18:34:58.7301080Z     [Robolectric] org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding.OnboardingAutomaticSignInViewHolderTest.sign in on click - MigrationResult WillRetry treated the same as Success: sdk=28; resources=BINARY
2021-02-17T18:34:58.7305415Z     I/MonitoringInstr: Instrumentation started!
2021-02-17T18:34:59.6300874Z     Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
2021-02-17T18:34:59.6307354Z     [WARNING] Unable to get resource 'org.robolectric:android-all:pom:5.0.2_r3-robolectric-r0' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
2021-02-17T18:34:59.6311129Z     Downloading: org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.pom from repository central at http://repo1.maven.org/maven2
2021-02-17T18:34:59.7303134Z     Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.pom
2021-02-17T18:34:59.7307897Z     [WARNING] Unable to get resource 'org.robolectric:android-all:pom:5.0.2_r3-robolectric-r0' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.pom
2021-02-17T18:34:59.7311291Z     Downloading: org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
2021-02-17T18:34:59.8328664Z     Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
2021-02-17T18:34:59.8334003Z     [WARNING] Unable to get resource 'org.robolectric:android-all:jar:5.0.2_r3-robolectric-r0' from repository sonatype (https://oss.sonatype.org/content/groups/public/): Error transferring file: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
2021-02-17T18:34:59.8337784Z     Downloading: org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.jar from repository central at http://repo1.maven.org/maven2
2021-02-17T18:34:59.8340384Z     Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.jar
2021-02-17T18:34:59.8343931Z     [WARNING] Unable to get resource 'org.robolectric:android-all:jar:5.0.2_r3-robolectric-r0' from repository central (http://repo1.maven.org/maven2): Error transferring file: Server returned HTTP response code: 501 for URL: http://repo1.maven.org/maven2/org/robolectric/android-all/5.0.2_r3-robolectric-r0/android-all-5.0.2_r3-robolectric-r0.jar
2021-02-17T18:35:00.4295057Z   FAILURE
2021-02-17T18:35:00.8307886Z 
2021-02-17T18:35:00.8407141Z Unable to resolve artifact: Missing:
2021-02-17T18:35:00.8408382Z ----------
2021-02-17T18:35:00.8409444Z 1) org.robolectric:android-all:jar:5.0.2_r3-robolectric-r0
2021-02-17T18:35:00.8411525Z   Try downloading the file manually from the project website.
2021-02-17T18:35:00.8426089Z 
2021-02-17T18:35:00.8426778Z   Then, install it using the command: 
2021-02-17T18:35:00.8428401Z       mvn install:install-file -DgroupId=org.robolectric -DartifactId=android-all -Dversion=5.0.2_r3-robolectric-r0 -Dpackaging=jar -Dfile=/path/to/file
2021-02-17T18:35:00.8429263Z 
2021-02-17T18:35:00.8430007Z   Alternatively, if you host your own repository you can deploy the file there: 
2021-02-17T18:35:00.8431659Z       mvn deploy:deploy-file -DgroupId=org.robolectric -DartifactId=android-all -Dversion=5.0.2_r3-robolectric-r0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
2021-02-17T18:35:00.8432912Z 
2021-02-17T18:35:00.8433302Z   Path to dependency: 
2021-02-17T18:35:00.8434043Z   	1) org.apache.maven:super-pom:pom:2.0
2021-02-17T18:35:00.8434950Z   	2) org.robolectric:android-all:jar:5.0.2_r3-robolectric-r0
2021-02-17T18:35:00.8435428Z 
2021-02-17T18:35:00.8436010Z ----------
2021-02-17T18:35:00.8436470Z 1 required artifact is missing.
2021-02-17T18:35:00.8436788Z 
2021-02-17T18:35:00.8437146Z for artifact: 
2021-02-17T18:35:00.8437923Z   org.apache.maven:super-pom:pom:2.0
2021-02-17T18:35:00.8438297Z 
2021-02-17T18:35:00.8438978Z from the specified remote repositories:
2021-02-17T18:35:00.8440124Z   central (http://repo1.maven.org/maven2),
2021-02-17T18:35:00.8441055Z   sonatype (https://oss.sonatype.org/content/groups/public/)

@st3fan
Copy link
Contributor Author

st3fan commented Feb 17, 2021

I switched to JDK 1.8 instead of 11 and that seems to have gotten rid of the weird failures (SSL related and those tests for LG and Samsung). What is left are now these:

2021-02-17T19:42:48.4077082Z   TEST: Updating SearchFragmentState from SearchState - shortcuts disabled
2021-02-17T19:42:48.6064772Z   FAILURE

2021-02-17T19:42:48.8132793Z org.junit.ComparisonFailure: expected:<[Engine B]> but was:<[Google Test Engine]>
2021-02-17T19:42:49.0078634Z   TEST: Updating SearchFragmentState from SearchState
2021-02-17T19:42:49.1074987Z   FAILURE

2021-02-17T19:42:49.1076672Z org.junit.ComparisonFailure: expected:<[Engine B]> but was:<[Google Test Engine]>

What do you think @pocmo - these are fine on TaskCluster - what could make these run different on GitHub?

@st3fan
Copy link
Contributor Author

st3fan commented Feb 17, 2021

@pocmo is it possible that these tests depend on a GeoIP lookup and that the GitHub actions run in a different country than Task Cluster? Just a random guess ...

@st3fan
Copy link
Contributor Author

st3fan commented Feb 18, 2021

Fix for failing tests at #18048 - when that lands, rebase this patch and it is ready to land.

@st3fan st3fan merged commit 6270c8d into master Feb 18, 2021
@bors bors bot deleted the st3fan/workflow branch February 18, 2021 17:02
pkirakosyan pushed a commit to gexsi/user-agent-android that referenced this pull request Aug 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants