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

feat(remote-build): new command logic #4395

Merged
merged 12 commits into from
Oct 6, 2023
Merged

feat(remote-build): new command logic #4395

merged 12 commits into from
Oct 6, 2023

Conversation

mr-cal
Copy link
Collaborator

@mr-cal mr-cal commented Oct 6, 2023

  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint?
  • Have you successfully run pytest tests/unit?

  • Migrate the command logic used to orchestrate a remote build.
    • Some of this code was moved to a new class, RemoteBuild
  • Store a copy of the project directory in the local cache
  • Clean up the cache after a build completes
  • Typing and linting updates

Builds on #4390, so "only" the last 8 commits are for this PR (update: #4390 was landed and this PR is rebased onto main). The new remote-build should be functional, so I encourage you to give it try.

Fixes #4324
(CRAFT-1979)

@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2023

Codecov Report

Merging #4395 (84f1f3e) into main (5d19d28) will increase coverage by 0.05%.
The diff coverage is 97.88%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main    #4395      +/-   ##
==========================================
+ Coverage   89.11%   89.16%   +0.05%     
==========================================
  Files         320      321       +1     
  Lines       21469    21606     +137     
==========================================
+ Hits        19132    19266     +134     
- Misses       2337     2340       +3     
Files Coverage Δ
snapcraft/commands/remote.py 98.77% <100.00%> (+0.43%) ⬆️
snapcraft/legacy_cli.py 55.55% <100.00%> (ø)
snapcraft/remote/__init__.py 100.00% <100.00%> (ø)
snapcraft/remote/errors.py 100.00% <100.00%> (ø)
snapcraft/remote/git.py 100.00% <100.00%> (ø)
snapcraft/remote/remote_builder.py 100.00% <100.00%> (ø)
snapcraft/remote/utils.py 96.07% <100.00%> (+2.74%) ⬆️
snapcraft/remote/launchpad.py 87.40% <92.59%> (-0.54%) ⬇️
snapcraft/remote/worktree.py 88.88% <91.30%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

snapcraft/commands/remote.py Outdated Show resolved Hide resolved
snapcraft/commands/remote.py Outdated Show resolved Hide resolved
snapcraft/commands/remote.py Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
snapcraft/remote/utils.py Show resolved Hide resolved
snapcraft/remote/worktree.py Outdated Show resolved Hide resolved
Copy link
Contributor

@lengau lengau left a comment

Choose a reason for hiding this comment

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

I've made two suggestions about typing in launchpad.py, but I haven't actually tried them to know whether both mypy and pyright will behave with them, and frankly there's no need for them.

snapcraft/remote/launchpad.py Show resolved Hide resolved
snapcraft/remote/launchpad.py Outdated Show resolved Hide resolved
Signed-off-by: Callahan Kovacs <[email protected]>
Signed-off-by: Callahan Kovacs <[email protected]>
@lengau lengau self-requested a review October 6, 2023 21:25
@sergiusens sergiusens merged commit 2e06475 into main Oct 6, 2023
8 checks passed
@sergiusens sergiusens deleted the remote-build-cli branch October 6, 2023 22:35
Copy link
Contributor

@cmatsuoka cmatsuoka left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remote-build: new command logic
5 participants