Skip to content

Conversation

@stepskop
Copy link
Contributor

@stepskop stepskop commented Nov 25, 2025

This adds the ACTOR_PERMISSION_LEVEL environmental variable as actor_permission_level to the Configuration,

Closes #690

@stepskop stepskop self-assigned this Nov 25, 2025
@stepskop stepskop added the t-core-services Issues with this label are in the ownership of the core services team. label Nov 25, 2025
Copy link
Contributor Author

Choose a reason for hiding this comment

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

😅

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as for JS SDK...
I am not sure if this should not be somehow conditional, as most of the time it would be defined only when run on Apify. Locally, it won't be defined if the user doesn't do so.

However, I can imagine some cases when my code depends on the permission level, so I am passing it "artificially" even locally to test things out.

Copy link
Contributor

@danpoletaev danpoletaev left a comment

Choose a reason for hiding this comment

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

Same as for JS SDK, consider moving log message to worker 🙃

Comment on lines 68 to 69
'actor_permission_level',
'apify_actor_permission_level',
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it really make sense to have multiple choices for a newly introduced variable? The aliases exist mainly for compatibility with outdated documentation 😁

Copy link
Contributor Author

@stepskop stepskop Nov 27, 2025

Choose a reason for hiding this comment

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

Actually, I wasn't sure how the name was inferred, so it was just to be sure 😅.

So in this case, the actor_permission_level should be enough, right?

The name of the env var is ACTOR_PERMISSION_LEVEL and it is part of ActorEnvVars in apify-shared-python.

https://github.com/apify/apify-shared-python/blob/782a8334e2d0e5de38aa28e10f4f1f1038497955/src/apify_shared/consts.py#L136

e.g.: I assume that it won't be prefixed.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, we can keep just actor_permission_level and drop apify_actor_permission_level

Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

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

lgtm

@stepskop stepskop merged commit 68012c7 into master Nov 28, 2025
25 checks passed
@stepskop stepskop deleted the feat/actor-permission-level-env-var branch November 28, 2025 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-core-services Issues with this label are in the ownership of the core services team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read ACTOR_PERMISSION_LEVEL envvar

5 participants