Skip to content

Commit 71b5204

Browse files
authored
Merge pull request #527 from rstudio/kegs-build-running-state
Make it more unlikely for content builds to get stuck in a running state
2 parents cbbb5a1 + 7e31eff commit 71b5204

22 files changed

+711
-1139
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- Added the name of the environment variables to the help output for those options that
1111
use environment variables as a default value.
1212
- Added support for deploying Shiny Express applications.
13+
- Added a `--retry` flag to the `rsconnect content build run` command to re-run
14+
builds for all content in the NEEDS_BUILD, ABORTED, ERROR, or RUNNING state.
1315

1416
### Changed
1517
- Improved the error and warning outputs when options conflict by providing the source
@@ -19,6 +21,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1921
- Updated verbose mode to output the source of all options being used when processing the
2022
CLI command.
2123

24+
### Fixed
25+
- Interrupting a long-running `rsconnect content build run` command with `^C`
26+
will now update the local state file before attempting graceful cleanup. This
27+
should help prevent users from getting stuck a "build already running" state.
28+
See [#467](https://github.com/rstudio/rsconnect-python/issues/467) for details.
29+
2230
## [1.21.0] - 2023-10-26
2331

2432
### Fixed

Makefile

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,14 @@ ifneq ($(GITHUB_RUN_ID),)
1919
endif
2020

2121
TEST_ENV =
22+
TEST_ENV += CONNECT_CONTENT_BUILD_DIR="rsconnect-build-test"
2223

2324
ifneq ($(CONNECT_SERVER),)
2425
TEST_ENV += CONNECT_SERVER=$(CONNECT_SERVER)
2526
endif
2627
ifneq ($(CONNECT_API_KEY),)
2728
TEST_ENV += CONNECT_API_KEY=$(CONNECT_API_KEY)
2829
endif
29-
ifneq ($(CONNECT_CONTENT_BUILD_DIR),)
30-
TEST_ENV += CONNECT_CONTENT_BUILD_DIR=$(CONNECT_CONTENT_BUILD_DIR)
31-
endif
3230

3331
# NOTE: See the `dist` target for why this exists.
3432
SOURCE_DATE_EPOCH := $(shell date +%s)
@@ -49,16 +47,6 @@ shell-%:
4947
test-%:
5048
PYTHON_VERSION=$* $(RUNNER) '$(TEST_ENV) $(TEST_COMMAND)'
5149

52-
mock-test-%: clean-stores
53-
@$(MAKE) -C mock_connect image up
54-
@sleep 1
55-
trap "$(MAKE) -C mock_connect down" EXIT; \
56-
CONNECT_CONTENT_BUILD_DIR="rsconnect-build-test" \
57-
CONNECT_SERVER="http://$(HOSTNAME):3939" \
58-
CONNECT_API_KEY="0123456789abcdef0123456789abcdef" \
59-
$(MAKE) test-$*
60-
@$(MAKE) -C mock_connect down
61-
6250
fmt-%:
6351
$(RUNNER) 'black .'
6452

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,9 @@ Once the content items have been added, you may initiate a build
823823
using the `rsconnect content build run` subcommand. This command will attempt to
824824
build all "tracked" content that has the status `NEEDS_BUILD`.
825825
826+
> To re-run failed builds, use `rsconnect content build run --retry`. This will build
827+
all tracked content in any of the following states: `[NEEDS_BUILD, ABORTED, ERROR, RUNNING]`.
828+
826829
```bash
827830
rsconnect content build run
828831
# [INFO] 2021-12-14T13:02:45-0500 Initializing ContentBuildStore for https://connect.example.org:3939

mock_connect/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

mock_connect/Dockerfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

mock_connect/Makefile

Lines changed: 0 additions & 49 deletions
This file was deleted.

mock_connect/README.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

mock_connect/data.json

Lines changed: 0 additions & 162 deletions
This file was deleted.

mock_connect/mock_connect/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)