-
Notifications
You must be signed in to change notification settings - Fork 36
[ODS-6434]Rebuild Database Templates build -Skip already successful package creation from working branch #1103
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
Conversation
…ation from working branch
…mplate.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL package version
…M, Sample new package version Step
…i.Ods.Populated.Template ,EdFi.Ods.Populated.Template.PostgreSQL new package version
…e.PostgreSQL ,EdFi.Ods.Populated.Template ,EdFi.Ods.Populated.Template.PostgreSQL package version
…mplate.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL package version
build.githubactions.ps1
Outdated
} | ||
} | ||
|
||
function AddOrUpdateRepositoriesJson { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function AddOrUpdateRepositoriesJson { | |
function CreateOrUpdateRepositoriesJson { |
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-Extensions/branches/${{ env.current_branch }}" | ||
.\build.githubactions.ps1 TestBranchExists -RepoName "Ed-Fi-Extensions" -BranchName "${{ env.current_branch }}" -Url $url | ||
|
||
- name: Check any failed previous Workflow Run exist in current branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Check any failed previous Workflow Run exist in current branch | |
- name: Check for any failed previous workflow runs in the current branch |
if_no_artifact_found: ignore | ||
continue-on-error: true | ||
|
||
- name: Read each repo last commit for repo Ed-Fi-ODS-Implementation and stored it in repositories.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Read each repo last commit for repo Ed-Fi-ODS-Implementation and stored it in repositories.json | |
- name: Read the last commit for Ed-Fi-ODS-Implementation and store it in repositories.json |
$implementationUrl = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Implementation/commits?sha=$branchName&since=$sinceDate&page=1&per_page=200" | ||
.\build.githubactions.ps1 'AddOrUpdateRepositoriesJson' -Url $implementationUrl -RepoName 'Ed-Fi-ODS-Implementation' | ||
|
||
- name: Read each repo last commit for repo Ed-Fi-ODS and stored it in repositories.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Read each repo last commit for repo Ed-Fi-ODS and stored it in repositories.json | |
- name: Read the last commit for Ed-Fi-ODS and store it in repositories.json |
$odsUrl = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/commits?sha=$branchName&since=$sinceDate&page=1&per_page=200" | ||
.\build.githubactions.ps1 'AddOrUpdateRepositoriesJson' -Url $odsUrl -RepoName 'Ed-Fi-ODS' | ||
|
||
- name: Read each repo last commit for repo Ed-Fi-Extensions and stored it in repositories.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Read each repo last commit for repo Ed-Fi-Extensions and stored it in repositories.json | |
- name: Read the last commit for Ed-Fi-Extensions and store it in repositories.json |
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-Extensions/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}" | ||
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'TPDM_successful_runexist' | ||
|
||
- name: Compare already configuration.packages.json updated with EdFi.Ods.Extensions.TPDM package Version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Compare already configuration.packages.json updated with EdFi.Ods.Extensions.TPDM package Version | |
- name: Check if configuration.packages.json has an updated EdFi.Ods.Extensions.TPDM package Version |
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}" | ||
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'populated_template_successful_runexist' | ||
|
||
- name: Compare already configuration.packages.json updated with EdFi.Ods.Populated.Template package Version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Compare already configuration.packages.json updated with EdFi.Ods.Populated.Template package Version | |
- name: Check if configuration.packages.json has an updated EdFi.Ods.Populated.Template package Version |
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}" | ||
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'populated_template_postgreSQL_successful_runexist' | ||
|
||
- name: Compare already configuration.packages.json updated with EdFi.Ods.Populated.Template.PostgreSQL package Version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Compare already configuration.packages.json updated with EdFi.Ods.Populated.Template.PostgreSQL package Version | |
- name: Check if configuration.packages.json has an updated EdFi.Ods.Populated.Template.PostgreSQL package Version |
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}" | ||
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'minimal_template_successful_runexist' | ||
|
||
- name: Compare already configuration.packages.json updated with EdFi.Ods.Minimal.Template package Version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Compare already configuration.packages.json updated with EdFi.Ods.Minimal.Template package Version | |
- name: Check if configuration.packages.json has an updated EdFi.Ods.Minimal.Template package Version |
$url = "https://api.github.com/repos/Ed-Fi-Alliance-OSS/Ed-Fi-ODS/actions/workflows/$workflow_file_name/runs?branch=${{ env.current_branch }}" | ||
.\build.githubactions.ps1 'WorkflowCheck' -Url $url -ExpectedStatus 'completed' -ExpectedConclusions @('success') -StatusEnvName 'minimal_template_postgreSQL_successful_runexist' | ||
|
||
- name: Compare already configuration.packages.json updated with EdFi.Ods.Minimal.Template.PostgreSQL package Version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Compare already configuration.packages.json updated with EdFi.Ods.Minimal.Template.PostgreSQL package Version | |
- name: Check if configuration.packages.json has an updated EdFi.Ods.Minimal.Template.PostgreSQL package Version |
…e.PostgreSQL ,EdFi.Ods.Populated.Template ,EdFi.Ods.Populated.Template.PostgreSQL package version
…mplate.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL package version
@vimayya All review comments are fixed . Ready for Review again . Thanks |
…e.PostgreSQL ,EdFi.Ods.Populated.Template ,EdFi.Ods.Populated.Template.PostgreSQL package version
…mplate.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL package version
Below is a structured breakdown of each use case:
Use Case 1:
Scenario:
A new commit occurs in one of the three repositories (Ed-Fi-ODS, Ed-Fi-ODS-Implementation, or Ed-Fi-Extensions).
The workflow begins by updating the CodeGen package but fails before completing.
Expected Behavior:
In the first run, the workflow updates the CodeGen package version. However, the workflow fails after this update, preventing the completion of other package updates.
Example Workflow Run:
Failed after updating CodeGen package.
Use Case 2:
Scenario:
The workflow is re-triggered after the failure in Use Case 1.
It should skip the CodeGen package update since it was already updated and continue updating the Extensions packages (TPDM, Sample, Homograph).
Expected Behavior:
The workflow should resume from the Extensions package update, bypassing the CodeGen package. However, it fails again after updating the Extensions packages.
Example Workflow Run:
Failed after updating Extensions packages.
Use Case 3:
Scenario:
The workflow is re-triggered after the failure in Use Case 2.
It should skip both the CodeGen and Extensions package updates, resuming with updates to the EdFi.Ods.Minimal.Template, EdFi.Ods.Minimal.Template.PostgreSQL, EdFi.Ods.Populated.Template, and EdFi.Ods.Populated.Template.PostgreSQL packages.
Expected Behavior:
The workflow should skip the already updated CodeGen and Extensions packages, but it fails after attempting to update the Minimal and Populated templates.
Example Workflow Run:
Failed after updating Minimal and Populated templates.
Use Case 4:
Scenario:
The workflow is re-triggered after the failure in Use Case 3.
It should skip the CodeGen, Extensions, and Minimal/Populated template updates and continue with the updates for EdFi.Ods.Minimal.Template.TPDM, EdFi.Ods.Minimal.Template.TPDM.PostgreSQL, EdFi.Ods.Populated.Template.TPDM, and EdFi.Ods.Populated.Template.TPDM.PostgreSQL packages.
Expected Behavior:
The workflow successfully completes by updating the TPDM-related templates without any failures.
Example Workflow Run:
Successful completion after TPDM package updates.
Validation Steps:
Branch Consistency Across Repositories:
Ensure the working branch exists in all three repositories (Ed-Fi-ODS, Ed-Fi-ODS-Implementation, Ed-Fi-Extensions).
Check for Previous Workflow Failures:
Before starting the process, check if there was a failure in the last run. If so, determine whether any packages were updated successfully.
Handling New Commits:
If new commits are detected after a failed workflow, ensure the workflow resumes from where it left off by skipping already updated packages.