Skip to content
Snippets Groups Projects
  1. Dec 19, 2024
    • Hao Hu's avatar
      fix(renovate)!: prioritise `packageName` over `depName` · 20a77d8b
      Hao Hu authored and Jamie Tanna's avatar Jamie Tanna committed
      When deriving the underlying `package_name` for the Renovate datasource,
      we've been using `depName` from the underlying package data exports.
      
      For most cases, this gives us exactly what we want, but in some cases,
      this presents a different a different `package_name`, as the `depName`
      is generally intended to be for the "pretty" name for a package.
      
      For instance:
      
          {
            "depType": "plugin",
            "depName": "org.sonarqube",
            "packageName": "org.sonarqube:org.sonarqube.gradle.plugin",
            "currentValue": "3.3",
            "datasource": "maven",
            "packageScope": "org.sonarqube",
            "currentVersion": "3.3",
            "isSingleVersion": true,
            "fixedVersion": "3.3"
          }
      
      To correct this, we can make sure we now prioritise `packageName`.
      
      This requires a bump of `compatible_since`, as this is a change to the
      way that the data is derived, and may incur breakages to existing users'
      queries.
  2. Dec 13, 2024
  3. Dec 10, 2024
  4. Dec 09, 2024
  5. Dec 08, 2024
    • Jamie Tanna's avatar
      feat(renovate-packagedata-diff): create CLI for semantic diffs · fb906bf3
      Jamie Tanna authored
      As a way to provide a more useful way to understand what's changed
      between exports of Renovate data - via `renovate-graph` or our other
      supported formats, we should introduce a separate cli,
      `renovate-packagedata-diff`.
      
      This could be used to i.e.:
      
      - see what changes are coming in as part of a PR/MR
      - summarise changes in `git diff` outputs for projects that source-track
        their `renovate-graph` exports
      - wire into CI to i.e. raise warnings when changing important
        dependencies
      
      It makes sense to be part of dependency-management-data, rather than
      `renovate-graph`, as we already have some good understanding of the
      structure here, and can provide a more convenient output format.
      
      Additionally, producing a Go binary will be more convenient i.e. for CI
      builds.
      
      This should - at least medium term - also produce a stable JSON response
      output, which can be used for scripting.
      
      For now, we will only provide a human-readable summary.
      
      At some point, we may also expose this as part of a Go API.
      
      To do this, we need to:
      
      - create a new CLI
        - which can provide `--debug` logging
      - present the output to the user, in a tabular, colourised fashion
      - handle being called ad-hoc or as a `GIT_EXTERNAL_DIFF` tool
      - create a new `CompareFiles` function, which orchestrates the overall
        diffing between two package dumps
      - perform the difficult job of determining which modifications are
        actually modifications, and not presenting as addition/deletion
      - wire in the command to `gendoc`
      
      Note that there is a fair bit of inline code commentary, and areas which
      look a little "spooky" but don't have comments could be that in the time
      it's taken to finish implementation have since been forgotten, or test
      cases lost.
      
      There are test cases in the -example project, under
      `/renovate-packagedata-diff`.
      
      Closes #616.
      fb906bf3
    • Jamie Tanna's avatar
      chore(renovate): store the `ParsingSource` · 89340058
      Jamie Tanna authored
      As we now track some `Metadata` for the parsed Renovate data, we can
      also track what the underlying source of data is, for other purposes.
      
      We can use a `map` to create a Set of `ParsingSource`s, to ensure that
      it's a valid type.
      
      We also need to wire this in now, as it's used across all parsing types.
      89340058
    • Jamie Tanna's avatar
      chore(renovate): parse the `major` version · b3347918
      Jamie Tanna authored
      As part of #616, we want to flag differences in major version of
      Renovate.
      
      To do so, we should parse this out of the Renovate data, where available.
      
      This is a step towards #36.
      b3347918
    • Jamie Tanna's avatar
      chore(renovate): add a named struct for `packageDataDependency` · 73794e08
      Jamie Tanna authored
      Instead of using an unnamed struct, which can be awkward to instantiate,
      we should instead use a named type.
      73794e08
    • Jamie Tanna's avatar
      chore(domain): add `RepoKey.Equals` · 981e8e39
      Jamie Tanna authored
      As it's going to be useful as part of future commits.
      981e8e39
  6. Nov 21, 2024
    • Jamie Tanna's avatar
      fix(telemetry): ensure `span.End` is called where appropriate · 720f8555
      Jamie Tanna authored
      Thanks to Yannic on the Gopher Slack for suggesting using the
      `spancheck` linter.
      
      There are a few places where we weren't correctly calling `span.End()`,
      or that `spancheck` thought we weren't calling it, and needs to be
      explicitly told to ignore it.
      720f8555
  7. Nov 18, 2024
Loading