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

Enhance GitHub workflows (handle Dependabot, etc.) #983

Merged
merged 19 commits into from
Nov 28, 2022

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Dec 15, 2021

Fixes #847

Features :

  • Keep the Boosted method with the skip labels (But should be less used now).
  • Remove dependabot branches by the actor dependabot itself.
  • Move the checks at a job level.
  • Dependabot ci could be triggered by any user action on the PR (adding a label).
  • Removed the optimize dupe workflow on Boosted.

Note :

  • top-level triggers such as push or pull_request are in a OR statement. That means that either will trigger action. On the other side (and I'm sorry, I misunderstood this at first) the branches, tags or paths are in a AND statement. That means that a worflow will trigger if the changes are in a specified path AND on a specified branch. (link)
  • The pull_request trigger branches is the base branch, so that's why former workflow was not ignoring it.
  • The different types of pull_requests are here.
  • Doesn't cause any issue atm but workflow-dispatch could have issues in the future, triggering the workflow manually with the skip:ci label activatede. (IF conditions in step is ignored when called in a workflow_call actions/runner#2005)

@julien-deramond julien-deramond added enhancement github_actions Pull requests that update Github_actions code v5 labels Dec 15, 2021
@julien-deramond julien-deramond changed the title fix(githubWorkflows): Tries Enhance GitHub workflows (handle Dependabot, etc.) Dec 20, 2021
@louismaximepiton louismaximepiton marked this pull request as ready for review December 20, 2021 11:40
@julien-deramond
Copy link
Member

@louismaximepiton Apparently Bootstrap is working on this topic as well via twbs/bootstrap#35574. Maybe to compare with what you've done so far.

@julien-deramond
Copy link
Member

julien-deramond commented Dec 22, 2021

@louismaximepiton Since we're waiting to see what Bootstrap will do with Dependabot, is it possible to extract in an another PR your work on Percy (Browserstack) to run it automatically for main && v4-dev and manually for pushes and PRs? IMO it could be reviewed/merged independently.

Note: For the "manual" workflows with Percy and Browserstack, we'll need to update the DoDs to explain how to update the snapshots after each merges.

@XhmikosR
Copy link

What's the issue with dependabot exactly? Trying to understand if we are missing something upstream.

I still need some help with BrowserStack and PRs, but other than the twbs/bootstrap#35574 is ready to be merged.

@julien-deramond
Copy link
Member

What's the issue with dependabot exactly? Trying to understand if we are missing something upstream.

I still need some help with BrowserStack and PRs, but other than the twbs/bootstrap#35574 is ready to be merged.

@XhmikosR We are still discussing it but we plan to do something like that:

  • Basically it is very handy to know when the dependencies need to be updated but we want to stop launching the jobs automatically from Dependabot PRs because:
    • Most of the time we are waiting for you (Bootstrap) to update the dependencies to avoid conflicts
    • For our unique dependencies like pa11y-ci (and some others) I still need to check it manually (I never merge directly from the Dependabot PRs or rarely)
    • It slows down everything when it re-runs jobs while pushing real PRs or branches in the meantime
    • We have a limited amount of Browserstack / Percy runs and snapshots each month
  • Run manually Percy when needed (and maybe Browserstack as well) just before merging a PR
  • Run automatically Percy and Browserstack only for the main branch (and maybe v4-dev)

We also have skip:browserstack, skip:ci etc. labels to avoid some actions to be run but it is not really automatic and not enough. We also thought using our skip:ci label on all Dependabot PRs (a bit uglier than to tackle the real problem :p)

@julien-deramond
Copy link
Member

This PR needs a rebase after the merge of #1004

Signed-off-by: louismaximepiton <louismaxime.piton@orange.com>
@netlify
Copy link

netlify bot commented Jul 4, 2022

Deploy Preview for boosted ready!

Name Link
🔨 Latest commit c5f2cce
🔍 Latest deploy log https://app.netlify.com/sites/boosted/deploys/63847a20eb445d000895557d
😎 Deploy Preview https://deploy-preview-983--boosted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@julien-deramond
Copy link
Member

@louismaximepiton Is this PR still fixing the issue and up to date? Can it be reviewed?

@louismaximepiton louismaximepiton marked this pull request as ready for review November 25, 2022 09:50
Copy link
Member

@julien-deramond julien-deramond left a comment

Choose a reason for hiding this comment

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

Modifications seems logical. I won't try all the use cases myself. Trust you on this. Let's merge and see if it works as expected. 🚀 🤖

@sonarcloud
Copy link

sonarcloud bot commented Nov 28, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@julien-deramond julien-deramond merged commit 86c995f into main Nov 28, 2022
@julien-deramond julien-deramond deleted the main-lmp-github-workflows branch November 28, 2022 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement github_actions Pull requests that update Github_actions code v5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub Workflows - Ignoring Dependabot branches
3 participants