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

[E2E Databricks]: feat: improving deployment experience and functionality #970

Merged
merged 152 commits into from
Dec 20, 2024

Conversation

ydaponte
Copy link
Collaborator

Type of PR

  • Documentation changes
  • Code changes
  • Test changes
  • CI-CD changes

Purpose

Does this introduce a breaking change? If yes, details on what can break

Yes, all the changes were already tested before merging the feature branch, however the changes can break the following:

  • Devcontainer
  • Bicep deployment
  • CICD

Author pre-publish checklist

  • Added test to prove my fix is effective or new feature works
  • No PII in logs
  • Made corresponding changes to the documentation

Validation steps

  • Open sample on the devcontainer
  • Run deployment and check that there are no errors
  • Run ADF pipeline and CICD pipelines with no errors

Issues Closed or Referenced

LiliamLeme and others added 30 commits December 2, 2024 09:47
to delete the pipeline if already exist before creating a new one.
fixing as feedbacks
deploy_azdo_pipelines -> removed the functions
Common -> has the functions from deploy_azdo_pipelines
README -> some fixes around Dev Container consistency
deploy_azdo_pipelines -> removed the functions
Common -> has the functions from deploy_azdo_pipelines
README -> some fixes around Dev Container consistency
deploy_azdo_pipelines -> removed the functions
Common -> has the functions from deploy_azdo_pipelines
README -> some fixes around Dev Container consistency
tested and it worked:


Pipeline 23 was deleted successfully.
Deleted existing pipeline: mdwdops-ci-qa-python (Pipeline ID: 23)
… when applicable (#915)

* add soft delete and other fixes

* added purge protection

* moving variable initialization in init_environment script

* rebase from feature branch

* Update e2e_samples/parking_sensors/.devcontainer/.envtemplate

Co-authored-by: Yennifer Santos <[email protected]>

* initial commit

* fix merge errors

* merge errors

* add delete by deployment id

* handle key vault purge protection

* small fix in condition

* fix if condition

* nit

* code refactoring

---------

Co-authored-by: Yennifer Santos <[email protected]>
fix the path 
./scripts/
move images from root folder to isolate sample changes
LiliamLeme and others added 28 commits December 19, 2024 07:44
adding comment
## when returning a pipeline that does not exist. This is an unhandled result for the variable. So I made the validation direct in the IF
the command list handles the pipeline does not exist results, as command show  does not handle.
hence, changing to list
name change
to delete the pipeline if already exist before creating a new one.
tests and fixes:

upon consolidating the create and delete pipelines in the same function. It does not work for this scenario.... .."cd_release_pipeline_id=$(createPipeline..."
this one is waiting for an ID to proceed in create a variable. If I add everything in the same function the results kind of get confuse and it fails:
like
+ az pipelines delete --id 59 --yes
+ cd_release_pipeline_id='Pipeline 59 was deleted successfully.'
+ az pipelines variable create --name devAdfName --pipeline-id 'Pipeline 59 was deleted successfully.' --value mdwdops-adf-dev-dnqom
invalid literal for int() with base 10: 'Pipeline 59 was deleted successfully.'

.....I tried multiple ways to fix that, removed all the echos, and lect only the return pipeline_id. But still failed. Because the return pipeline 59 was deleted successfully... is from AZdo itself. So I am keeping separated,

2) I was testing 2 scenarios.... First creation of pipelines if there is nothing, second round of deployment if the pipeline is there, delete first.
the scenario that delete first was fine.
the first round of deployment was failing because az pipelines show --name "$full_pipeline_name" --output json in fact returns something like: No pipeline found with name
if using the json 2>/dev/null, it returns nothing. Nut validating with [[ -z "$pipeline_output" || "$pipeline_output" == "null" ] did not work. Bash just did not validated any if....I guess because is not empty or null, it is kind of unhandled result .
logs would be like this:
++ az pipelines show --name mdwdops-ci-qa-python --output json
+ pipeline_id=

 For this what I did, instead of using a variable I added the instruction in the IF. So in that way, if does not exist, this validation is just skipt,if exists it works and delete.
tests and fixes

Upon consolidating the create and delete pipelines in the same function. It does not work for this scenario.... .."cd_release_pipeline_id=$(createPipeline..."
this one is waiting for an ID to proceed in create a variable. If I add everything in the same function the results kind of get confuse and it fails:
like
+ az pipelines delete --id 59 --yes
+ cd_release_pipeline_id='Pipeline 59 was deleted successfully.'
+ az pipelines variable create --name devAdfName --pipeline-id 'Pipeline 59 was deleted successfully.' --value mdwdops-adf-dev-dnqom
invalid literal for int() with base 10: 'Pipeline 59 was deleted successfully.'

.....I tried multiple ways to fix that, removed all the echos, and lect only the return pipeline_id. But still failed. Because the return pipeline 59 was deleted successfully... is from AZdo itself. So I am keeping separated,

2) I was testing 2 scenarios.... First creation of pipelines if there is nothing, second round of deployment if the pipeline is there, delete first.
the scenario that delete first was fine.
the first round of deployment was failing because az pipelines show --name "$full_pipeline_name" --output json in fact returns something like: No pipeline found with name
if using the json 2>/dev/null, it returns nothing. Nut validating with [[ -z "$pipeline_output" || "$pipeline_output" == "null" ] did not work. Bash just did not validated any if....I guess because is not empty or null, it is kind of unhandled result .
logs would be like this:
++ az pipelines show --name mdwdops-ci-qa-python --output json
+ pipeline_id=

 For this what I did, instead of using a variable I added the instruction in the IF. So in that way, if does not exist, this validation is just skipt,if exists it works and delete.
adding comment
the command list handles the pipeline does not exist results, as command show  does not handle.
hence, changing to list
2) Remove Azdo configuration from the post_create
3)Adding the init_enviromnent to run before the
prequirements
4)change Readme to reflect those changes in Login
2) Remove Azdo configuration from the post_create
3)Adding the init_enviromnent to run before the
prequirements
4)change Readme to reflect those changes in Login
adjusting identantion
aligment incorrect
* initial changes

* disable debug

* typo

* reference common.sh in init_environment and remove when not needed

* remove commented code

* remove commented code
Copy link
Contributor

@elenaterenzi elenaterenzi left a comment

Choose a reason for hiding this comment

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

Tested and LGTM

@ydaponte ydaponte merged commit b38f0da into main Dec 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working capability: CI/CD Related to CI/CD capability documentation Improvements or additions to documentation e2e: parking-sensors-databricks feature P0 Uber URGENT priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants