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

Add log streaming for container app jobs #7454

Merged
merged 23 commits into from
Jun 4, 2024
Merged

Add log streaming for container app jobs #7454

merged 23 commits into from
Jun 4, 2024

Conversation

lihaMSFT
Copy link
Contributor

@lihaMSFT lihaMSFT commented Apr 3, 2024


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

  • az containerapp job logs show
  • az containerapp job replica

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copy link

azure-client-tools-bot-prd bot commented Apr 3, 2024

⚠️Azure CLI Extensions Breaking Change Test
⚠️containerapp
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd containerapp job logs sub group containerapp job logs added
⚠️ 1011 - SubgroupAdd containerapp job replica sub group containerapp job replica added

Copy link

Hi @lihaMSFT,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Apr 3, 2024

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link

@MoazzemHossain-bot MoazzemHossain-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link

@MoazzemHossain-bot MoazzemHossain-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for supporting

Copy link

@Moazzem-Hossain-pixel Moazzem-Hossain-pixel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Comment on lines 23 to 24
* 'az containerapp job logs show': Support log streaming for job execution
* 'az containerapp job replica list': Support list replicas of a job execution
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move these to upcoming.

@Greedygre
Copy link
Contributor

Greedygre commented May 29, 2024

About CI failed:
There are 5 tests failed, I have help to fix 4 of them with PR due to az containerapp job update polling logic fix in azure-cli.
The rest one test_containerappjob_logstream, please rerun it with --live, and update the recording file.

FAILED src/containerapp/azext_containerapp/tests/latest/test_containerappjob_crud.py::ContainerAppJobsCRUDOperationsTest::test_containerapp_manualjob_crudoperations_e2e
FAILED src/containerapp/azext_containerapp/tests/latest/test_containerappjob_event_triggered_crud.py::ContainerAppJobsCRUDOperationsTest::test_containerapp_eventjob_crudoperations_e2e
FAILED src/containerapp/azext_containerapp/tests/latest/test_containerappjob_executions.py::ContainerAppJobsExecutionsTest::test_containerappjob_logstream
FAILED src/containerapp/azext_containerapp/tests/latest/test_containerappjob_with_yaml.py::ContainerAppJobsExecutionsLocationNotInStageTest::test_containerappjob_create_with_yaml
FAILED src/containerapp/azext_containerapp/tests/latest/test_containerappjob_with_yaml.py::ContainerAppJobsExecutionsLocationNotInStageTest::test_containerappjob_eventtriggered_create_with_yaml

@lihaMSFT
Copy link
Contributor Author

@Greedygre the tests are passing now.

@Greedygre
Copy link
Contributor

Greedygre commented May 31, 2024

@Greedygre the tests are passing now.

Please resolve the conflict. Or you can assign the right to my account Greedygre, I can help to resolve small conflict in history.rst

Copy link
Contributor

@Greedygre Greedygre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve the conflict conflict in src/containerapp/HISTORY.rst

@yonzhan
Copy link
Collaborator

yonzhan commented May 31, 2024

Please fix conflicting files.

@Greedygre
Copy link
Contributor

Hi @lihaMSFT

I recommend you only update your test's yaml file test_containerappjob_logstream after update azure-cli dev branch to latest code then rerun it with --live.
About other 4 tests you can use command git checkout main src/containerapp/azext_containerapp/tests/latest/recordings/test_containerapp_eventjob_crudoperations_e2e.yaml to checkout to the main branch.

Please assign permission for your repo to my account Greedygre, so that I can handle small conflict.

Comment on lines 208 to 211
with self.command_group('containerapp job logs') as g:
g.custom_show_command('show', 'stream_job_logs')

with self.command_group('containerapp job replica') as g:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add is_preview=True as they are preview feature's commands.

@@ -205,6 +205,12 @@ def load_command_table(self, args):
g.custom_show_command('show', 'show_eureka_server_for_spring')
g.custom_command('delete', 'delete_eureka_server_for_spring', confirmation=True, supports_no_wait=True)

with self.command_group('containerapp job logs') as g:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as this, add is_preview=True.

@yanzhudd yanzhudd merged commit dff3621 into Azure:main Jun 4, 2024
15 of 16 checks passed
liorstauber pushed a commit to liorstauber/azure-cli-extensions that referenced this pull request Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot auto-cal-version ContainerApp customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants