Write Unit/Integration Tests

https://github.com/PrefectHQ/prefect-dbt/issues/5#issuecomment-1142710291

@desertaxle can you let me know your timeline to finish overall development?
I'm asking, so I can dedicate the right time and energy to help review PRs and contribute where you need help!

@sungchun12 I expect to finish the last two major development issues (#9 and #10) this week. I think next week will be a good time for review/QA to make sure that I've covered everything that you'd like to see in this collection.

Thanks Alex! I'll create time blocks in my calendar for next week.

@belasobral93 FYI so you can plan your time out next week for UX testing!

@belasobral93
Can you check off all the below? If there's anything funky, can you make a loom video to show why the UX is funky or is not working?

[ ] Verify I can plug and play an API token, account id, job id into python code with minimal python knowledge
[ ] Verify I can trigger a job async
[ ] Verify I can trigger a job synchronously with polling
[ ] Verify I can get any artifact such as sources.json, run_results.json, catalog.json, manifest.json, example_sql.sql
[ ] Verify I can create a dbt Cloud job using an arbitrary config with json
[ ] Verify the prefect function docstrings are plainly understood from a data analyst perspective
[ ] Verify I can send custom trigger options such a step override commands from a previous task dynamically
[ ] Verify I get a dbt Cloud job to succeed with nice hyperlinks and logs
[ ] Verify I get a dbt Cloud job to fail with helpful hyperlinks and logs

Allocated time to test this thursday : )

Checking in to see if there were any issues discovered during testing. We're back from our planning meetings so we should be able to quickly jump on any issues that are found.

Hi Alex,
I am running into issues in the installation (see error below after running pip install). I’m meeting with Sung this afternoon to see if I can get unblocked. If not, I’ll reach back out
Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x1067a8250>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/pip/

Hi there,
Thanks for the patience in getting feedback on testing. I was unable to get flows to show up locally in the UI, so the following is from the command line. I'm about halfway complete, will finish the rest today (July 20)

[x] Verify I can plug and play an API token, account id, job id into python code with minimal python knowledge

Plug and play was simple enough - I would ask to do a quick review of all the function names and how they are referenced
in examples and import statements. I happened to choose trigger_dbt_cloud_job_run () and used the examples that
referenced it as trigger_job_run() so experienced an error.

[ ] Verify I can trigger a job async (multi-threaded)
-I’m attempting to use DaskTaskRunner but am getting

   ImportError: cannot import name 'DaskTaskRunner' from
  'prefect.task_runners'

import time

from prefect import task, flow
from prefect_dbt.cloud import DbtCloudCredentials
from prefect_dbt.cloud.jobs import trigger_dbt_cloud_job_run

@task
def call_api(job_id):
   job = job_id
   credentials = DbtCloudCredentials(api_key="d78e619a99c8acca50d691c4a9477d505756fec2", account_id=43799)
   trigger_dbt_cloud_job_run(dbt_cloud_credentials=credentials, job = job)

from prefect.task_runners import DaskTaskRunner

@flow(task_runner=DaskTaskRunner())
def async_flow():
   call_api(64242)
   call_api(77213)

[x] Verify I can trigger a job synchronously (sequentially, one after the other) with polling

Yes. Created two flows, the first one with a while loop, and first flow completed before second flow was triggered

[x]  Verify I can create a dbt Cloud job using an arbitrary config with json

yes all of the above

Thanks for the feedback @belasobral93!
We recently moved the Dask task runner out of the core library and into a seperate collection. To run Prefect with Dask, you'll need to install prefect-dask and import the Dask task runner from there.
Let me know if you run into any other issues and I'll be happy to help!

Thanks @desertaxle . In trying to execute jobs asynchronously, I'm coming across a runtime warning in using trigger_dbt_cloud_job_run_and_wait_for_completion(). I'm also not seeing any logs indicating the flow was triggered.
error:

/Users/belaloaner/Desktop/prefect-dbt-cloud/dbt_cloud_example.py:7: RuntimeWarning: coroutine 'create_then_begin_flow_run' was never awaited
trigger_dbt_cloud_job_run_and_wait_for_completion(
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

code:
import asyncio
from prefect_dbt.cloud import DbtCloudCredentials
from prefect_dbt.cloud.jobs import trigger_dbt_cloud_job_run_and_wait_for_completion

async def main():
            trigger_dbt_cloud_job_run_and_wait_for_completion(
                dbt_cloud_credentials=DbtCloudCredentials(
                    api_key="d78e619a99c8acca50d691c4a9477d505756fec2",
                    account_id=43799
                ),
                job_id=77213
            )

asyncio.run(main())

[x]  Verify I can plug and play an API token, account id, job id into python code with minimal python knowledge
[x]Verify the prefect function docstrings are plainly understood from a data analyst perspective

@desertaxle I can’t see docstrings in VSCode. Does it have to do with in the import statements I’m seeing text such as: “Import prefect cannot be resolved”? I'm on Python 3.10.4

[x] Verify I can trigger a job synchronously with polling
[x]Verify I can get any artifact such as sources.json, run_results.json, catalog.json, manifest.json, example_sql.sql
[x] Verify I can send custom trigger options such a step override commands from a previous task dynamically

yes using TriggerJobOptions()

[❌] Verify I can trigger a job async

Attempted to do so but would see first task completed before second task started. Also used await asyncio.sleep but that resulted in each task only beginning once the prior task completed. Is this user error?

code:
@task
async def trigger_dbt_cloud_job_run(job_id):
    await asyncio.sleep(5)
    return

@flow(task_runner=DaskTaskRunner())
def async_flow():
    print("job 1 called")
    trigger_dbt_cloud_job_run(64242)
    print("job 2 called")
    trigger_dbt_cloud_job_run(77213)
    print("job 3 called")
    trigger_dbt_cloud_job_run(77213)
    print("job 4 called")
    trigger_dbt_cloud_job_run(77213)

if __name__ == "__main__":
    async_flow()

[❌] Verify I can create a dbt Cloud job using an arbitrary config with json

@sungchun12 can you explain this one to me?

[❌]Verify I get a dbt Cloud job to succeed with nice hyperlinks and logs

Please see above issue comment

[❌]Verify I get a dbt Cloud job to fail with helpful hyperlinks and logs

Please see above issue comment

@belasobral93 "Verify I can create a dbt Cloud job using an arbitrary config with json"
Can you verify that code like this can work to create a brand new dbt cloud job?
I took this from the docstring in this codebase: https://github.com/PrefectHQ/prefect-dbt/blob/main/prefect_dbt/cloud/utils.py#L77
from prefect import flow

from prefect_dbt.cloud import DbtCloudCredentials
from prefect_dbt.cloud.utils import call_dbt_cloud_administrative_api_endpoint

@flow
def create_job_flow():
    credentials = DbtCloudCredentials(api_key="my_api_key", account_id=123456789)

    future = call_dbt_cloud_administrative_api_endpoint(
        dbt_cloud_credentials=credentials,
        path="/jobs/",
        http_method="POST",
        json={
            "account_id": 123456789,
            "project_id": 100,
            "environment_id": 10,
            "name": "Nightly run",
            "dbt_version": "0.17.1",
            "triggers": {"github_webhook": True, "schedule": True},
            "execute_steps": ["dbt run", "dbt test", "dbt source snapshot-freshness"],
            "settings": {"threads": 4, "target_name": "prod"},
            "state": 1,
            "schedule": {
                "date": {"type": "every_day"},
                "time": {"type": "every_hour", "interval": 1},
            },
        },
    )
    return future.result()["data"]

@desertaxle I noticed after I updated prefect to prefect==2.0b9, that my orion server isn't working correctly anymore.
It doesn't show any of my flows that I verified work correctly.
Bela ran into the same issues yesterday too even after several fresh git clones using this example repo: https://github.com/sungchun12/prefect-dbt-cloud

 ~/prefect-dbt-cloud │ main !1  python data_pipeline_demo.py                                                                                ✔ │ 49s │ prefect-dbt-cloud Py
15:08:57.139 | INFO    | prefect.engine - Created flow run 'neat-beagle' for flow 'Full Data Pipeline'
15:08:57.139 | INFO    | Flow run 'neat-beagle' - Using task runner 'ConcurrentTaskRunner'
15:08:57.184 | WARNING | Flow run 'neat-beagle' - No default storage is configured on the server. Results from this flow run will be stored in a temporary directory in its runtime environment.
15:08:57.322 | INFO    | Flow run 'neat-beagle' - Created task run 'Extract-bb1266fe-0' for task 'Extract'
15:08:57.411 | INFO    | Flow run 'neat-beagle' - Extract Raw Data
15:08:57.455 | INFO    | Task run 'Extract-bb1266fe-0' - Finished in state Completed()
15:08:57.501 | INFO    | Flow run 'neat-beagle' - Created task run 'Load-60b30268-0' for task 'Load'
15:08:57.560 | INFO    | Flow run 'neat-beagle' - Load Raw Data
15:08:57.595 | INFO    | Task run 'Load-60b30268-0' - Finished in state Completed()
15:08:57.630 | INFO    | Flow run 'neat-beagle' - Created task run 'Transform-a7d916b4-0' for task 'Transform'
15:08:57.677 | INFO    | Flow run 'neat-beagle' - Transform Raw Data
15:08:57.757 | INFO    | Task run 'Transform-a7d916b4-0' - Finished in state Completed()
15:08:57.823 | INFO    | Flow run 'neat-beagle' - Created task run 'Predict-f915ca64-0' for task 'Predict'
15:08:57.875 | INFO    | Flow run 'neat-beagle' - Predict results on transformed data
15:08:57.905 | INFO    | Task run 'Predict-f915ca64-0' - Finished in state Completed()
15:08:57.950 | INFO    | Flow run 'neat-beagle' - Finished in state Completed('All states completed.')

@sungchun12 can you verify that
prefect config set PREFECT_API_URL=http://<IP_ADDRESS>:4200/api and rerun?
I use the following code:
from prefect import flow, task

@task
def shout(number):
    print(f"#{number}")

@flow
def count_to(highest_number):
    for number in range(1, highest_number + 1):
        if number % 2:
            shout.submit(number)
        else:
            shout(number)

if __name__ == "__main__":
    count_to(5)

Outputs:
15:22:23.856 | INFO    | prefect.engine - Created flow run 'adept-pegasus' for flow 'count-to'
15:22:23.856 | INFO    | Flow run 'adept-pegasus' - Using task runner 'ConcurrentTaskRunner'
15:22:23.866 | WARNING | Flow run 'adept-pegasus' - No default storage is configured on the server. Results from this flow run will be stored in a temporary directory in its runtime environment.
15:22:23.903 | INFO    | Flow run 'adept-pegasus' - Created task run 'shout-58a68b34-0' for task 'shout'
15:22:23.922 | INFO    | Flow run 'adept-pegasus' - Created task run 'shout-58a68b34-1' for task 'shout'
#1
#2
15:22:23.944 | INFO    | Task run 'shout-58a68b34-0' - Finished in state Completed()
15:22:23.950 | INFO    | Task run 'shout-58a68b34-1' - Finished in state Completed()
15:22:23.962 | INFO    | Flow run 'adept-pegasus' - Created task run 'shout-58a68b34-2' for task 'shout'
15:22:23.979 | INFO    | Flow run 'adept-pegasus' - Created task run 'shout-58a68b34-3' for task 'shout'
#3
#4
15:22:24.000 | INFO    | Task run 'shout-58a68b34-2' - Finished in state Completed()
15:22:24.008 | INFO    | Task run 'shout-58a68b34-3' - Finished in state Completed()
15:22:24.018 | INFO    | Flow run 'adept-pegasus' - Created task run 'shout-58a68b34-4' for task 'shout'
#5
15:22:24.043 | INFO    | Task run 'shout-58a68b34-4' - Finished in state Completed()
15:22:24.057 | INFO    | Flow run 'adept-pegasus' - Finished in state Completed('All states completed.')

Also can you try updating Prefect 2?

@belasobral93
Try this for async (add await and submit())
import asyncio
from prefect import task, flow

@task
async def trigger_dbt_cloud_job_run(job_id):
    await asyncio.sleep(2)
    return

@flow()
async def async_flow():
    print("job 1 called")
    await trigger_dbt_cloud_job_run.submit(64242)
    print("job 2 called")
    await trigger_dbt_cloud_job_run.submit(77213)
    print("job 3 called")
    await trigger_dbt_cloud_job_run.submit(77213)
    print("job 4 called")
    await trigger_dbt_cloud_job_run.submit(77213)

if __name__ == "__main__":
    asyncio.run(async_flow())

@desertaxle
Getting different errors now after your suggestions.
Can you try running this example repo? https://github.com/sungchun12/prefect-dbt-cloud
Setup instructions are in the REAMDE
 ~/prefect-dbt-cloud │ main !1  python basic_flow.py            1 х │ 4s │ prefect-dbt-cloud Py
Traceback (most recent call last):
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 164, in try_connect
    stream = await asynclib.connect_tcp(remote_host, remote_port, local_address)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp
    await get_running_loop().create_connection(
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
    raise exceptions[0]
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
    sock = await self._connect_sock(
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
    await self.sock_connect(sock, address)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/asyncio/selector_events.py", line 496, in sock_connect
    return await fut
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/asyncio/selector_events.py", line 528, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 61] Connect call failed ('<IP_ADDRESS>', 4200)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
    yield
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/anyio/_core/_sockets.py", line 222, in connect_tcp
    raise OSError("All connection attempts failed") from cause
OSError: All connection attempts failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
    yield
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
    raise exc
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
    response = await connection.handle_async_request(request)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
    raise exc
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
    stream = await self._connect(request)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/_async/connection.py", line 111, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp
    return await self._backend.connect_tcp(
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
    raise to_exc(exc)
httpcore.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/prefect/client.py", line 374, in api_healthcheck
    await self._client.get("/health")
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_client.py", line 1751, in get
    return await self.request(
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_client.py", line 1527, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/prefect/client.py", line 256, in send
    await super().send(*args, **kwargs)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_client.py", line 1614, in send
    response = await self._send_handling_auth(
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_client.py", line 1642, in _send_handling_auth
    response = await self._send_handling_redirects(
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_client.py", line 1679, in _send_handling_redirects
    response = await self._send_single_request(request)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_client.py", line 1716, in _send_single_request
    response = await transport.handle_async_request(request)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
    resp = await self._pool.handle_async_request(req)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectError: All connection attempts failed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "basic_flow.py", line 19, in <module>
    count_to(5)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/prefect/flows.py", line 367, in __call__
    return enter_flow_run_engine_from_flow_call(
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/prefect/engine.py", line 139, in enter_flow_run_engine_from_flow_call
    return anyio.run(begin_run)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/prefect/client.py", line 105, in with_injected_client
    return await fn(*args, **kwargs)
  File "/Users/sung/prefect-dbt-cloud/env/lib/python3.8/site-packages/prefect/engine.py", line 179, in create_then_begin_flow_run
    raise RuntimeError(
RuntimeError: Cannot create flow run. Failed to reach API at http://<IP_ADDRESS>:4200/api/.

 ~/prefect-dbt-cloud │ main !1  prefect orion start               ✔ │ 6s │ prefect-dbt-cloud Py
Starting...

 ___ ___ ___ ___ ___ ___ _____    ___  ___ ___ ___  _  _
| _ \ _ \ __| __| __/ __|_   _|  / _ \| _ \_ _/ _ \| \| |
|  _/   / _|| _|| _| (__  | |   | (_) |   /| | (_) | .` |
|_| |_|_\___|_| |___\___| |_|    \___/|_|_\___\___/|_|\_|

Configure Prefect to communicate with the server with:

    prefect config set PREFECT_API_URL=http://<IP_ADDRESS>:4200/api

Check out the dashboard at http://<IP_ADDRESS>:4200

INFO:     Started server process [82513]
INFO:     Waiting for application startup.
ERROR:    Traceback (most recent call last):
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/base.py", line 227, in _catch_revision_errors
    yield
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/base.py", line 439, in _upgrade_revs
    for script in reversed(list(revs))
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/revision.py", line 789, in iterate_revisions
    revisions, heads = fn(
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/revision.py", line 1416, in _collect_upgrade_revisions
    current_revisions = self.get_revisions(lower)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/revision.py", line 525, in get_revisions
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/revision.py", line 525, in <listcomp>
    return sum([self.get_revisions(id_elem) for id_elem in id_], ())
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/revision.py", line 549, in get_revisions
    return tuple(
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/revision.py", line 550, in <genexpr>
    self._revision_for_ident(rev_id, branch_label)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/revision.py", line 619, in _revision_for_ident
    raise ResolutionError(
alembic.script.revision.ResolutionError: No such revision or branch '628a873f0d1a'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/starlette/routing.py", line 635, in lifespan
    async with self.lifespan_context(app):
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/starlette/routing.py", line 530, in __aenter__
    await self._router.startup()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/starlette/routing.py", line 612, in startup
    await handler()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/orion/api/server.py", line 259, in run_migrations
    await db.create_db()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/orion/database/interface.py", line 53, in create_db
    await self.run_migrations_upgrade()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/orion/database/interface.py", line 61, in run_migrations_upgrade
    await run_sync_in_worker_thread(alembic_upgrade)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/utilities/asyncio.py", line 54, in run_sync_in_worker_thread
    return await anyio.to_thread.run_sync(call, cancellable=True)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/orion/database/alembic_commands.py", line 29, in alembic_upgrade
    alembic.command.upgrade(alembic_config(), revision, sql=dry_run)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/command.py", line 320, in upgrade
    script.run_env()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/base.py", line 563, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 92, in load_python_file
    module = load_module_py(module_id, path)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/util/pyfiles.py", line 108, in load_module_py
    spec.loader.exec_module(module)  # type: ignore
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/orion/database/migrations/env.py", line 98, in <module>
    apply_migrations()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/utilities/asyncio.py", line 118, in wrapper
    return run_async_from_worker_thread(async_fn, *args, **kwargs)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/utilities/asyncio.py", line 65, in run_async_from_worker_thread
    return anyio.from_thread.run(call)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/anyio/from_thread.py", line 49, in run
    return asynclib.run_async_from_thread(func, *args)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 970, in run_async_from_thread
    return f.result()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/orion/database/migrations/env.py", line 92, in apply_migrations
    await connection.run_sync(do_run_migrations)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/sqlalchemy/ext/asyncio/engine.py", line 546, in run_sync
    return await greenlet_spawn(fn, conn, *arg, **kw)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/sqlalchemy/util/_concurrency_py3k.py", line 128, in greenlet_spawn
    result = context.switch(value)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/prefect/orion/database/migrations/env.py", line 80, in do_run_migrations
    context.run_migrations()
  File "<string>", line 8, in run_migrations
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/runtime/environment.py", line 851, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/runtime/migration.py", line 608, in run_migrations
    for step in self._migrations_fn(heads, self):
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/command.py", line 309, in upgrade
    return script._upgrade_revs(revision, rev)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/base.py", line 435, in _upgrade_revs
    return [
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/Users/sung/.pyenv/versions/3.8.9/lib/python3.8/site-packages/alembic/script/base.py", line 259, in _catch_revision_errors
    raise util.CommandError(resolution) from re
alembic.util.exc.CommandError: Can't locate revision identified by '628a873f0d1a'

ERROR:    Application startup failed. Exiting.
Orion stopped!

alembic.util.exc.CommandError: Can't locate revision identified by '628a873f0d1a'
I think there was a breaking change in the database; the easiest way to migrate is to delete ~/.prefect/orion.db

@ahuang11 Still getting the same errors with the same error message after deleting this multiple times: ~/.prefect/orion.db

Can you try updating pip install "prefect>=2.0b"?

@sungchun12 I ran into a similar issue recently and I fixed it by recreating my virtual environment. We can also hop on a call together if that would help resolve issues more quickly.

@desertaxle Thanks for the offer. Let's hope on a quick call: https://calendly.com/d/dvr-zt7-psg/30-minute-meeting

@sungchun12 The earliest available time I saw was Tuesday morning so that's when I booked time, but let me know if you'd like to meet sooner.

@desertaxle saw the meeting invite come through, Tuesday will have to do thanks!

@ahuang11 @desertaxle Looks like there is something wrong with the create_flow_run() that impacts trigger_dbt_cloud_job_run(). Running the example flow from docs produces the following (same 422 error when I try the async code):
Code
from prefect import flow

@flow(name="Hello Flow")
def hello_world(name="world"):
    print(f"Hello {name}!")

hello_world("Marvin")

Logs
Traceback (most recent call last):
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/async_flow.py", line 17, in <module>
    hello_world("Marvin")
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/flows.py", line 367, in __call__
    return enter_flow_run_engine_from_flow_call(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 134, in enter_flow_run_engine_from_flow_call
    return anyio.run(begin_run)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/Users/belaloaner/.pyenv/versions/3.10.4/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Users/belaloaner/.pyenv/versions/3.10.4/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/client.py", line 107, in with_injected_client
    return await fn(*args, **kwargs)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 188, in create_then_begin_flow_run
    flow_run = await client.create_flow_run(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/client.py", line 604, in create_flow_run
    response = await self._client.post("/flow_runs/", json=flow_run_create_json)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/httpx/_client.py", line 1842, in post
    return await self.request(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/httpx/_client.py", line 1527, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/client.py", line 280, in send
    response.raise_for_status()
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/client.py", line 226, in raise_for_status
    raise PrefectHTTPStatusError.from_httpx_error(exc) from exc.__cause__
prefect.exceptions.PrefectHTTPStatusError: Client error '422 Unprocessable Entity' for url 'https://api-beta.prefect.io/api/accounts/6941ed01-3570-4537-92b5-79296385f7c0/workspaces/3674ba46-c9af-4827-858c-9fedbf830913/flow_runs/'
Response: {'exception_message': 'Invalid request received.', 'exception_detail': [{'loc': ['body', 'flow_runner'], 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}], 'request_body': {'name': 'nocturnal-bullfinch', 'flow_id': 'f10f715f-512b-4226-b177-680f13805858', 'deployment_id': None, 'flow_version': '6c3a0e3ef179a52c083eb85997507207', 'parameters': {'name': 'Marvin'}, 'idempotency_key': None, 'context': {}, 'empirical_policy': {'max_retries': 0, 'retry_delay_seconds': 0.0}, 'tags': [], 'parent_task_run_id': None, 'flow_runner': None, 'state': {'type': 'PENDING', 'name': 'Pending', 'message': None, 'data': None, 'state_details': {'flow_run_id': None, 'task_run_id': None, 'child_flow_run_id': None, 'scheduled_time': None, 'cache_key': None, 'cache_expiration': None}}}}
For more information check: https://httpstatuses.com/422

@belasobral93 Can you try upgrading prefect with pip install prefect>=2.0b12?

thanks @ahuang11 that worked and I see async behavior. I have a question - how can I call the same prefect task with different conditions? Do they need to be in sub-flows?
For example, I want to call trigger_dbt_cloud_job_run() for 2 different jobs, but I want each of them to have different delays (sleep(5), sleep(2). I can't create different tasks for each one, because I can't call a task within a task. So is my only option to put these tasks inside flows? Or can I somehow give these tasks aliases?
I want to set different delays for the following task:
@task
async def trigger_dbt_cloud_job_run(job_id):
    await asyncio.sleep(5)
    return

[x]  Verify I can plug and play an API token, account id, job id into python code with minimal python knowledge

[x] Verify the prefect function docstrings are plainly understood from a data analyst perspective

[x] Verify I can trigger a job synchronously with polling

[x] Verify I can get any artifact such as sources.json, run_results.json, catalog.json, manifest.json, example_sql.sql

[x] Verify I can send custom trigger options such a step override commands from a previous task dynamically

yes using TriggerJobOptions()

[x] Verify I can trigger a job async

[👩🏽💻] Verify I can create a dbt Cloud job using an arbitrary config with json

[❌] Verify I get a dbt Cloud job to succeed with nice hyperlinks and logs

Need the final status saying the job has status SUCCESS & run data returned from dbt's api like trigger_dbt_cloud_job_run() does.

4:15:02.165 | INFO    | Flow run 'eccentric-urchin' - dbt Cloud job run with ID 70820362 has status RUNNING. Waiting for 5 seconds.
14:15:07.358 | INFO    | Flow run 'eccentric-urchin' - Created task run 'Get dbt Cloud job run details-46ef67b7-12' for task 'Get dbt Cloud job run details'
14:15:07.358 | INFO    | Flow run 'eccentric-urchin' - Executing 'Get dbt Cloud job run details-46ef67b7-12' immediately...
14:15:08.521 | INFO    | Task run 'Get dbt Cloud job run details-46ef67b7-12' - Finished in state Completed()
14:15:08.770 | INFO    | Flow run 'eccentric-urchin' - Created task run 'List dbt Cloud job artifacts-fabe6c19-0' for task 'List dbt Cloud job artifacts'
14:15:08.771 | INFO    | Flow run 'eccentric-urchin' - Executing 'List dbt Cloud job artifacts-fabe6c19-0' immediately...
14:15:10.253 | INFO    | Task run 'List dbt Cloud job artifacts-fabe6c19-0' - Finished in state Completed()
14:15:10.414 | INFO    | Flow run 'eccentric-urchin' - Finished in state Completed()
(env) belaloaner@bela-loaner prefect-dbt-cloud_2 %

[x] Verify I get a dbt Cloud job to fail with helpful hyperlinks and logs

logs clearly show that flow failed due to an error in a specific dbt cloud run - run is hyperlinked.

@belasobral93 I don't quite understand, but here's what I think!
@task
async def trigger_dbt_cloud_job_run_one(job_id):
    await asyncio.sleep(5)
    return

@task
async def trigger_dbt_cloud_job_run_two(job_id):
    await asyncio.sleep(2)
    return

@flow
async def trigger_flow():
    task_one = trigger_dbt_cloud_job_run_one()
    task_two = trigger_dbt_cloud_job_run_two()

Or if you must call task within task
@task
async def trigger_dbt_cloud_job_runs():
    trigger_dbt_cloud_job_run.fn()  # call the underlying Python function so it's not a task
    trigger_dbt_cloud_job_run.fn()  # call the underlying Python function so it's not a task

You can also rename tasks like
trigger_dbt_cloud_job_run.with_options(name="trigger_one")

@task
async def trigger_dbt_cloud_job_runs():
    trigger_dbt_cloud_job_run.fn()  # call the underlying Python function so it's not a task
    trigger_dbt_cloud_job_run.fn()  # call the underlying Python function so it's not a task

^^ Is what I was looking for.
If I use (name="trigger_one") does that mean I could then call it like this?
@task
async def trigger_one():

If I use (name="trigger_one") does that mean I could then call it like this?

No I don't think so; it just shows up in the UI with that name, e.g. https://discourse.prefect.io/t/how-to-display-more-descriptive-task-run-names-in-the-radar-view-ui/1146

Getting an error using docstrings example.
To try and resolve I did the following (was not successful in resolving):

removed the trailing comma after the schedule object (I believe trailing commas not allowed in json?)
Compared and validated body structure + included all elements listed in our postman collection for POST Create Job

14:55:27.498 | ERROR   | Flow run 'upbeat-moose' - Finished in state Failed('Flow run encountered an exception.')
Traceback (most recent call last):
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/arbitrary.py", line 54, in <module>
    create_job_flow()
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/flows.py", line 367, in __call__
    return enter_flow_run_engine_from_flow_call(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 150, in enter_flow_run_engine_from_flow_call
    return anyio.run(begin_run)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_core/_eventloop.py", line 70, in run
    return asynclib.run(func, *args, **backend_options)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 292, in run
    return native_run(wrapper(), debug=debug)
  File "/Users/belaloaner/.pyenv/versions/3.10.4/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/Users/belaloaner/.pyenv/versions/3.10.4/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
    return await func(*args)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/client.py", line 104, in with_injected_client
    return await fn(*args, **kwargs)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 226, in create_then_begin_flow_run
    return state.result()
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/orion/schemas/states.py", line 145, in result
    raise data
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 559, in orchestrate_flow_run
    result = await run_sync(flow_call)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 56, in run_sync_in_worker_thread
    return await anyio.to_thread.run_sync(call, cancellable=True)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/arbitrary.py", line 14, in create_job_flow
    future = call_dbt_cloud_administrative_api_endpoint(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/tasks.py", line 282, in __call__
    return enter_task_run_engine(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 688, in enter_task_run_engine
    return run_async_from_worker_thread(begin_run)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 136, in run_async_from_worker_thread
    return anyio.from_thread.run(call)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/from_thread.py", line 49, in run
    return asynclib.run_async_from_thread(func, *args)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 970, in run_async_from_thread
    return f.result()
  File "/Users/belaloaner/.pyenv/versions/3.10.4/lib/python3.10/concurrent/futures/_base.py", line 446, in result
    return self.__get_result()
  File "/Users/belaloaner/.pyenv/versions/3.10.4/lib/python3.10/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 803, in create_task_run_then_submit
    return await future._result()
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/futures.py", line 220, in _result
    return final_state.result(raise_on_failure=raise_on_failure)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/orion/schemas/states.py", line 145, in result
    raise data
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect/engine.py", line 1039, in orchestrate_task_run
    result = await task.fn(*args, **kwargs)
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect_dbt/cloud/utils.py", line 113, in call_dbt_cloud_administrative_api_endpoint
    response = await client.call_endpoint(
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/prefect_dbt/cloud/clients.py", line 56, in call_endpoint
    response.raise_for_status()
  File "/Users/belaloaner/Desktop/prefect-dbt-cloud_2/env/lib/python3.10/site-packages/httpx/_models.py", line 736, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Client error '400 Bad Request' for url 'https://cloud.getdbt.com/api/v2/accounts/43799/jobs/'
For more information check: https://httpstatuses.com/400

@belasobral93 For the prefect Orion UI, Alex and I were able to make it work but through non-repeatable means because prefect 2.0 is still in flux. Once prefect 2.0 is GA tomorrow, the UI errors should decrease.
With that in mind, once all the mechanical pieces above are done, we'll have prefect GA this integration tomorrow so that broader adoption can happen and fix further bugs.
After, you should be ready to tackle #3 and #7

@belasobral93 I updated the create job example in #37 and it should be working now. Also, trigger_dbt_cloud_job_run_and_wait_for_completion returns the result of the job run along with the artifacts. If you print out the return value from the flow, you can inspect it to make sure that it has all of the fields that you are expecting. Here's an output that I got:
{
   "id":71164019,
   "trigger_id":71879132,
   "account_id":36394,
   "environment_id":97658,
   "project_id":118320,
   "job_definition_id":97588,
   "status":10,
   "dbt_version":"1.1.0-latest",
   "git_branch":"demo-sung",
   "git_sha":"6b86c1e47900b3caa37a2af840770faa1c4ef2b2",
   "status_message":"None",
   "owner_thread_id":"None",
   "executed_by_thread_id":"dbt-run-71164019",
   "deferring_run_id":"None",
   "artifacts_saved":true,
   "artifact_s3_path":"prod/runs/71164019/artifacts/target",
   "has_docs_generated":true,
   "has_sources_generated":true,
   "notifications_sent":true,
   "blocked_by":[

   ],
   "scribe_enabled":true,
   "created_at":"2022-07-27 12:30:03.850957+00:00",
   "updated_at":"2022-07-27 12:32:03.363227+00:00",
   "dequeued_at":"2022-07-27 12:30:05.318124+00:00",
   "started_at":"2022-07-27 12:30:11.271817+00:00",
   "finished_at":"2022-07-27 12:32:02.950524+00:00",
   "last_checked_at":"2022-07-27 12:32:03.251493+00:00",
   "last_heartbeat_at":"2022-07-27 12:31:41.302098+00:00",
   "should_start_at":"2022-07-27 12:30:03.850957+00:00",
   "trigger":"None",
   "job":"None",
   "environment":"None",
   "run_steps":[

   ],
   "status_humanized":"Success",
   "in_progress":false,
   "is_complete":true,
   "is_success":true,
   "is_error":false,
   "is_cancelled":false,
   "href":"https://cloud.getdbt.com/#/accounts/36394/projects/118320/runs/71164019/",
   "duration":"00:01:59",
   "queued_duration":"00:00:07",
   "run_duration":"00:01:51",
   "duration_humanized":"1 minute, 59 seconds",
   "queued_duration_humanized":"7 seconds",
   "run_duration_humanized":"1 minute, 51 seconds",
   "created_at_humanized":"2 minutes, 5 seconds ago",
   "finished_at_humanized":"6 seconds ago",
   "job_id":97588,
   "is_running":"None",
   "artifact_paths":[
      ...
   ]
}

I truncated artifact_paths for readability, but is that what you're expecting to see?

(checkboxes for CLI, will do for UI)

[x]  Verify I can plug and play an API token, account id, job id into python code with minimal python knowledge

[x] Verify the prefect function docstrings are plainly understood from a data analyst perspective

[x] Verify I can trigger a job synchronously with polling

[x] Verify I can get any artifact such as sources.json, run_results.json, catalog.json, manifest.json, example_sql.sql

[x] Verify I can send custom trigger options such a step override commands from a previous task dynamically

[x] Verify I can trigger a job async

[x]  Verify I can create a dbt Cloud job using an arbitrary config with json

[x] Verify I get a dbt Cloud job to fail with helpful hyperlinks and logs

[ ] Verify I get a dbt Cloud job to succeed with nice hyperlinks and logs
@desertaxle great, that data response is what I was looking for. Can we get also get a cloud job run status printed to log when a run is successful?

@desertaxle @belasobral93 What's left to get this officially released? Just that missing checkbox in the previous comment?

@sungchun12 yep!

I opened #40 to add a log message letting the user know that a run was successful. @belasobral93 can you confirm that this fulfills the last requirement? If so, we should be able to get #40 merged and release prefect-dbt today!

@desertaxle it does, thank you. We're good to go

@belasobral93 you should make a quick and fun “QuickStart” tutorial this week in loom! I’ll share it with pride :)

@sungchun12 on it!

I'm going to close this issue since it sounds like we've finished QA. I've opened #41 to prepare for the first release of prefect-dbt, so we can discuss anything that's needed prior to release there!

Hi Alex,
I am running into issues in the installation (see error below after running
pop install. I’m meeting with Sung this afternoon to see if I can get
unblocked. If not, I’ll reach back out

Retry(total=4, connect=None, read=None, redirect=None, status=None))
after connection broken by
'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection
object at 0x1067a8250>: Failed to establish a new connection: [Errno 8]
nodename nor servname provided, or not known')': /simple/pip/
On Mon, Jul 18, 2022 at 11:22 AM Alexander Streed @.***>
wrote:

Checking in to see if there were any issues discovered during testing.
We're back from our planning meetings so we should be able to quickly jump
on any issues that are found.
—
Reply to this email directly, view it on GitHub
https://github.com/PrefectHQ/prefect-dbt/issues/15#issuecomment-1188053243,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIQ65PZNRVE5E64J2IEWVJ3VUWOFBANCNFSM5XLX5SDA
.
You are receiving this because you were assigned.Message ID:
@.***>


Unable to install Lit system normally

I tried to install LTI several times and still failed
error.pptx
Desktop.zip

The version of my moodle system is 3.11.4+
I use Azure AD and created multiple user accounts
I use Admin in Moodle to create a course first, then use another browser, log in with a teacher account, and use the teacher account to link to LTI courses

The attachment is a screenshot of the related fault message, which I put in the PPT
And F12 to view the trace and stack LOG file. Please refer to it
thank you

Hi @a00110110 so please follow the troubleshooting guide https://github.com/microsoft/Learn-LTI/blob/main/docs/TROUBLESHOOTING.md
Debugging Errors related to http500 indicated in Browser with Oops! Something went wrong..
We suggest you go to our help page https://github.com/microsoft/Learn-LTI/blob/main/docs/TROUBLESHOOTING.md
This results in you being unable to open the Assignments page in Learn-LTI. Users access failing with http500 which essentially has been the source of the Oops! Something went wrong error message in the browser window.
Please see browser logs  so press F12 and reopen the page to follow the stack trace if indicate that the membership call being sent to the LMS (Moodle) to ensure the users are validating of this is returning a 401 Unauthorized and the Learn LTI tool in unable to get the course members from the LMS and hence the it is giving a 500 response.
This results in you being unable to open the Assignments page in Learn-LTI. Users access failing with http500 which essentially has been the source of the Oops! Something went wrong error message in the browser window.
Also Please make sure that while configuring the tool in Moodle, Under Services, IMS LTI Names and Role Provisioning: Use this service to retrieve members’ information as per privacy settings. is selected as mentioned in the Configuration Guide Learn
https://github.com/microsoft/Learn-LTI/blob/main/images/Config.8.png

Why can't I find "Azure subscription" when I installed LTI?
For fault messages, please refer to the cloud space, 20220118_0636 folder
http://gg.gg/xkxdq

Hi I see you managed to get the services deployed successfully re https://github.com/microsoft/Learn-LTI/issues/170 so I will close this issues


refactor: :recycle: wrapText

wrapText refactor

[x] Refactoring for better readability
[x] Check and update tests (only if is necessary)
[x] Improve performance

About the tests, i think that is necessary redefine them (like i did on the original PR), for example:
current test:
Test wrapText › When text contain new lines › should respect new lines and break all words when width of each word is less than container width
for this input:
Hello
whats up

and this width:
90 (80 without padding)
the current expected result is:
Hello
whats
up

But, if each letter has width of 10, then:
Hello = 50
whats = 50
 (space) = 10
up = 20

then:
whats + (space) + up = 50 + 10 + 20 = 80
80 <= 80 = true!
the correct result must be:
Hello
whats up

(that is my result)

Performance log
{
  text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, \n' +
    'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \n' +
    'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
  maxWidth: 10,
  loops: 50000
}

old wrap text: 975.995ms (before PR)
new wrap text: 6.351s (before last commit)
optimized wrap text: 1.777s (after last commit)
(this is a reminder note)

{
  text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, \n' +
    'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \n' +
    'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
  maxWidth: 10,
  loops: 50000
}

optimized wrap text (wip): 1.110s (second optimization)
old wrap text: 914.679ms (before PR)
optimized wrap text v1: 1.638s (first optimization)
new wrap text: 6.321s (before optimization)

{
  text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, \n' +
    'sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \n' +
    'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
  maxWidth: 10,
  loops: 50000
}

master: 966ms | getLineWidth calls 2,050,023
third optimization (current): 1,141ms | getLineWidth calls 7,500,000
second optimization: 1,167ms | getLineWidth calls 21,700,000
first optimization: 1,959ms | getLineWidth calls 27,900,000
before optimization: 6,201ms | getLineWidth calls 27,900,000

I think that I finished this (unless I have to update the tests).
@ad1992
Can you review this PR?

@ignacio-cuadra Sorry about the delay, I have been busy making some changes to the way the text wrapping works to make it more stable, also adding more tests, and monitoring to make sure all is good. I still have a few open PRs which I will be merging very soon (some of them are touching the wrap algo as well).
As this PR is mainly refactoring so it can wait (Once text containers are completely stable we can come back to this but for now it would be better not to introduce any code change which is not necessary atm)
But since you were working on a bug fix about fixing the spaces thing, I wanted to ask you if you could do it above the current master code ?
If that can be done, then we can merge that fix and It would help us release the fix soon.

Yes, I can do it but that feature removes all trailing spaces (I mention it because it would be necessary to remove them in the tests).

Yep that's what we ultimately want and that would be anyways needed to update in the test so its completely fine

Oops, i'm wrong. I meant that this feature doesn't remove any trailing space (They are removed when the text is drawing).

Oops, i'm wrong. I meant that this feature doesn't remove any trailing space (They are removed when the text is drawing).

That would be when you fix the bug of spaces right? which you would be doing in a new PR as discussed on top of the master's code?

@ignacio-cuadra been long time so wondering if you are working on the trailing space fix or should I pick it up ?

Just noticed this! Looks much better, though we went in the end for a full rewrite as part of CJK support. Hence closing in favor of https://github.com/excalidraw/excalidraw/pull/8530.


Error after installing extension

VSCode Version: Insiders 1.54.0
OS Version: Windows_NT x64 10.0.19042

Steps to Reproduce:

download vscode-insiders.zip
copy to C:\Program Files
start vscode and install any extension, that will be show 'Cannot read property 'name' of undefined'

Does this issue occur when all extensions are disabled?: No

/causedByExtension

Or are you saying this happens no matter which extension you try and install?
Also, I don't understand why you are downloading the Insiders as a zip and then copying it to c:\Program Files. Why not download the Insiders installer and run it?

Or are you saying this happens no matter which extension you try and install?

Yes, but this issue seems to be only happening in the specified commit
This commit didn't happen

This commit will be happen


Partially Revert 1b2a6e5f107254cce8200a4750035b30265ae0c8

Currently, mounting the /users endpoint at the top level when in
osc_compat mode causes errrors in the Chef integration tests. This may
be due to a misconfiguration in the way Chef implements local mode but I
am unable to pinpoint the exact causes right now. In any case, this is
the minimal "revert" of 1b2a6e5f107254cce8200a4750035b30265ae0c8 that
gets Chef's integration tests working again.
@jkeiser @chef/client-core

Oh, @jaymzh that was your commit, can you help me understand what you wanted to accomplish?

Those are the OSC URLs... OSC doesn't have organizations, users are a top-level thing... Seemed liked a bug, so I fixed when I was in there. It wasn't actually causing me a problems, so if I was wrong, I'm fine with this PR.

In chef zero, all endpoints always have "organizations" to keep the endpoint logic simple.  When you enable single org mode, it just enables a layer that tacks "/organizations/chef" onto any URLs the user hits.  That's why you see "users" under an organization there, because in osc users are a top level thing and "/organizations/chef" is the top level :)  Reverting is correct in this case.

:+1:

Ok, thanks everyone, I'll merge. Seems like we would do well to get the pedant tests passing for the users endpoint so we can catch stuff like this in travis.

I looked for the code doing such a transmogrification but couldn't find it, I may have just been dense that day. Sorry for the bug.


Appstudio update test-component-pac-bnui

Pipelines as Code configuration proposal
To start the PipelineRun, add a new comment with content /ok-to-test
For more detailed information about running a PipelineRun, please refer to Pipelines as Code documentation Running the PipelineRun
To customize the proposed PipelineRuns after merge, please refer to Build Pipeline customization

Pipelines as Code CI/test-component-pac-bnui-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
17 seconds
clone-repository

✅ Succeeded
32 seconds
build-container

✅ Succeeded
20 seconds
sast-snyk-check

✅ Succeeded
15 seconds
sbom-json-check

✅ Succeeded
26 seconds
deprecated-base-image-check

✅ Succeeded
51 seconds
clamav-scan

✅ Succeeded
22 seconds
inspect-image

✅ Succeeded
3 minutes
clair-scan

✅ Succeeded
6 seconds
show-sbom

✅ Succeeded
6 seconds
show-summary


Go to definition not working for external files

Description
What steps will reproduce the problem?

Select the instance of a class / object that depends on another file somewhere and right click
Select "go to definition" from drop down menu

What is the expected output? What do you see instead?
If object was defined in the document that is open, it will go to the definition.  If selecting something that relies on a separate document (something in the Python library), nothing will happen.
Please provide any additional information below
Spyder was installed through the Anaconda distribution.
Version and main components

Spyder Version: 3.0.2
Python Version: 3.5.2
Qt Versions: 5.6.0, PyQt5 5.6 on Windows

Dependencies
jedi >=0.8.1     :  0.9.0 (OK)
matplotlib >=1.0 :  1.5.3 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
numpy >=1.7      :  1.11.1 (OK)
pandas >=0.13.1  :  0.18.1 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pyflakes >=0.6.0 :  1.3.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
pylint >=0.25    :  1.5.4 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
sphinx >=0.6.6   :  1.4.6 (OK)
sympy >=0.7.3    :  1.0 (OK)

Having the same problem here. When I link to a module like:
from cnntools import code-snippets as code
code.printsomething
when I want to link to the definition of code in cnntools, which is another project folder in the parent directory, spyder is not doing anything.
Currently using Python 3.5.2 64 bits, Qt 4.8.7, PyQt 4.11.4, spyder 3.1.3, Windows 7 64bits.
Spyder dependencies all up to date.
jedi =0.9.0      :  0.9.0 (OK)
matplotlib >=1.0 :  2.0.0 (OK)
nbconvert >=4.0  :  4.2.0 (OK)
numpy >=1.7      :  1.12.1 (OK)
pandas >=0.13.1  :  0.19.2 (OK)
pep8 >=0.6       :  1.7.0 (OK)
pyflakes >=0.6.0 :  1.5.0 (OK)
pygments >=2.0   :  2.1.3 (OK)
pylint >=0.25    :  1.6.4 (OK)
qtconsole >=4.2.0:  4.2.1 (OK)
rope >=0.9.4     :  0.9.4-1 (OK)
sphinx >=0.6.6   :  1.5.1 (OK)
sympy >=0.7.3    :  1.0 (OK)

Is there any news on this issue?

You need to add your projects to our Python path manager for this to work. However, there are some errors with this approach (reported in issue #4410) that will be addressed in our 3.2.2 version.
For for the inconvenience in the meantime.

Note: You can find our Python path manager in the menu
Tools > PYTHONPATH manager


Ultra slow speeds

Problem
I am aware of nrf240L1+ module is capable of 2mb/s speeds and I pretty sure both of my raspberry pi's on each end can handle them, but the actual transfer time is 40 minutes to send a 2.6Mb file. Could this be faster in some way, what am I missing?
How
I'm trying to stream an image from one NRF240L+ module to another and the current setup is only a couple of meters apart pointing directly at each other. I am using your example (nrf24l01_stream_test) which I've modified in the following manner:

make_buffers() method is opening jpeg file, reading it as hex, constructing buffers with 32byte chunks, and returning buffers
master remains untouched and sends these buffers to the slave
slave() instantiates byte array which appends all received bytes and finally writes this to "image.png" file

This is working with some data loss and image disruption which is precisely what I need. I tried manually setting the speed to 2Mb/s and turning off auto_ack but it had no noticeable effect.
Transmission log

13.53 - start transmission
14.03 -ongoing 0.9Mb sent
14.28 - ongoing 2.1Mb sent
14:35 - ongoing 2.5Mb sent
14:45 - end transmission 2.6Mb sent

Code
make_buffers()
def make_buffers(size=32):
    """return a list of payloads"""
    # we'll use `size` for the number of payloads in the list and the
    # payloads' length
    buffers = []
    with open("coal.jpeg", "rb") as image:
      f = image.read()
      b = bytearray(binascii.hexlify(f))

    counter = 0
    while counter < sys.getsizeof(b):
        counter += 32
        if not counter > sys.getsizeof(b):
            buffers.append(b[counter:counter+32])
    return buffers

slave()
def slave(timeout=5):
    """Stops listening after a `timeout` with no response"""
    bytes = b''
    nrf.listen = True  # put radio into RX mode and power up
    count = 0  # keep track of the number of received payloads
    start_timer = time.monotonic()  # start timer
    while time.monotonic() < start_timer + timeout:
        if nrf.available():
            count += 1
            # retreive the received packet's payload
            buffer = nrf.read()  # clears flags & empties RX FIFO
            print("Received: {} - {}".format(buffer, count))
            bytes += buffer
            start_timer = time.monotonic()  # reset timer on every RX payload

    # recommended behavior is to keep in TX mode while idle
    nrf.listen = False  # put the nRF24L01 is in TX mode
    print(bytes[0:64])
    f = open("image.jpeg", 'wb')
    f.write(binascii.unhexlify(bytes))
    f.close()

What version of the library are you using? v2.00 or v1.3.0 had significant speed ups implemented.
master_fifo() had much better performance on a RPi compared to master() in the streaming _test.py
SPI implementation on the RPI is noticeably slow. At this point, I can't think of  another way to speed up the library without re-writting adafruit's PureIO libary in C++ (not an easy task).

I can tell by the code you posted, you're using the speed boost included with v2.0.0. I'm sorry, but if you're looking for speed, then python isn't your best friend. Try using TMRh20's RF24 library, which is much faster because its written in C++ (comes also with a python wrapper that is just as fast as C++).
I recently (& coincidentally) made a refactoring change (on my dev branch) that would allow passing in whatever spi/csn/ce_pin objects you want as long as there's a new HWMixin class that can take exactly the objects you passed.
In short, I think this library is starting to outgrow just circuitpython. In the future I may be able to support the popular pigpio, RPi.GPIO + spidev, etc... (not to mention more native support for MicroPython). This also opens up an opportunity to offer NerdRalph's 3 and 4 pin solutions.

update from my dev branch testing: I've been testing the library on RPi2 and RPi4 using spidev (written in C; wrapped into python) instead of Adafruit's busio for SPI implementation. Consequently, I've started using GPIO8 for the CSN pin (on the default SPI bus) because its faster to let the spidev kernel manage that.
These results are from a modified version of master() from stream_test.py.
Test result sending a large-ish (1.24 MB) file from RPi4 to RPi2:

1307379 bytes split into 40857 payloads
Transmission took 56.005716284999835 s
successfully sent 100.0% (40857/40857) of LogoLarge.xcf

Mirrored test sending the same file to RPi4 from RPi2:

1307379 bytes split into 40857 payloads
Transmission took 55.499714189999395 s
successfully sent 100.0% (40857/40857) of LogoLarge.xcf

I have made a few small code changes that should speed things up, but using spidev seems to be the best speed-up. I doubt it would take more than 5 minutes to transfer a 2.5 MB file now 🎉  (upon next release). Also, I have not verified data is un-corrupted on RX side.


ES 1.4.4 plugin returns file content instead of lang value

Just installed the plugin and execute some search queries.
MAPPING
Copy/Paste from the index page of the plugin.
PUT
{
"content": "IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg=="
}
SEARCH
{
"fields" : "content.language.lang",
"query" : {
"match_all" : {}
}
}
RESULT
.................
"fields": {
"content.language.lang": [
"IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg=="
]
}
As we can see the content.language.lang is not as expected.
Any ideas?

Thanks!
I changed the default binary detection for multi-fields, there was a mistake. It should work now with new plugin version <IP_ADDRESS>.

You are welcome.
Try it with newest version - the result is the same.

Next try, version <IP_ADDRESS>
I added a test to ensure this works. The cause of the trouble was the field being not stored.

Confirmed!

I still have the same problem. Using Elasticsearch 1.4.4 with langdetect <IP_ADDRESS>. The REST endpoint works, but the mapping does not. Indexing data to the field only stores the raw content.

Would you share your mapping?
Sent from my iPhone

On 10 Apr 2015, at 07:46, Janek Bevendorff<EMAIL_ADDRESS>wrote:
I still have the same problem. Using Elasticsearch 1.4.4 with langdetect <IP_ADDRESS>. The REST endpoint works, but the mapping does not. Indexing data to the field only stores the raw content.
—
Reply to this email directly or view it on GitHub.

Hi, sorry for the late reply.
My mapping is pretty similar to the example mapping from the README. In fact, I even tried the exact examples as they were described there. Still, there is no language flag. When I search for it, I get an empty result and when I just dump the JSON docs, there is no language flag either, just the plain content.


Detect Installation of MacPorts

Please add a detection for MacPorts and avoid the installation of HomeBrew if MP is already installed.

I can't answer for @skwp but I think this repo only supports brew. Unless @skwp changes his mind I think the best way for you to go is fork the repo to add MacPorts support.
Feel free to close this issue to help the maintainer out

Macports is dead 👍


[Vue warn]: Unknown custom element:  ?

Hello,
I'm just taking some first steps using Javascript, Vue and Isotope. I've tried hours to make a copy of the js.fiddle vue-istope-chemistry-example to work offline (main.js + main.html +main.css), but I can't get it work and get the same problem as in the closed issue #28
var Vue = require('vue');
var lodash = require('lodash');
var Isotope = require('vueisotope');

var count = 0;

var vm = new Vue({  el: "#main",
  data: {
    layouts: [
...

I use npm and browserify to build a bundle.js which I load in the main.html file. When I load the website, the web console tells me the same warning as in the closed issue #28 . Some of the things are there but it doesn't work and has no layout.
I read the readme file and checked on the isotope website and tried to fulfil the recommendations as requested but clearly I don't quite understand. I also tried installing and requiring jQuery and jQueryBridget but nothing works...
Please, let me know if you need any other information from me to help. I understand that I'm asking a bit of hazy question...

Add:
components: {
isotope,
}

adding
 components: { isotope }
does not help (with a comma does not parse in browserify).
Browserify is only ES5 friendly apparently.
I guess I must be doing something different wrong. Thank you for your quick suggestion!

I made a previous comment that it didn't work. But it does work.
I wasn't aware at first that I should've added it into the vm variable instead of just bare into the JS.
Thank so much!


Store pid as a string

When "lwaftr query" a PID, Snabb reported "No such PID". It happened that the list of instances have to be stored as strings instead of integers.

lgtm, this was a regression introduced by refactorings around the instance-name work


D&D 5e Shaped Character Sheet bugs

During my games, I've come across 6 bugs that really get in the way of gameplay. I prefer to open Character sheets as a separate window because it is more convenient. A lot of these bugs still happen when popped out, but the majority is when it is in a separate window. I will post screenshots as I take them.

Leveling up PCs - For some odd reason, when I level them up, it doesn't actually work. The sheet has no change. I have to leave and come back multiple times for the XP and Spell Slots to update, and then the next time I come it will be back at level 2 instead of level 3. I tried changing it in the attributes area as well, but that still did not work.
Advantage/Disadvantage - Today we encountered a weird bug where it wouldn't roll adv., or showed the adv. symbol on a regular roll. It was very confusing.
Saving throws - When making Features and Traits with saving throws, they would be removed right after I wrote them. They used to work just fine.
Weight - After putting in values of weight, it gave the wrong number and didn't update the actual weight the character was holding. After leaving and coming back multiple times it began to work, but broke when we added another item. http://image.prntscr.com/image/54018c60a374427286a900a0c473fd1b.png
Spells - The spell filter has been acting very strangely. It's counting Cantrips as 1st level, then not counting them at all. It's not showing prepared, it's not organizing them by level of spell. Spell making is also very tedious because when I type something into Duration or Material, it automatically deletes what I wrote.
Modify - When clicking modify, it doesn't let me move spells or abilities around. It only works when popped out rather in a separate window. http://image.prntscr.com/image/edd06646c7594c218c72fe48cab41201.png

Currently everything is working fine, but when I play with other people these bugs randomly appear.

If they are only breaking when other players are around please confirm that and reopen the issue for those that still exist.
My game acts a bit weird when other players are around, but I can't consistently reproduce it. If that is the case it's likely a roll20 bug that we need them to fix. But to do that we need a solid reproduction path.

Weight and Spells are acting up again.

Please provide reproduction steps on a new character or send me an invite and give me access to edit the character where the issue can be reproduced consistently.


Support passing container to Repository as either param or option

Being able to pass container as an option means Repository can work with an all-options constructor signature, which makes it easier to inject additional app-specific dependencies to subclasses using tools like dry-auto_inject (with its standard kwargs strategy).
This change is backwards compatible because the standard param continues to be respected.
So now you can initialize a repo in both these ways:
UserRepo.new(rom)
UserRepo.new(container: rom)

And here's an example of how it'd with with dry-auto_inject:
module MyApp
  class Repo < ROM::Repository
    include Import[container: "persistence.rom"]
  end

  class UserRepo < Repo
    include Import["another_dep"]

    # container is injected via superclass
    # can also work with `another_dep` inside instance methods here
  end
end

@solnic @flash-gordon How's this look to you?

I'm not sure what our policy with codeclimate issues is here, but I'd be happy to shorten those yardoc lines 🤷♂

I'm not sure what our policy with codeclimate issues is here

It's to use common sense 😄


Try avoiding test fixtures.

Testing for Travis.  Please ignore until WIP label is removed.

@hcho3 The error on travis seems gone.

@trivialfis Nice! Should this be also included in 1.0.0 release?

Not needed.  Just the fixture used in test.

@hcho3 Actually please cherry pick it, as it helps having successful tests on that branch.


templates/ecommerce doesn't show anything on localhost:3000

Link to reproduction
https://github.com/Snailedlt/payload-ecommerce-template/tree/2ead46073d0cc40cfdec03a7274c6046d89715ab/src
To Reproduce

Clone the repo linked above
Create a local mongoDB database called payload-ecommerce-template-db and with the collection payload-ecommerce-template-collection
copy .env.example into .env
Replace MONGODB_URI with MONGODB_URI=mongodb://<IP_ADDRESS>/payload-ecommerce-template-db
Run yarn && yarn dev

Describe the Bug
Localhost:3000 is not operational after running the code from https://github.com/payloadcms/payload/tree/master/templates/ecommerce.

Full payload version info:
> yarn list --pattern payload
yarn list v1.22.11
├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>├─<EMAIL_ADDRESS>└─<EMAIL_ADDRESS>
Payload Version
1.10.2

@Snailedlt looks like the .env.example in that template was incorrect. I fixed that just now so give it another shot! Also, there is a big PR about to merge soon which overhauls the front-end of this template: https://github.com/payloadcms/payload/pull/2991

@jacobsfletch That fixed it, thanks!
Would love to see an example in a turborepo as well. That way it's easier to see which dependencies are needed for the frontend and which are needed for the backend.


generating sample during training

Feature request
Can I generating sample result during training

Hi @newcworld
Thanks a lot for the issue!
Can you elaborate more about your usecase? What do you use for training and can you share with us a snippet to illustrate your example?
Thanks!

Generate sample result in training
In Image Generate, it means use the fine-tine model generate sample image in training
In Text Generate, it means use the fine-tine model generate sample text in training


Fix warning for yarn and npm: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json

I'm not sure where I saw this error but we don't have a package-lock.json


[SP-6275] [PDI-19754] - Job entry "Delete files" fails if the files that needs to be deleted do not exist

This PR fixes below issue
If files exist, the delete is performed. But if files do not exist, then execution fails.

Closing as it no longer is valid (outdated).


Set source id with variables for Super Source Art and Art Key

Want to be able to Set source id with variables for Super Source Art and Art Key as Set Art properties does no support variables and works with source and not source id
Use case is a atem “micro” panel design for 4 M/E Constellation in Companion where on the select bus row the user is able to assign (shifted) sources to supersource boxes (possible) and art / artkey (workaround requires 52 additional steps; in this design sources can be mapped to buttons (so no fixed 1-10 sources)

Furthermore: "Set Art properties" does not allow Color 1 and Color 2 as Sources for Fill, but does accept it for Key Source. This should be the other way around, I suppose.

This will be in the betas shortly

Super !
On Thu, 15 Aug 2024 at 02:30, Julian Waller @.***>
wrote:

This will be in the betas shortly
—
Reply to this email directly, view it on GitHub
https://github.com/bitfocus/companion-module-bmd-atem/issues/302#issuecomment-2290151046,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A25NECGGWIPIBRJFUAX5BO3ZRPZDVAVCNFSM6AAAAABH6M5D4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJQGE2TCMBUGY
.
You are receiving this because you authored the thread.Message ID:
@.***>


Completed quests

Hello, all my quests reset as if I just joined the server. I was wondering if I could get my quest completions back.
Thank you
IGN: REVISEDMOSS

Closing since I think this was fixed for you? If not, please contact a Quest Designer (QD) that you see online using /LIST.


No Units Spawning

Basic Information
Mission version: 0.963a
Map used: Pulau (This is a custom mission using your DevKit)
Mods used:
CBA_A3
CUP Weapons
CUP Units
CUP Weapons
Pulau
RHS AFRF
RHS USAF
RHS GREF
Specialist Military Arms
USSOC_Lite_mas, task_force_radio
Dedicated or local game: Dedicated (Tested on local)
Source of the mission file (URL): https://steamcommunity.com/sharedfiles/filedetails/?id=1433893511
Individual Things
Did you edit anything within the mission files?
Yes
If yes, what did you edit exactly?
Created an entire map for pulau following the instructions in the devkit wiki. I edited kp_liberation_config.sqf to change BLUFOR to rhs usaf wdl, OPFOR to rhs afrf, and Resistance to RHS gref. I changed some of the presets for blufor rhs usaf wdl as well. I also changed some of the default mission settings.
Short Issue Description
No enemy units spawn at sectors. When I get there the capture bar turns completely blue because there is no one there.
Expected Behaviour
Enemy units to spawn.
Steps to Reproduce the Issue
I will attach my mission pbo. You can use that to see the problem.
Screenshots, Serverlog or any other helpful Information
I read on the wiki that this could be due to the mods not being installed, but I do have all the required mods. I tried this mission with no mission files edited (just the mission.sqm that I made with the mission framework unedited) and the same issue was present either way.

Attach a full serverlog from a session where you captured a sector without enemy spawn.

I never captured a sector. The bar would just turn blue, but the text field for the sector name would still be red, and it would stay like that. There were no enemies to kill.

That log would be sufficient.

Okay do you know where I would find a log on a local server? (I'm doing my testing on a local server)

C:\Users\<yourUserName>\AppData\Local\Arma 3

Arma3_x64_2018-07-07_01-52-07.zip
Just got this log:

Spawned in on the LHD (in the custom mission.sqm)
Flew to the military base in the SE island and landed.
got out (bar was full blue, no enemies, and the sector was not captured)

Looks fine on the first look.
Do this once and test it again:
Set all the presets to the unedited custom sqf (0 for each preset) which will use only vanilla assets.
Check again, if there are no enemies.

I've done that already, and unfortunately it was the same issue. Could this be because of the specific map?

Could be, that you've made a mistake in the missionfile itself, of course.
I would recommend you join the discord and share your missionfile (sqm is enough) there. Someone from the hundeds of players there might have the terrain installed and can check it. Also it could be a place to advertise your derivative.
Discord link is in the readme or the main page of GitHub.

I'll give that a shot, thanks for the help!


HuggingFace dataset loader

If the dataset is hosted as a HuggingFace Dataset on Hub, we need to set up a loader script & config.
Get free HF account https://huggingface.co/join ask ccstan99 to add you to the StampAI org.
Upload to https://huggingface.co/datasets/StampyAI/alignment-research-dataset.
Create loading script instructions https://huggingface.co/docs/datasets/dataset_script
Here's an example of a dataset with multiple subset and different keys/columns: https://huggingface.co/datasets/super_glue

In the bias section README.md on the dataset card (https://huggingface.co/docs/hub/datasets-cards), Rob want to be sure we include verbiage that lesswrong posts have overweighted content on x-risk doom so beware of training or finetuning generative LLMs on the dataset.

Completed by #15 and elsewhere


Molecule Not using Python 3.7

Is there a way to change the python version molecule uses?
when I run molecule create command I get an error like
"msg": "Failed to import docker or docker-py - cannot import name '__version__' from 'docker' (unknown location). Try `pip install docker` or `pip install docker-py` (Python 2.6)"

command pip3 list | grep docker
gives
pip3 list | grep docker
docker            3.7.2
docker-pycreds    0.4.0

by ansible, molecule, testinfra
ansible --version
ansible 2.7.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/path/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.7/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1<IP_ADDRESS>)]
molecule --version
molecule, version 2.20.0
py.test --version
This is pytest version 4.4.1, imported from /usr/local/lib/python3.7/site-packages/pytest.py
setuptools registered plugins:
  testinfra-1.19.0 at /usr/local/lib/python3.7/site-packages/testinfra/plugin.py
python --version
Python 3.7.3

You should install docker in the same env as molecule. Do python -m pip show docker.
OTOH this may be an instance of #2012

Thanks, I uninstalled python2.7. anyhow python2.7 support will be stopped from 2020


partial keyword for classes, same as C#

Suggestion
I think that partial keyword would be come handy if we define a long class in order to separate it to multiple files. that would be very awesome feature if we have it in TypeScript.

The issue template you didn't fill out has a checklist. Your suggestion goes against the design philosophy of TypeScript. It's also a duplicate: #563


[Bug]: System.ObjectDisposedException: ObjectDisposed_Generic ObjectDisposed_ObjectName_Name, Android.OS.PowerManager

Component/Nuget
Jobs (Shiny.Jobs)
What operating system(s) are effected?

[ ] iOS (13+ supported)
[ ] Mac Catalyst
[X] Android (8+ supported)

Version(s) of Operation Systems
13
Hosting Model

[X] MAUI
[ ] Native/Classic Xamarin
[ ] Manual

Steps To Reproduce

Start the app
Unplug the usb cable
Wait for the battery info to change

Expected Behavior
App should not crash
Actual Behavior
App crashes getting the energy saver status
Exception or Log output
05-06 15:41:14.602   882   882 E AndroidRuntime: FATAL EXCEPTION: main
05-06 15:41:14.602   882   882 E AndroidRuntime: Process: com.companyname.objectdisposedsample, PID: 882
05-06 15:41:14.602   882   882 E AndroidRuntime: android.runtime.JavaProxyThrowable: [System.ObjectDisposedException]: Cannot access a disposed object.
05-06 15:41:14.602   882   882 E AndroidRuntime: Object name: 'Android.OS.PowerManager'.
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Java.Interop.JniPeerMembers.AssertSelf(/Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.cs:153)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod(/Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethods_Invoke.cs:146)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Android.OS.PowerManager.get_IsPowerSaveMode(/Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.OS.PowerManager.cs:934)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Microsoft.Maui.Devices.BatteryImplementation.get_EnergySaverStatus(D:\a_work\1\s\src\Essentials\src\Battery\Battery.android.cs:45)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at ObjectDisposedSample.MainViewModel.Battery_BatteryInfoChanged(/Users/t004490/Projects/ObjectDisposedSample/ObjectDisposedSample/MainViewModel.cs:33)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Microsoft.Maui.Devices.BatteryImplementation.OnBatteryInfoChanged(D:\a_work\1\s\src\Essentials\src\Battery\Battery.shared.cs:167)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Microsoft.Maui.Devices.BatteryImplementation.OnBatteryInfoChanged(D:\a_work\1\s\src\Essentials\src\Battery\Battery.shared.cs:157)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Microsoft.Maui.Devices.BatteryImplementation.OnBatteryInfoChanged(D:\a_work\1\s\src\Essentials\src\Battery\Battery.shared.cs:160)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Microsoft.Maui.Devices.BatteryBroadcastReceiver.OnReceive(D:\a_work\1\s\src\Essentials\src\Battery\Battery.android.cs:167)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Android.Content.BroadcastReceiver.n_OnReceive_Landroid_content_Context_Landroid_content_Intent_(/Users/runner/work/1/s/xamarin-android/src/Mono.Android/obj/Release/net8.0/android-34/mcw/Android.Content.BroadcastReceiver.cs:480)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLL_V(/Users/runner/work/1/s/xamarin-android/src/Mono.Android/Android.Runtime/JNINativeWrapper.g.cs:198)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at crc640a8d9a12ddbf2cf2.BatteryBroadcastReceiver.n_onReceive(Native Method)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at crc640a8d9a12ddbf2cf2.BatteryBroadcastReceiver.onReceive(BatteryBroadcastReceiver.java:30)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$android-app-LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1790)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at android.app.LoadedApk$ReceiverDispatcher$Args$$ExternalSyntheticLambda0.run(Unknown Source:2)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:942)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7918)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
05-06 15:41:14.602   882   882 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Code Sample
https://github.com/mattgagnon2/ObjectDisposedSample
Code of Conduct

[X] I have supplied a reproducible sample that is NOT FROM THE SHINY SAMPLES!
[X] I am a Sponsor OR I am using the LATEST stable/beta version from nuget (v3.0 stable - ALPHAS are not taking issues - Sponsors can still send v2 issues)
[X] I am Sponsor OR My GitHub account is 30+ days old
[X] I understand that if I am checking these boxes and I am not actually following what they are saying, I will be removed from this repository!

There is not a single thing in the exception that shows Shiny is even involved.  Your crash shows the MAUI battery implementation which I don't touch

I understand that the exception doesn't show Shiny involved. You can confirm with the sample app attached that the exception is thrown when the energy saver status changes and if you comment out the line that registers the job to run, the exception doesn't happen.
The BatteryImplementation of maui gets a reference to the power manager with
static PowerManager? powerManager;

static PowerManager? PowerManager =>
	powerManager ??= Application.Context.GetSystemService(Context.PowerService) as PowerManager;

and when the EnergySaverStatus is retrieved, PowerManager ends up being a disposed object
public EnergySaverStatus EnergySaverStatus
{
	get
	{
		var status = PowerManager?.IsPowerSaveMode ?? false;
		return status ? EnergySaverStatus.On : EnergySaverStatus.Off;
	}
}

Line 59 of Shiny.Jobs/Platforms/Android/JobManager.cs has the line
using var pm = this.platform.GetSystemService<Android.OS.PowerManager>(Context.PowerService);
and I thought it possible that is getting disposed of there.

I just ran your sample on Android 10, 13, & 14 without issue.
Update your workloads and MAUI version.

That's what I'm running

When you ran the app, did you have the usb cable unplugged? I forgot to list that in my reproduction steps.

Do you have any other suggestions because like I said, if I don't register the job, the exception doesn't occur.

Don't use a foreground service, use shiny's battery implementation, or submit a fix to MAUI

@aritchie Hey Allen! I have a very similar problem to this:
Error setting up task - getsts_process
System.ObjectDisposedException: ObjectDisposed_Generic
ObjectDisposed_ObjectName_Name, Android.OS.PowerManager+WakeLock
?, in void JniPeerMembers.AssertSelf(IJavaPeerable)
?, in void JniInstanceMethods.InvokeVirtualVoidMethod(string, IJavaPeerable, JniArgumentValue*)
?, in void WakeLock.Release()
File "JobManager.cs", line 72, in async void JobManager.RunTask(string taskName, Func<CancellationToken, Task> task)
wakeLock.Release();
I'm using your solution like this:
Shiny.Hosting.Host.GetService<IJobManager>().RunTask("getsts_process", async (c) => {         await RestoreStsAsync(); });
Is this not related as well? Thank you!

Probably.  It's the same mechanism.  The bug in MAUI and I sent a fix already.  It came out I believe as part of 8.0.60

@aritchie Well, thats a problem! :(

You can update the version of MAUI in your csproj
<PropertyGroup>
    <MauiVersion>8.0.60</MauiVersion>
</PropertyGroup>


How to escape LIKE statement?

Hello, I'm trying to escape query which uses LIKE statement. Query itself is dynamic, so I need a way to escape it somehow.
example pseudocode:
var sql = "SELECT * FROM USERS";
var where = "WHERE 1 = 1 ";
if(argument != null) {
    where += "AND someField LIKE '%" + argument + "%'";
}

In this case, argument is left unescaped. if I do escape it, then I would result '%'argument'%' which is syntax error.
Any thoughts?

Although not yet tried, this must work:
"SELECT * FROM dbTable WHERE dbColumn LIKE " + connection.escape('%' + keyword + '%')

var selectQuery = 'SELECT * FROM a WHERE name LIKE ? '
var params = ['%'+searchString+'%'];
connection.query( selectQuery, params, function (err, result) {
...
}

to expand on that (disclaimer, didnt test this!)
var oarams = []
var sql = "SELECT * FROM USERS";
var where = "WHERE 1 = 1 ";
if(argument != null) {
    where += "AND someField LIKE ?";
    params.push('%'+argument+'%')
}

connection.query(sql, params, function(err, result) { ... });

Hi @overflowz, I hope the above answers have been helpful! Please feel free to leave a comment if you're still looking for help :)


Numpy Gamma distribution not working in Numba 0.57+

Reporting a bug

[ x] I have tried using the latest released version of Numba (most recent is
visible in the change log (https://github.com/numba/numba/blob/main/CHANGE_LOG).
[ x] I have included a self contained code sample to reproduce the problem.
i.e. it's possible to run as 'python bug.py'.

Vectorization of Numpy's gamma distribution no longer works. The below code works in Numba 0.56.4, but not in 0.57.0 or 0.57.1.
from numba import float64, vectorize
from numpy.random import gamma
import numpy as np

@vectorize([float64(float64, float64)])
def vec_ig(shape, scale):
    ig = 1. / gamma(shape=shape, scale=1. / scale)
    return ig

a = np.array([0.1, 0.1], dtype=np.float64)
b = np.array([0.1, 0.1], dtype=np.float64)
res = vec_ig(a, b)

The error that I receive is:
Compilation is falling back to object mode WITHOUT looplifting enabled because Function "vec_ig" failed type inference due to: No implementation of function Function(<built-in method gamma of numpy.random.mtrand.RandomState object at 0x7f7ae5b65840>) found for signature:

 >>> gamma(shape=float64, scale=float64)

There are 6 candidate implementations:
  - Of which 6 did not match due to:
  Overload in function 'gammavariate_impl': File: numba/cpython/randomimpl.py: Line 774.
    With argument(s): '(shape=float64, scale=float64)':
   Rejected as the implementation raised a specific error:
     TypingError: missing a required argument: 'alpha'
  raised from /home/devin/.cache/pypoetry/virtualenvs/pybuc-opbxzPBX-py3.9/lib64/python3.9/site-packages/numba/core/typing/templates.py:784

Expected behavior:
Return an array of size 2 with random draws from the gamma distribution.

@devindg thank you for this report, I can confirm that this works on 0.56.4 and doesn't on current HEAD at 249c8ff3206928b486346443ec148508f8c25f8e

I think this is a regression caused by: https://github.com/numba/numba/issues/8061

This is not exactly a regression. NumPy and CPython have some of the same distributions and we share code, but they have different names for the parameters (shape vs alpha and scale vs beta in the case of the gamma distribution). This means if you use named parameters, everything falls apart and if you use positional parameters, everything is fine. Since overloads needs matching parameter names all the way down, this means that switching to overloads merged names. All our tests use only positional parameters, so they behave as expected.
The quick fix is to use positional parameters. I'm not sure what the best long term approach is.

I think there is now a fix at: https://github.com/numba/numba/pull/9059

I think this was fixed by #9111, which superseded #9099, which superseded #9059. The reproducer runs to completion with main (and I have verified that it also did not in my setup with 0.57.1).

@gmarkall thank you for checking on this and following up.


Example for building documentation

Solves #1585

Useful links:

https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html
https://docutils.sourceforge.io/docs/ref/rst/directives.html

:)

By the way @clatapie - there seems to be a pymapdl directory added to this PR which should be deleted.

By the way @clatapie - there seems to be a pymapdl directory added to this PR which should be deleted.

By the way, the text looks good, but everybody knows that English it is not my thing so quickly pinging @PipKat for a quick look :)

PyMAPDL workflow is so much fun... Don't know why the tests are failing honestly, and the logs don't give much info...

PyMAPDL workflow is so much fun... Don't know why the tests are failing honestly, and the logs don't give much info...

Most of the times, just re-run it until it does not fail 😆


Maybe remove the porn link from the bottom of the documentation. (or mark nsfw)

Guess you mean the links that were removed in https://github.com/sj26/mailcatcher/commit/aff5ab7a61c976863257708e77d283db3f757b49
@sj26 looks like the website was not rebuilt after that?

Woah, what porn link?? There definitely shouldn't be one!

Ah, I see. Seems like the fun video game I linked to has bit rotted and the domain has been hijacked. I'll remove the link ASAP.
Sorry, and thank you for letting me know.

Thanks :)

Looks like it was already removed from the README.md, but was still on the website. I've updated the website to the latest version of the README which no longer has the link.
Sorry again, definitely not intentional. 😔

Thanks @sj26!


Attribution-ShareAlike-NC appears twice in the menu of licenses

I know its your favorite license, but there's no need to promote it so much.

Haven't you read "Nudge"?


Memory Free Percentage Sensor is actually Showing Memory Used

Here Memory Free + Memory Used = 15.1
Memory Free is 6.12 which is only 40.53% of the total (15.1) however Memory free percentage says 59.5%
Memory Used is 8.98 which is 59.5% of the total (15.1) which is what Memory free percentage says.
So the Memory Free Percentage sensor is really a Memory Used Percentage

The issue is found in the sensor.py file.
Lines 87 - 96
    ProxmoxSensorEntityDescription(
        key="memory_free_perc",
        name="Memory free percentage",
        icon="mdi:memory",
        native_unit_of_measurement=PERCENTAGE,
        conversion_fn=lambda x: round(x * 100, 1),
        value_fn=lambda x: 1
        - x[ProxmoxKeyAPIParse.MEMORY_FREE] / x[ProxmoxKeyAPIParse.MEMORY_TOTAL],
        state_class=SensorStateClass.MEASUREMENT,
    ),

The value_fn  has a 1 - FREE / TOTAL, the  " 1 - " inverts the percentage.
removing that fixes the issue:
    ProxmoxSensorEntityDescription(
        key="memory_free_perc",
        name="Memory free percentage",
        icon="mdi:memory",
        native_unit_of_measurement=PERCENTAGE,
        conversion_fn=lambda x: round(x * 100, 1),
        value_fn=lambda x: x[ProxmoxKeyAPIParse.MEMORY_FREE] / x[ProxmoxKeyAPIParse.MEMORY_TOTAL],
        state_class=SensorStateClass.MEASUREMENT,
    ),

Corrigido por #26.

still an issue.

still an issue.

Only node sensors had been fixed, for VMs it was fixed in #44. Thanks!

Great, thank you!


project stalled?

some times ago i ask in spice ML about feature parity and integration/replacement spice-html5, but nobody answered....
What is the status of this project? i need to spice html client and try to decide which client to use, but i need to know that project not dropped...

second that.

bump

any info from devs?
as i see flexvdi maintain more actual fork https://github.com/flexVDI/spice-web-client

Minimal update to make work on more modern browsers
https://github.com/chrisjsimpson/spice-web-client