Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug bash to find samples for Event Hubs that need to use the latest package #15111

Closed
AlexGhiondea opened this issue Nov 8, 2020 · 3 comments
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Milestone

Comments

@AlexGhiondea
Copy link
Contributor

AlexGhiondea commented Nov 8, 2020

Update from @ramya-rao-a

Review the .Python samples for Event Hubs in the below locations to find the ones that do not use the latest version of the package. Update this issue with the list of samples that need updating.

Additionally, ensure the samples that live next to the source code for Event Hubst in this repo shows up in Event Hubs Python samples under docs.microsoft.com/samples. This is done by setting up the right metadata. Ensure that these samples are not outdated.

@AlexGhiondea AlexGhiondea added the Client This issue points to a problem in the data-plane of the library. label Nov 8, 2020
@AlexGhiondea AlexGhiondea added this to the MQ-2020 milestone Nov 8, 2020
@ramya-rao-a ramya-rao-a changed the title Bug bash to find outdated content (docs & samples) to accompish tasks for Event Hubs Bug bash to find samples for Event Hubs that need to use the latest package Dec 11, 2020
@yunhaoling
Copy link
Contributor

yunhaoling commented Dec 15, 2020

  • Event Hubs Python samples under docs.microsoft.com/samples
Samples Link Status Notes Action
Azure Event Hubs client library for Python Samples link
Collecting Scheduled Events with Event Hub link
Azure Event Hubs client library samples with persistent checkpointing for Python link
Azure Event Hubs client library samples with persistent checkpointing for Python link this is an async sample, but same title as the sync one, can we improve that?
  • Event Hubs Python samples repos under Azure-samples org:
    • no sample code repo for python + eventhub (?)
    • keywords checked: eventhub(EventHub), event hub(Event Hub), event hubs(Event Hubs), event-hub(Event-Hub), event-hubs(Event-Hubs)

@swathipil
Copy link
Member

swathipil commented Dec 16, 2020

Bugs/Typos/Etc.:

SYNC SAMPLES

  • authenticate_with_sas_token.py
  • client_creation.py
  • client_identity_authentication.py
  • connection_string_authentication.py
  • proxy.py
  • receive_batch_with_checkpoint.py
  • recv.py
  • recv_for_period.py
  • recv_track_last_enqueued_event_prop.py
  • recv_with_checkpoint_by_batch.py
  • line 54: misnomer, since batch=False by default in .receive(), and True is not passed in. receive_batch() is also not used.
  • recv_with_checkpoint_by_time_interval.py
  • recv_with_checkpoint_store.py
  • recv_with_custom_starting_position.py
  • sample_code_eventhub.py
  • send.py
  • send_stream.py

SYNC PERSTISTENT CHECKPOINTING

  • receive_events_using_checkpoint_store.py
  • receive_events_using_checkpoint_store_storage_api_version.py

ASYNC_SAMPLES

  • authenticate_with_sas_token_async.py
  • client_creation_async.py
  • client_identity_authentication_async.py
  • connection_string_authentication_async.py
  • line 23: results in "SyntaxError: 'async with' outside async function"
  • iot_hub_connection_string_receive_async.py
  • was able to connect to the iothub without any exceptions, so I assumed receiving events with the EventHubConsumer would work as well. did not actually send events to the iot hub, since it would take extra time to setup, which was not the objective of the sample.
  • proxy_async.py
  • receive_batch_with_checkpoint_async.py
  • recv_async.py
  • recv_for_period_async.py
  • recv_track_last_enqueued_event_prop_async.py
  • recv_with_checkpoint_by_batch_async.py
  • line 61: not receiving by batch, so must rename
  • recv_with_checkpoint_by_time_interval_async.py
  • recv_with_checkpoint_store_async.py
  • recv_with_custom_starting_position_async.py
  • sample_code_eventhub_async.py
  • send_async.py
  • send_stream_async.py

ASYNC PERSTISTENT CHECKPOINTING

  • receive_events_using_checkpoint_store.py
  • receive_events_using_checkpoint_store_storage_api_version.py

MISC

@ramya-rao-a
Copy link
Contributor

Nice find @swathipil

@yunhaoling To your question on sample title, we control that. You can make the change at https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/samples#azure-event-hubs-client-library-samples-with-persistent-checkpointing-for-python

@swathipil Please use #15114 to track the changes for the issues you listed above.

https://docs.microsoft.com/en-us/samples/azure-samples/virtual-machines-python-scheduled-events-central-logging/virtual-machines-python-scheduled-events-central-logging/ uses the REST APIs to send events. I have another tracking item to consider whether or not we should update it to use the Event Hubs package

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Event Hubs
Projects
None yet
Development

No branches or pull requests

5 participants