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

Make permission tests compatible with minio-js version 8.0.0 #3322

Closed
kaankabalak opened this issue Apr 30, 2024 · 0 comments · Fixed by #3323
Closed

Make permission tests compatible with minio-js version 8.0.0 #3322

kaankabalak opened this issue Apr 30, 2024 · 0 comments · Fixed by #3323
Assignees
Labels
bug this needs to be fixed javascript Pull requests that update Javascript code triage

Comments

@kaankabalak
Copy link
Contributor

NOTE

If this case is urgent, please subscribe to SUBNET so that our 24/7 support team may help you faster.

Expected Behavior

TypeScript compilation should be completed properly while running the permission tests on PR workflows.

Current Behavior

TypeScript compilation fails while running the permission tests on PR workflows with the following message:

Run npx testcafe "chrome:headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3
ERROR Cannot prepare tests due to the following error:

Error: TypeScript compilation failed.
/home/runner/work/console/console/web-app/tests/utils/functions.ts (37, [4](https://github.com/minio/console/actions/runs/8899391570/job/24438772264#step:9:5)7): Type '(err: any) => void' has no properties in common with type 'MakeBucketOpt'.
/home/runner/work/console/console/web-app/tests/utils/functions.ts (66, 68): Expected 3-4 arguments, but got [5](https://github.com/minio/console/actions/runs/8899391570/job/24438772264#step:9:6).

Possible Solution

We would need to migrate the minio-js functions used in the console/web-app/tests/utils/functions.ts path based on the function signatures present in minio-js v8.0.0.

Steps to Reproduce (for bugs)

Local:

  1. Revert commit fe534ab4e683ba93d7123a92e36ca426b198e10c
  2. Navigate to the web-app directory
  3. Run yarn install to install modules necessary for the front-end. Make sure that the version of minio-js installed is v8.0.0.
  4. Run the following command from the main console directory:
npx testcafe "chrome:headless" web-app/tests/permissions-1/ -q --skip-js-errors -c 3
  1. Observe that the Permission tests fail due to TypeScript compilation failing

GitHub:

  1. Revert commit fe534ab4e683ba93d7123a92e36ca426b198e10c
  2. Send a PR to start the workflow run
  3. Observe that the Permission tests fail due to TypeScript compilation failing

Context

This issue was causing permission tests to fail in PR workflows, causing potential confusion regarding if anything in the PR broke the permission tests.

This issue was first detected on PR #3319, temporary fix #3321 was sent to prevent this from blocking any incoming PRs.

Regression

Issue was happening with the new version of minio-js until temporary fix #3321 was merged.

Your Environment

This issue is present in all environments where minio-js 8.0.0 is used while running permission tests.

@kaankabalak kaankabalak added bug this needs to be fixed javascript Pull requests that update Javascript code triage labels Apr 30, 2024
@kaankabalak kaankabalak self-assigned this Apr 30, 2024
kaankabalak added a commit to kaankabalak/console that referenced this issue Apr 30, 2024
kaankabalak added a commit to kaankabalak/console that referenced this issue May 1, 2024
kaankabalak added a commit to kaankabalak/console that referenced this issue May 1, 2024
kaankabalak added a commit to kaankabalak/console that referenced this issue May 1, 2024
kaankabalak added a commit to kaankabalak/console that referenced this issue May 1, 2024
kaankabalak added a commit to kaankabalak/console that referenced this issue May 1, 2024
kaankabalak added a commit to kaankabalak/console that referenced this issue May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug this needs to be fixed javascript Pull requests that update Javascript code triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant