-
Notifications
You must be signed in to change notification settings - Fork 786
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
feat: Workflow refactoring, only async #2878
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Signed-off-by: Matvey Kukuy <[email protected]>
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
8134198 | Triggered | Generic High Entropy Secret | fafba1a | keep-ui/app/frigade-provider.tsx | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Signed-off-by: Matvey Kukuy <[email protected]>
@@ -95,7 +95,7 @@ jobs: | |||
LOG_LEVEL: DEBUG | |||
SQLALCHEMY_WARN_20: 1 | |||
run: | | |||
poetry run coverage run --branch -m pytest --timeout 20 -n auto --non-integration --ignore=tests/e2e_tests/ | |||
poetry run coverage run --branch -m pytest -n auto --non-integration --ignore=tests/e2e_tests/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving timeout to the pyproject.toml
columns = results.column_names | ||
|
||
# Making the results more human readable and compatible with the format we had with sync library before. | ||
results = [dict(zip(columns, row)) for row in rows] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of a magic here to make the format of returned data equal to the format used by TCP clickhouse provider.
) | ||
thread.start() | ||
self.threads.append(thread) | ||
await asyncio.create_task(self._run_workflow(tenant_id, workflow_id, workflow, workflow_execution_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not the most optimal way of doing it, will fix on the next iteration.
thread.start() | ||
self.threads.append(thread) | ||
tasks.append(asyncio.create_task(self._run_workflow(tenant_id, workflow_id, workflow, workflow_execution_id, event))) | ||
await asyncio.gather(*tasks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, not optimal to await for them here, but that's for the next iteration. For now, want to keep the code simple.
tests/test_workflow_execution.py
Outdated
time.sleep(0.1) | ||
yield manager | ||
manager.stop() | ||
yield manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intentionally don't start it here cause better to control it within test
Signed-off-by: Matvey Kukuy <[email protected]>
The prev refactoring got huge, so slicing it to step-by-step PR's.
This one is only about moving Workflows from threads to async.
The next:
Closes #2898