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

Panic when deploying application #6882

Closed
AaronCrawfis opened this issue Nov 29, 2023 · 6 comments · Fixed by #6889
Closed

Panic when deploying application #6882

AaronCrawfis opened this issue Nov 29, 2023 · 6 comments · Fixed by #6889
Labels
bug Something is broken or not working as expected triaged This issue has been reviewed and triaged

Comments

@AaronCrawfis
Copy link
Contributor

AaronCrawfis commented Nov 29, 2023

Bug information

Steps to reproduce (required)

  1. Create a new k3s cluster with k3d cluster create
  2. Initialize Radius 0.27 with rad init
  3. Create a new file named app.bicep with the following contents:
import radius as radius

resource app 'Applications.Core/applications@2023-10-01-preview' = {
  name: 'myapp'
}
  1. Deploy the app with rad deploy ./app.bicep
  2. Get error message (below)

Observed behavior (required)

rad deploy .\app.bicep
Building .\app.bicep...
Deploying template '.\app.bicep' into environment 'default' from workspace 'default'...

Deployment In Progress...

..                   myapp           Applications.Core/applications
Error: {
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please see the details for the specific operation that failed.",
  "target": "/planes/radius/local/resourceGroups/default/providers/Microsoft.Resources/deployments/rad-deploy-d680eed6-5e9d-4892-9beb-7e8c3d231bb9",
  "details": [
    {
      "code": "Internal",
      "message": "unexpected error: runtime error: invalid memory address or nil pointer dereference",
      "target": "/planes/radius/local/resourceGroups/default/providers/Applications.Core/applications/myapp"
    }
  ]
}

TraceId:  0b5c759598282c25d75c4b9a65e12c0b

Desired behavior (required)

I expect that my application can deploy correctly

Workaround (optional)

None

System information

rad Version (required)

Operating system (required)

Windows 11, x64

AB#10593

@AaronCrawfis AaronCrawfis added bug Something is broken or not working as expected important This item is a high priority Issue we intend to address as soon as possible labels Nov 29, 2023
@radius-triage-bot
Copy link

👋 @AaronCrawfis Thanks for filing this bug report.

A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

For more information on our triage process please visit our triage overview

@radius-triage-bot
Copy link

We've prioritized work on this issue. Please subscribe to this issue for notifications, we'll provide updates as we make progress.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

@AaronCrawfis
Copy link
Contributor Author

AaronCrawfis commented Nov 29, 2023

@rynowak
Copy link
Contributor

rynowak commented Nov 29, 2023

I'm guessing that this repros when properties is omitted.

@AaronCrawfis
Copy link
Contributor Author

I'm guessing that this repros when properties is omitted.

Yep that fixed it. We should make properties.environment a required field

@AaronCrawfis AaronCrawfis removed the important This item is a high priority Issue we intend to address as soon as possible label Nov 30, 2023
@shalabhms shalabhms added the triaged This issue has been reviewed and triaged label Dec 7, 2023
@radius-triage-bot
Copy link

👍 We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

vinayada1 added a commit that referenced this issue Jan 23, 2024
# Description

Return an error if application properties or properties.environment have
not been specified

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: #6882 
## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at e982e0a</samp>

### Summary
:sparkles::bug::wastebasket:

<!--
1. :sparkles: - This emoji represents the addition of new features or
enhancements, such as the new custom actions, the new approval workflow,
the new API version, and the new test cases.
2. :bug: - This emoji represents the fixing of bugs or errors, such as
the error handling for the application conversion, and the typo in the
bug report body.
3. :wastebasket: - This emoji represents the removal of unused or
deprecated code, such as the `/ok-to-test` command and its related
functions.
-->
This pull request introduces a new approval mechanism for the functional
tests workflow, a new API version for the application resource with new
validations, and some error handling and testing improvements. The pull
request modifies the `radius-bot.js` script, the `.github` folder, the
`docs` folder, and the `pkg/corerp` folder. The pull request aims to
enhance the security, quality, and usability of the radius project.

> _To test PRs with more care_
> _We added approval and error_
> _We saved PR number_
> _With a custom actioner_
> _And fixed a typo in bug reporter_

### Walkthrough
* Add a new API version for the application resource with new features
and validations
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Validate that the properties and environment fields are not nil in the
versioned model
`pkg/corerp/api/v20231001preview/application_conversion.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37))
- Return an error if the conversion from the versioned to the data model
fails in `pkg/corerp/datamodel/converter/application_converter.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Add test cases and test data files for the application conversion
logic in
`pkg/corerp/api/v20231001preview/application_conversion_test.go` and
`pkg/corerp/api/v20231001preview/testdata`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2))
* Change the trigger and approval process for the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
- Remove the /ok-to-test command and its logic from the issue comment
create event handler and the functions in
`pkg/corerp/scripts/radius-bot.js`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144))
- Add a new workflow for approving the functional tests run for a pull
request in `.github/workflows/functional-tests-approval.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17))
- Modify the trigger conditions and the steps for setting up the
checkout target for the functional tests workflow in
`.github/workflows/functional-test.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118))
- Add a documentation section to explain the new approval process for
the functional tests workflow in
`docs/contributing/contributing-pull-requests/README.md`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
* Add custom actions to save and download the PR number as an artifact
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to save the PR number as an artifact in
`.github/actions/save-pr-as-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to download the PR number from the artifact in
`.github/actions/download-pr-data-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43))
* Fix a typo in the bug report body generated by the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL579-L578))

---------

Signed-off-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
sk593 pushed a commit to sk593/radius that referenced this issue Jan 24, 2024
…t#6889)

# Description

Return an error if application properties or properties.environment have
not been specified

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#6882
## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at e982e0a</samp>

### Summary
:sparkles::bug::wastebasket:

<!--
1. :sparkles: - This emoji represents the addition of new features or
enhancements, such as the new custom actions, the new approval workflow,
the new API version, and the new test cases.
2. :bug: - This emoji represents the fixing of bugs or errors, such as
the error handling for the application conversion, and the typo in the
bug report body.
3. :wastebasket: - This emoji represents the removal of unused or
deprecated code, such as the `/ok-to-test` command and its related
functions.
-->
This pull request introduces a new approval mechanism for the functional
tests workflow, a new API version for the application resource with new
validations, and some error handling and testing improvements. The pull
request modifies the `radius-bot.js` script, the `.github` folder, the
`docs` folder, and the `pkg/corerp` folder. The pull request aims to
enhance the security, quality, and usability of the radius project.

> _To test PRs with more care_
> _We added approval and error_
> _We saved PR number_
> _With a custom actioner_
> _And fixed a typo in bug reporter_

### Walkthrough
* Add a new API version for the application resource with new features
and validations
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Validate that the properties and environment fields are not nil in the
versioned model
`pkg/corerp/api/v20231001preview/application_conversion.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37))
- Return an error if the conversion from the versioned to the data model
fails in `pkg/corerp/datamodel/converter/application_converter.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Add test cases and test data files for the application conversion
logic in
`pkg/corerp/api/v20231001preview/application_conversion_test.go` and
`pkg/corerp/api/v20231001preview/testdata`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2))
* Change the trigger and approval process for the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
- Remove the /ok-to-test command and its logic from the issue comment
create event handler and the functions in
`pkg/corerp/scripts/radius-bot.js`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144))
- Add a new workflow for approving the functional tests run for a pull
request in `.github/workflows/functional-tests-approval.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17))
- Modify the trigger conditions and the steps for setting up the
checkout target for the functional tests workflow in
`.github/workflows/functional-test.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118))
- Add a documentation section to explain the new approval process for
the functional tests workflow in
`docs/contributing/contributing-pull-requests/README.md`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
* Add custom actions to save and download the PR number as an artifact
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to save the PR number as an artifact in
`.github/actions/save-pr-as-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to download the PR number from the artifact in
`.github/actions/download-pr-data-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43))
* Fix a typo in the bug report body generated by the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL579-L578))

---------

Signed-off-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
willdavsmith pushed a commit to willdavsmith/radius that referenced this issue Jan 26, 2024
…t#6889)

# Description

Return an error if application properties or properties.environment have
not been specified

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#6882 
## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at e982e0a</samp>

### Summary
:sparkles::bug::wastebasket:

<!--
1. :sparkles: - This emoji represents the addition of new features or
enhancements, such as the new custom actions, the new approval workflow,
the new API version, and the new test cases.
2. :bug: - This emoji represents the fixing of bugs or errors, such as
the error handling for the application conversion, and the typo in the
bug report body.
3. :wastebasket: - This emoji represents the removal of unused or
deprecated code, such as the `/ok-to-test` command and its related
functions.
-->
This pull request introduces a new approval mechanism for the functional
tests workflow, a new API version for the application resource with new
validations, and some error handling and testing improvements. The pull
request modifies the `radius-bot.js` script, the `.github` folder, the
`docs` folder, and the `pkg/corerp` folder. The pull request aims to
enhance the security, quality, and usability of the radius project.

> _To test PRs with more care_
> _We added approval and error_
> _We saved PR number_
> _With a custom actioner_
> _And fixed a typo in bug reporter_

### Walkthrough
* Add a new API version for the application resource with new features
and validations
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Validate that the properties and environment fields are not nil in the
versioned model
`pkg/corerp/api/v20231001preview/application_conversion.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37))
- Return an error if the conversion from the versioned to the data model
fails in `pkg/corerp/datamodel/converter/application_converter.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Add test cases and test data files for the application conversion
logic in
`pkg/corerp/api/v20231001preview/application_conversion_test.go` and
`pkg/corerp/api/v20231001preview/testdata`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2))
* Change the trigger and approval process for the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
- Remove the /ok-to-test command and its logic from the issue comment
create event handler and the functions in
`pkg/corerp/scripts/radius-bot.js`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144))
- Add a new workflow for approving the functional tests run for a pull
request in `.github/workflows/functional-tests-approval.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17))
- Modify the trigger conditions and the steps for setting up the
checkout target for the functional tests workflow in
`.github/workflows/functional-test.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118))
- Add a documentation section to explain the new approval process for
the functional tests workflow in
`docs/contributing/contributing-pull-requests/README.md`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
* Add custom actions to save and download the PR number as an artifact
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to save the PR number as an artifact in
`.github/actions/save-pr-as-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to download the PR number from the artifact in
`.github/actions/download-pr-data-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43))
* Fix a typo in the bug report body generated by the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL579-L578))

---------

Signed-off-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
willdavsmith pushed a commit to willdavsmith/radius that referenced this issue Mar 4, 2024
…t#6889)

# Description

Return an error if application properties or properties.environment have
not been specified

## Type of change

<!--

Please select **one** of the following options that describes your
change and delete the others. Clearly identifying the type of change you
are making will help us review your PR faster, and is used in authoring
release notes.

If you are making a bug fix or functionality change to Radius and do not
have an associated issue link please create one now.

-->

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

<!--

Please update the following to link the associated issue. This is
required for some kinds of changes (see above).

-->

Fixes: radius-project#6882 
## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at e982e0a</samp>

### Summary
:sparkles::bug::wastebasket:

<!--
1. :sparkles: - This emoji represents the addition of new features or
enhancements, such as the new custom actions, the new approval workflow,
the new API version, and the new test cases.
2. :bug: - This emoji represents the fixing of bugs or errors, such as
the error handling for the application conversion, and the typo in the
bug report body.
3. :wastebasket: - This emoji represents the removal of unused or
deprecated code, such as the `/ok-to-test` command and its related
functions.
-->
This pull request introduces a new approval mechanism for the functional
tests workflow, a new API version for the application resource with new
validations, and some error handling and testing improvements. The pull
request modifies the `radius-bot.js` script, the `.github` folder, the
`docs` folder, and the `pkg/corerp` folder. The pull request aims to
enhance the security, quality, and usability of the radius project.

> _To test PRs with more care_
> _We added approval and error_
> _We saved PR number_
> _With a custom actioner_
> _And fixed a typo in bug reporter_

### Walkthrough
* Add a new API version for the application resource with new features
and validations
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Validate that the properties and environment fields are not nil in the
versioned model
`pkg/corerp/api/v20231001preview/application_conversion.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-d2cea876bc0e0849a386e79c8cb75b19c1a69022482c4c09b683ed4651fd673fR29-R37))
- Return an error if the conversion from the versioned to the data model
fails in `pkg/corerp/datamodel/converter/application_converter.go`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c69758755a898a2bf2a9e897278d1fbf63138f41cba6c166c11fd775aab89c53R49-R51))
- Add test cases and test data files for the application conversion
logic in
`pkg/corerp/api/v20231001preview/application_conversion_test.go` and
`pkg/corerp/api/v20231001preview/testdata`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-dc0244afef9b2619d0a7837f85235bf32273a15673eb4ba1271b0ebb91f21728R51-R60),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-219a76ac16a85c0d41806b70a3554a25882b7ba8a132da7bfe169d2330e7d51cL1-R23),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-87c7befd7dc89411996a7e8259a3b11e586c14d1c80a823c863f0d069f215c17L1-R2))
* Change the trigger and approval process for the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
- Remove the /ok-to-test command and its logic from the issue comment
create event handler and the functions in
`pkg/corerp/scripts/radius-bot.js`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L47-L49),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L79-L144))
- Add a new workflow for approving the functional tests run for a pull
request in `.github/workflows/functional-tests-approval.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-336842f9ad3be6e33759449fb701d721641268b444401b71c63a4e371ae91598R1-R17))
- Modify the trigger conditions and the steps for setting up the
checkout target for the functional tests workflow in
`.github/workflows/functional-test.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL26-R30),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL98-R118))
- Add a documentation section to explain the new approval process for
the functional tests workflow in
`docs/contributing/contributing-pull-requests/README.md`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-fb0f7798935160052ab4612b954c50fb8f31d3825cce346f5feb693c418f2abaR83-R84))
* Add custom actions to save and download the PR number as an artifact
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43),
[link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to save the PR number as an artifact in
`.github/actions/save-pr-as-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-a06147d654903226b1bb5a4635b89fa5f7e0bd2168a3590f05bdbe65c2c0e2d4R1-R17))
- Add an action to download the PR number from the artifact in
`.github/actions/download-pr-data-artifact/action.yaml`
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-47021e538b3451866b8d8aa608664649ca716a99718bbaa9472a3af67dcd0610R1-R43))
* Fix a typo in the bug report body generated by the functional tests
workflow
([link](https://github.com/radius-project/radius/pull/6889/files?diff=unified&w=0#diff-c79f364a9293abaaa8595776b74674e24bec6287834e63ab8aa7aec6a42f0dbcL579-L578))

---------

Signed-off-by: vinayada1 <28875764+vinayada1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken or not working as expected triaged This issue has been reviewed and triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants