Skip to content

Commit b599baf

Browse files
authored
Dropped support for single-file actors
1 parent 336046f commit b599baf

File tree

5 files changed

+6
-47
lines changed

5 files changed

+6
-47
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Changelog
44
[0.6.0](../../releases/tag/v0.6.0) - 2022-06-27
55
-----------------------------------------------
66

7+
### Removed
8+
9+
- Dropped support for single-file actors
10+
711
### Internal changes
812

913
- updated dependencies

docs/docs.md

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ Return information about the actor version.
855855

856856
***
857857

858-
#### [](#actorversionclient-update) `ActorVersionClient.update(*, build_tag=None, env_vars=None, apply_env_vars_to_build=None, source_type=None, source_code=None, base_docker_image=None, source_files=None, git_repo_url=None, tarball_url=None, github_gist_url=None)`
858+
#### [](#actorversionclient-update) `ActorVersionClient.update(*, build_tag=None, env_vars=None, apply_env_vars_to_build=None, source_type=None, source_files=None, git_repo_url=None, tarball_url=None, github_gist_url=None)`
859859

860860
Update the actor version with specified fields.
861861

@@ -873,13 +873,6 @@ Update the actor version with specified fields.
873873

874874
* **source_type** ([`ActorSourceType`](#actorsourcetype), *optional*) – What source type is the actor version using.
875875

876-
* **source_code** (`str`, *optional*) – Source code as a single JavaScript/Node.js file,
877-
using the base Docker image specified in `baseDockerImage`.
878-
Required when `source_type` is [`ActorSourceType.SOURCE_CODE`](#actorsourcetype-source_code).
879-
880-
* **base_docker_image** (`str`, *optional*) – The base Docker image to use for single-file actors.
881-
Required when `source_type` is [`ActorSourceType.SOURCE_CODE`](#actorsourcetype-source_code).
882-
883876
* **source_files** (`list of dict`, *optional*) – Source code comprised of multiple files, each an item of the array.
884877
Required when `source_type` is [`ActorSourceType.SOURCE_FILES`](#actorsourcetype-source_files). See the API docs for the exact structure.
885878

@@ -939,7 +932,7 @@ List the available actor versions.
939932

940933
***
941934

942-
#### [](#actorversioncollectionclient-create) `ActorVersionCollectionClient.create(*, version_number, build_tag=None, env_vars=None, apply_env_vars_to_build=None, source_type, source_code=None, base_docker_image=None, source_files=None, git_repo_url=None, tarball_url=None, github_gist_url=None)`
935+
#### [](#actorversioncollectionclient-create) `ActorVersionCollectionClient.create(*, version_number, build_tag=None, env_vars=None, apply_env_vars_to_build=None, source_type, source_files=None, git_repo_url=None, tarball_url=None, github_gist_url=None)`
943936

944937
Create a new actor version.
945938

@@ -959,13 +952,6 @@ Create a new actor version.
959952

960953
* **source_type** ([`ActorSourceType`](#actorsourcetype)) – What source type is the actor version using.
961954

962-
* **source_code** (`str`, *optional*) – Source code as a single JavaScript/Node.js file,
963-
using the base Docker image specified in `baseDockerImage`.
964-
Required when `source_type` is [`ActorSourceType.SOURCE_CODE`](#actorsourcetype-source_code).
965-
966-
* **base_docker_image** (`str`, *optional*) – The base Docker image to use for single-file actors.
967-
Required when `source_type` is [`ActorSourceType.SOURCE_CODE`](#actorsourcetype-source_code).
968-
969955
* **source_files** (`list of dict`, *optional*) – Source code comprised of multiple files, each an item of the array.
970956
Required when `source_type` is [`ActorSourceType.SOURCE_FILES`](#actorsourcetype-source_files). See the API docs for the exact structure.
971957

@@ -2909,20 +2895,13 @@ Actor job aborted by user
29092895

29102896
Available source types for actors.
29112897

2912-
* [SOURCE\_CODE](#actorsourcetype-source\_code)
29132898
* [SOURCE\_FILES](#actorsourcetype-source\_files)
29142899
* [GIT\_REPO](#actorsourcetype-git\_repo)
29152900
* [TARBALL](#actorsourcetype-tarball)
29162901
* [GITHUB\_GIST](#actorsourcetype-github\_gist)
29172902

29182903
***
29192904

2920-
#### [](#actorsourcetype-source_code) `ActorSourceType.SOURCE_CODE`
2921-
2922-
Actor source code is a single JavaScript/Node.js file
2923-
2924-
***
2925-
29262905
#### [](#actorsourcetype-source_files) `ActorSourceType.SOURCE_FILES`
29272906

29282907
Actor source code is comprised of multiple files

src/apify_client/clients/resource_clients/actor_version.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ def update(
3030
env_vars: Optional[List[Dict]] = None,
3131
apply_env_vars_to_build: Optional[bool] = None,
3232
source_type: Optional[ActorSourceType] = None,
33-
source_code: Optional[str] = None,
34-
base_docker_image: Optional[str] = None,
3533
source_files: Optional[List[Dict]] = None,
3634
git_repo_url: Optional[str] = None,
3735
tarball_url: Optional[str] = None,
@@ -48,11 +46,6 @@ def update(
4846
apply_env_vars_to_build (bool, optional): Whether the environment variables specified for the actor run
4947
will also be set to the actor build process.
5048
source_type (ActorSourceType, optional): What source type is the actor version using.
51-
source_code (str, optional): Source code as a single JavaScript/Node.js file,
52-
using the base Docker image specified in ``baseDockerImage``.
53-
Required when ``source_type`` is ``ActorSourceType.SOURCE_CODE``.
54-
base_docker_image (str, optional): The base Docker image to use for single-file actors.
55-
Required when ``source_type`` is ``ActorSourceType.SOURCE_CODE``.
5649
source_files (list of dict, optional): Source code comprised of multiple files, each an item of the array.
5750
Required when ``source_type`` is ``ActorSourceType.SOURCE_FILES``. See the API docs for the exact structure.
5851
git_repo_url (str, optional): The URL of a Git repository from which the source code will be cloned.
@@ -74,10 +67,6 @@ def update(
7467
version_fields['applyEnvVarsToBuild'] = apply_env_vars_to_build
7568
if source_type is not None:
7669
version_fields['sourceType'] = _maybe_extract_enum_member_value(source_type)
77-
if source_code is not None:
78-
version_fields['sourceCode'] = source_code
79-
if base_docker_image is not None:
80-
version_fields['baseDockerImage'] = base_docker_image
8170
if source_files is not None:
8271
version_fields['sourceFiles'] = source_files
8372
if git_repo_url is not None:

src/apify_client/clients/resource_clients/actor_version_collection.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ def create(
3131
env_vars: Optional[List[Dict]] = None,
3232
apply_env_vars_to_build: Optional[bool] = None,
3333
source_type: ActorSourceType,
34-
source_code: Optional[str] = None,
35-
base_docker_image: Optional[str] = None,
3634
source_files: Optional[List[Dict]] = None,
3735
git_repo_url: Optional[str] = None,
3836
tarball_url: Optional[str] = None,
@@ -50,11 +48,6 @@ def create(
5048
apply_env_vars_to_build (bool, optional): Whether the environment variables specified for the actor run
5149
will also be set to the actor build process.
5250
source_type (ActorSourceType): What source type is the actor version using.
53-
source_code (str, optional): Source code as a single JavaScript/Node.js file,
54-
using the base Docker image specified in ``baseDockerImage``.
55-
Required when ``source_type`` is ``ActorSourceType.SOURCE_CODE``.
56-
base_docker_image (str, optional): The base Docker image to use for single-file actors.
57-
Required when ``source_type`` is ``ActorSourceType.SOURCE_CODE``.
5851
source_files (list of dict, optional): Source code comprised of multiple files, each an item of the array.
5952
Required when ``source_type`` is ``ActorSourceType.SOURCE_FILES``. See the API docs for the exact structure.
6053
git_repo_url (str, optional): The URL of a Git repository from which the source code will be cloned.
@@ -78,10 +71,6 @@ def create(
7871
version_fields['applyEnvVarsToBuild'] = apply_env_vars_to_build
7972
if source_type is not None:
8073
version_fields['sourceType'] = _maybe_extract_enum_member_value(source_type)
81-
if source_code is not None:
82-
version_fields['sourceCode'] = source_code
83-
if base_docker_image is not None:
84-
version_fields['baseDockerImage'] = base_docker_image
8574
if source_files is not None:
8675
version_fields['sourceFiles'] = source_files
8776
if git_repo_url is not None:

src/apify_client/consts.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ def _is_terminal(self) -> bool:
3030
class ActorSourceType(str, Enum):
3131
"""Available source types for actors."""
3232

33-
#: Actor source code is a single JavaScript/Node.js file
34-
SOURCE_CODE = 'SOURCE_CODE'
3533
#: Actor source code is comprised of multiple files
3634
SOURCE_FILES = 'SOURCE_FILES'
3735
#: Actor source code is cloned from a Git repository

0 commit comments

Comments
 (0)