pocket-casts-android icon indicating copy to clipboard operation
pocket-casts-android copied to clipboard

Add dependency analysis step to default CI pipeline

Open mokagio opened this issue 1 year ago • 2 comments

Description

@MiSikora suggested running the dependency analysis check on every CI build, internal ref pdnsEh-1QL-p2, and there seemed to be appetite for it.

This draft PR aims to get the work started...

One argument against adopting this, and which I guess was the rationale for running the check on a schedule, is that it takes a good 10+ minutes to run. If this were to become a requirement for the PR to be merged, it might slow down the dev cycle.

image

Having said that, it's something that would be easy to try to find out directly, and revert if necessary.

Implemented

  • Add the check to the default pipeline, that is, run the check on every standard CI build

To Do

  • Update the configuration to be as strict as possible – I don't actually know if that's required but the wording of the request made me think so. Plugin docs https://github.com/autonomousapps/dependency-analysis-gradle-plugin/wiki/Customizing-plugin-behavior
  • Moving the check to run on every build makes the existing schedule redundant, so I would suggest removing it. This is a two step task:
    • Remove from this repo
    • Remove the schedule configuration on the Buildkite end
  • If/when this PR lands on main, update the GitHub configuration to require the "Dependency Analysis" step check

Testing Instructions

See CI build: TBD

Screenshots or Screencast

Checklist

  • [x] If this is a user-facing change, I have added an entry in CHANGELOG.md
  • [x] Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • [x] I have considered whether it makes sense to add tests for my changes
  • [x] All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • [x] Any jetpack compose components I added or changed are covered by compose previews
  • [x] I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

I have tested any UI changes...

  • [x] with different themes
  • [x] with a landscape orientation
  • [x] with the device set to have a large display and font size
  • [x] for accessibility with TalkBack

mokagio avatar Sep 09 '24 02:09 mokagio

1 Message
:book: This PR is still a Draft: some checks will be skipped.

Generated by :no_entry_sign: Danger

dangermattic avatar Sep 09 '24 02:09 dangermattic

📲 You can test the changes from this Pull Request in 📱 Mobile by scanning the QR code below to install the corresponding build.
App Name 📱 Mobile
Build TypedebugProd
Commite1b80236aaaf6fe692e021bdc9c9c399ebefe3af
Direct Downloadpocketcasts-app-prototype-build-pr2815-e1b8023.apk
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
App Name 🚗 Automotive
Build TypedebugProd
Commite1b80236aaaf6fe692e021bdc9c9c399ebefe3af
Direct Downloadpocketcasts-automotive-prototype-build-pr2815-e1b8023.apk
📲 You can test the changes from this Pull Request in ⌚ Wear by scanning the QR code below to install the corresponding build.
App Name ⌚ Wear
Build TypedebugProd
Commite1b80236aaaf6fe692e021bdc9c9c399ebefe3af
Direct Downloadpocketcasts-wear-prototype-build-pr2815-e1b8023.apk

wpmobilebot avatar Sep 09 '24 02:09 wpmobilebot

Just a thought: wouldn't it be better to run it inside GH Actions? This way it won't occupy any of our Buildkite workers. Or do we want to use Builtkite for mostly everything? I'm not really sure when do we use GH Actions and when do we use Buildkite.

MiSikora avatar Sep 09 '24 07:09 MiSikora

Just a thought: wouldn't it be better to run it inside GH Actions? This way it won't occupy any of our Buildkite workers. Or do we want to use Builtkite for mostly everything? I'm not really sure when do we use GH Actions and when do we use Buildkite.

Our approach is to use Buildkite whenever we can as Buildkite workers are more performant and we have working configuration for collecting metrics from Buildkite.

We use GH Actions only when the benefits of using GH are high: e.g. for uploading Gradle dependencies to GitHub there is a first-class Gradle GitHub Action that handles both Gradle and GitHub API part for us. It's also not vital for performance, as resolving dependency graph is not that resource-consuming.

For dependency analysis I'd suggest we keep using Buildkite because we both need strong performance and we collect data from these builds.

wzieba avatar Sep 12 '24 13:09 wzieba

After discussing this, we are not going to move forward with enabling this one every PR, not just yet. It is being too expensive for little benefit (ie. few PRs have the potential for such dependency related changes). But, we'll keep iterating on what's the best way to further integrate dependency analysis into our workflows, potentially blocking a PR from merging when a new advise presents itself (pdnsEh-1QL-p2#comment-4158).

ParaskP7 avatar Sep 27 '24 11:09 ParaskP7