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

build: optimize GitHub Actions for building speed and stability #10485

Merged
merged 15 commits into from
Jul 31, 2020

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Jul 30, 2020

SUMMARY

  1. Upgrade actions/cache to the latest
  2. Upgrade actions/setup-python
  3. Disable cache for NPM and Pip since they don't seem to help much
  4. Enable parallelization for Cypress tests (need to configure record key)

Here is an example of a successful run when the record key is properly configured.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

Make sure CI passes

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@ktmud ktmud marked this pull request as ready for review July 30, 2020 20:57
@ktmud ktmud requested review from willbarrett, craig-rueda, etr2460 and john-bodley and removed request for willbarrett July 30, 2020 20:57
@@ -40,7 +40,7 @@ module.exports = {
},
npm: {
path: [`${homeDirectory}/.npm`],
hashFiles: ['superset-frontend/package-lock.json'],
hashFiles: [`${workspaceDirectory}/superset-frontend/package-lock.json`],
Copy link
Member Author

Choose a reason for hiding this comment

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

This cache was disabled but we are keeping the configuration anyway, in case there are other ways to make cache loading faster in the future.

The change here is to make sure we hash the same files wherever the cache step runs.

Copy link
Member

@nytai nytai 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 for fixing, this has been a pain point recently

local page=$1
local group=${2:-Default}
local cypress="./node_modules/.bin/cypress run"
local browser=${CYPRESS_BROWSER:-chrome}

export TERM="xterm"
Copy link
Member Author

Choose a reason for hiding this comment

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

Fix a warning in logs.

@@ -139,7 +134,7 @@ codecov() {
local codecovScript="${HOME}/codecov.sh"
# download bash script if needed
if [[ ! -f "$codecovScript" ]]; then
curl -s https://codecov.io/bash > "$codecovScript"
curl -s https://codecov.io/bash >"$codecovScript"
Copy link
Member Author

Choose a reason for hiding this comment

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

automatically reformatted by Prettier

build-assets
cache-save assets
fi
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Clean up a unused function

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2020

Codecov Report

Merging #10485 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10485   +/-   ##
=======================================
  Coverage   70.80%   70.80%           
=======================================
  Files         604      604           
  Lines       32426    32426           
  Branches     3414     3414           
=======================================
  Hits        22960    22960           
  Misses       9354     9354           
  Partials      112      112           
Flag Coverage Δ
#cypress 54.55% <ø> (ø)
#javascript 59.72% <ø> (ø)
#python 70.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/actions/sqlLab.js 62.60% <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 7a329c2...4583245. Read the comment docs.

Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

As a side note it would be good to couple these GitHub workflows with tox so users can run the same CI checks locally in a consistent manner.

I find local CI vital for test iteration, typing, linting, etc. Note I plan to couple pre-commit more tightly with tox to future reduce repetition and ensure consistency.

@ktmud ktmud merged commit 7ff1757 into apache:master Jul 31, 2020
@ktmud ktmud deleted the upgrade-ci branch July 31, 2020 05:28
JasonD28 pushed a commit to JasonD28/incubator-superset that referenced this pull request Aug 3, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants