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

fix: use correct parallel build count #509

Closed
wants to merge 57 commits into from

Commits on Sep 6, 2024

  1. Configuration menu
    Copy the full SHA
    dc1928f View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. feat: add initial FetchService skeleton (#7)

    This sets the expected API that clients (the Application) will use:
    
    - Creating a fetch-service is done in setup();
    - Sessions are created with create_session(), which receives a managed
      instance because we'll need it to figure out the network gateway;
    - Sessions are destroyed with teardown_session();
    - Stopping the fetch-service is done with shutdown().
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    22909db View commit details
    Browse the repository at this point in the history
  2. feat: start the fetch-service (#8)

    Add a set of utility functions so that FetchService.setup() will spawn a
    fetch-service if necessary. These utility functions include a function to
    get the service's (json) status, and a function to tell whether the service
    is up.
    
    Use the $SNAP_USER_COMMON location for the fetch-service snap as a base for
    the 'config' and 'spool' subdirectories.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    ff76bb5 View commit details
    Browse the repository at this point in the history
  3. feat: create/teardown fetch-service sessions (#9)

    Session credentials are stored to be used (in the near future) when setting up
    the http/https proxies. When closing the session, the report obtained from the
    fetch-service is discarded (for now, until we figure out what to do with it).
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    a047ae4 View commit details
    Browse the repository at this point in the history
  4. feat: configure build instances for fetch-service (#11)

    This configuration happens when creating the session. Currently we:
    
    - Install the local certificate (added to this repo)
    - Configure pip, snapd and apt
    - Refresh apt's package listings to ensure all installations are traceable
      by the fetch-service
    
    This initial implementation *always* refreshes apt listings, even if the
    project build won't use them (e.g. no stage- or build- packages). In the
    future we'll be smarter about this. The implementation also only supports
    LXD instances, just because we need to figure out the instance's gateway
    address and only the LXD work for that has been done so far. In the future
    we can support all instance types with a cleaner craft-providers API.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    bdb374c View commit details
    Browse the repository at this point in the history
  5. fix: set REQUESTS_CA_BUNDLE for the fetch-service env. (#16)

    This variable points to the local-ca.crt self-signed certificate, effectively
    telling requests to trust that certificate when negotiating https requests.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    6bcddf9 View commit details
    Browse the repository at this point in the history
  6. feat: generate the fetch-service certificate

    Recent versions of the fetch-service not longer come with a fixed, "built-in"
    certificate. Instead, clients are expected to generate their own. To do this,
    we use a location that is shared among all Craft applications - the key and
    certificate are generated if not found, and are otherwise shared by all
    instances of all applications.
    
    Fixes #21
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    8c1096d View commit details
    Browse the repository at this point in the history
  7. fix: set CARGO_HTTP_CAINFO for the fetch-service env

    This lets cargo allow our self-signed certificate when making https requests
    to its registry.
    
    Fixes #20
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    5a369df View commit details
    Browse the repository at this point in the history
  8. chore(test): set correct deb mimetype back

    Now that the fetch-service's bug is fixed we can revert our temporary
    change
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    ae025ad View commit details
    Browse the repository at this point in the history
  9. feat: dump the fetch-service report

    This is temporary - in the near future we'll use the in-memory report to
    generate a 'proper' manifest, but for now this lets us at least have something
    to inspect/validate.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    d521195 View commit details
    Browse the repository at this point in the history
  10. feat(fetch): default to creating permissive sessions

    The strict mode is not yet implemented fully, so until further notice we should
    create permissive sessions.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    33595c0 View commit details
    Browse the repository at this point in the history
  11. fix: use fetch-service's common dir for certificate

    The snap's current confinement does not let it access the user's home files,
    so <home>/.local/... is inaccessible.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    5827eeb View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    b6caa9c View commit details
    Browse the repository at this point in the history
  13. feat: always shutdown the fetch-service

    There seems to be a bug currently with creating consecutive sessions, so for
    now let's always shut down the fetch-service after the managed run is done.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    b7355b5 View commit details
    Browse the repository at this point in the history
  14. chore: redirect output of 'apt update'

    With an open_stream() the output shows up in a single, updating line in brief
    mode. This output is useful because the call takes a while.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    15b3c1d View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9a6d450 View commit details
    Browse the repository at this point in the history
  16. fix: better error if the fetch-service is missing (#55)

    This implementation checks the presence of the fetch-service snap through the
    hardcoded path (/snap/bin/fetch-service). If, in the future, we need a more
    sophisticated approach we can copy craft-provider's logic for checking the
    lxd snap through snapd's api.
    
    Fixes #36
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    a70bf86 View commit details
    Browse the repository at this point in the history
  17. feat: add an argument to enable the fetch service (#53)

    With this commit the fetch-service service is disabled by default; the way
    to enable it is through a new "--use-fetch-service" command line parameter.
    
    This new parameter is initiallly only available to the "pack" command, as
    the cache-clearing that the service needs precludes the use of other
    lifecycle commands, and the manifest that the application will create based
    on the fetch-service's session report is only produced during packing.
    
    Fixes #15
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    ef85eee View commit details
    Browse the repository at this point in the history
  18. feat: proper logging for the fetch-service (#56)

    This commit redirects the output of the fetch-service to a file. Since we plan
    to have the fetch-service outlive the application that spawned it, we need to
    use bash to redirect the fetch-service's output to a file in a way that
    persists after the application ends.
    
    Fixes #51
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    c9ccccf View commit details
    Browse the repository at this point in the history
  19. chore: disable port conflict test (#64)

    Test is failing due to canonical/fetch-service#208;
    once that's fixed we can revert this commit. Note that only one of the ports
    is failing; the proxy port is still giving the expected error output.
    tigarmo committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    c8e923a View commit details
    Browse the repository at this point in the history
  20. docs(changelog): add release notes for 4.1.3 (#459)

    Signed-off-by: Callahan Kovacs <callahankovacs@gmail.com>
    mr-cal authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    1ae919c View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5be3430 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. chore: merge release 4.1.3 into main (#460)

    chore: merge release 4.1.3 into main
    tigarmo authored Sep 13, 2024
    Configuration menu
    Copy the full SHA
    1216017 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a66b217 View commit details
    Browse the repository at this point in the history
  3. chore: merge 4.2.1 to main

    lengau authored Sep 13, 2024
    Configuration menu
    Copy the full SHA
    2d7805a View commit details
    Browse the repository at this point in the history
  4. chore: factor run logic outside of try block

    This allows applications to override the inner run logic, with the end
    goal of capturing application specific exceptions and raise
    appropriate ones for Craft Application to handle.
    
    Without the logic split, overriding run to capture exceptions is
    virtually impossible as the run method holds a generic Exception
    handler.
    
    Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
    sergiusens committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    ac73285 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    41b699e View commit details
    Browse the repository at this point in the history
  6. chore: merge 4.2.2 to main

    lengau authored Sep 13, 2024
    Configuration menu
    Copy the full SHA
    8ac3f3d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d872bfd View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. feat(provider): add a way to clean existing instances

    This new parameter to ProviderService.instance() defaults to False and, if
    True, will cause the service to clean a pre-existing instance and create a
    new one.
    tigarmo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ba3be78 View commit details
    Browse the repository at this point in the history
  2. feat: wipe existing instances when using the fetch-service

    This is necessary because the fetch-service needs visibility on *all* assets
    downloaded during a build, so pre-existing instances that might already have
    existing items cannot be re-used.
    
    Fixes #40
    tigarmo committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    e931a59 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. feat: set the fetch-service to idle shutdown

    Set it to shutdown after 5 minutes of no live sessions.
    tigarmo committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    e546fae View commit details
    Browse the repository at this point in the history
  2. feat(docs): update partitions docs (#475)

    * feat: update partitions docs & fix autobuild path
    
    * Apply suggestions from code review
    
    * Apply suggestions from code review
    
    Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com>
    
    * fix(docs): use Michael's suggested text
    
    Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com>
    
    * Update docs/howto/partitions.rst
    
    Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
    
    * docs: update other reference w/ Sergio's suggestion
    
    Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
    
    ---------
    
    Co-authored-by: Michael DuBelko <michael.dubelko@gmail.com>
    Co-authored-by: Sergio Schvezov <sergio.schvezov@canonical.com>
    3 people authored Sep 18, 2024
    Configuration menu
    Copy the full SHA
    d448c44 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2834d9 View commit details
    Browse the repository at this point in the history
  4. chore: merge 4.2.3 to main

    lengau authored Sep 18, 2024
    Configuration menu
    Copy the full SHA
    616b3f0 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. feat: models for the craft manifest (#473)

    There are three new models:
    
    - ProjectManifest, representing the metadata from the project itself and its
      built artifact;
    - SessionArtifactManifest, representing the metadata for a single asset that
      was downloaded during the fetch-service session;
    - CraftManifest, that ties the first two together and provides the full view
      of assets downloaded and generated by a build.
    
    ---------
    
    Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
    tigarmo and lengau authored Sep 19, 2024
    Configuration menu
    Copy the full SHA
    575ac20 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. feat: generate project manifest in managed runs

    Add a create_project_manifest() method to the FetchService that, when running
    in managed mode, creates the yaml for the project metadata in a path that will
    be later accessed by the host-side service to create the "full" craft manifest.
    tigarmo committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    e258642 View commit details
    Browse the repository at this point in the history
  2. feat: create the final craft manifest

    When running with the fetch-service integration enabled, the FetchService
    service will generate a manifest file containing both metadata about the
    packed artifact (from the project and the artifact itself) and about the
    dependencies that were downloaded during the build (from the fetch-service
    session report).
    tigarmo committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    60f3188 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e3e079f View commit details
    Browse the repository at this point in the history
  4. chore(merge): 4.2.4 into main

    lengau authored Sep 20, 2024
    Configuration menu
    Copy the full SHA
    cb8197e View commit details
    Browse the repository at this point in the history
  5. feat: support "--platform" for "clean"

    This brings 'clean' closer to parity with the other lifecycle commands, and is
    useful for cases where we want to wipe one of the managed instances, but not
    all of them.
    
    Fixes #425
    tigarmo committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    07e89de View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. feat: set GOPROXY=direct in fetch-service runs (#489)

    The value makes Go download directly from version-controlled repositories,
    instead of module proxies like the default https://proxy.golang.org. It's
    currently a requirement for the Go inspector.
    tigarmo authored Sep 24, 2024
    Configuration menu
    Copy the full SHA
    c971a60 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. feat: allow strict/permissive fetch-service sessions (#490)

    '--use-fetch-service' now takes a mandatory argument defining the type of
    session to use: "strict" or "permissive".
    
    Fixes #487
    tigarmo authored Sep 25, 2024
    Configuration menu
    Copy the full SHA
    d327e60 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    63ff3d0 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Configuration menu
    Copy the full SHA
    0b10cf6 View commit details
    Browse the repository at this point in the history
  2. feat: mark the fetch-service integration as experimental (#496)

    By "mark" we mean:
    
    - hide the command-line option from pack's help;
    - if enabled, warn that this integration is still in development.
    
    Fixes #488
    tigarmo authored Oct 1, 2024
    Configuration menu
    Copy the full SHA
    327ff94 View commit details
    Browse the repository at this point in the history
  3. feat: add craft-platforms compatibility methods (#495)

    Also warns about some pending deprecations.
    lengau authored Oct 1, 2024
    Configuration menu
    Copy the full SHA
    3bd339c View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. Configuration menu
    Copy the full SHA
    8b2b8f3 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Configuration menu
    Copy the full SHA
    8b46697 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c3829a View commit details
    Browse the repository at this point in the history
  3. chore: autoformat

    mattculler committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    3fdc863 View commit details
    Browse the repository at this point in the history
  4. docs: add to changelog

    mattculler committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    72ac884 View commit details
    Browse the repository at this point in the history
  5. Update pyproject.toml

    Co-authored-by: Alex Lowe <alex.lowe@canonical.com>
    mattculler and lengau authored Oct 7, 2024
    Configuration menu
    Copy the full SHA
    cb3ceef View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. Configuration menu
    Copy the full SHA
    23b8142 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8567282 View commit details
    Browse the repository at this point in the history
  3. chore: autoformat

    mattculler committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    90507ae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cd2c9a4 View commit details
    Browse the repository at this point in the history