Skip to content

Conversation

@Pijukatel
Copy link
Contributor

@Pijukatel Pijukatel commented Nov 25, 2025

To allow testing of multi-user test cases, such as sharing restricted access storage with another user.

Previously, such storage was permanently created, and thus user token was not needed. Someone from the organization deleted those storages :-(
So this setup was fragile, and we need to have the other token to create such storages on the fly.

Required by: apify/apify-client-python#543

@github-actions github-actions bot added this to the 128th sprint - Tooling team milestone Nov 25, 2025
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 25, 2025
@Pijukatel Pijukatel force-pushed the allow-second-token-integration-tests branch from 7f5a886 to 1558750 Compare November 25, 2025 13:49
@Pijukatel Pijukatel requested a review from vdusek November 25, 2025 13:57
@Pijukatel Pijukatel force-pushed the allow-second-token-integration-tests branch from 1558750 to ba97150 Compare November 25, 2025 13:59
@Pijukatel Pijukatel added the adhoc Ad-hoc unplanned task added during the sprint. label Nov 25, 2025
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.

Could we choose a name that emphasizes the purpose of this token rather than just calling it "second token"? APIFY_MULTIUSER_TEST_TOKEN? APIFY_SHARED_STORAGE_TEST_USER_TOKEN?

@Pijukatel
Copy link
Contributor Author

Could we choose a name that emphasizes the purpose of this token rather than just calling it "second token"? APIFY_MULTIUSER_TEST_TOKEN? APIFY_SHARED_STORAGE_TEST_USER_TOKEN?

I am not sure about it. The workflow repo is very generic. It is the downstream repos that decide what they use the env vars for. I would rather keep it as generic as possible here. Generic usecase is for example that this can be used not for multiuser tests or permissions test, but for tests that require different account settings than the usual test user has.

@Pijukatel Pijukatel requested a review from vdusek November 27, 2025 12:04
@janbuchar
Copy link
Contributor

janbuchar commented Nov 27, 2025

Random thought, feel free to ignore it if you already thought about it - couldn't the first token be used to create a secondary user account that would be deleted at the end of the test suite?

EDIT: it couldn't, there is no API endpoint that would allow this

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.

I am not sure about it. The workflow repo is very generic. It is the downstream repos that decide what they use the env vars for. I would rather keep it as generic as possible here. Generic usecase is for example that this can be used not for multiuser tests or permissions test, but for tests that require different account settings than the usual test user has.

Ok, thanks, let's merge it then

@Pijukatel Pijukatel merged commit b0b7eab into main Nov 27, 2025
2 of 3 checks passed
@Pijukatel Pijukatel deleted the allow-second-token-integration-tests branch November 27, 2025 15:57
Pijukatel added a commit to apify/apify-client-python that referenced this pull request Nov 28, 2025
### Description

- Update integration tests to create storage of the second user on the
fly
- Added token for test user with id: `RbWKSZSutvaNWffdJ` under this
secret `APIFY_TEST_USER_2_API_TOKEN`. This test user has restricted
permissions.

### Issues

- Closes: #542 
- Requires: apify/workflows#233
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants