Skip to content

[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

Merged
merged 58 commits into from
Aug 29, 2024

Conversation

semalaiappan
Copy link
Contributor

@semalaiappan semalaiappan commented Aug 23, 2024

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.

semalaiappan and others added 30 commits August 22, 2024 22:29
…mplate.TPDM.PostgreSQL ,EdFi.Ods.Populated.Template.TPDM ,EdFi.Ods.Populated.Template.TPDM.PostgreSQL package version
semalaiappan and others added 5 commits August 23, 2024 13:27
…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
@semalaiappan semalaiappan requested a review from a team as a code owner August 23, 2024 19:11
Copy link

github-actions bot commented Aug 23, 2024

🔍 Vulnerabilities of edfialliance/ods-api-db-ods-minimal:7.3.0-5.1.0-mssql

📦 Image Reference edfialliance/ods-api-db-ods-minimal:7.3.0-5.1.0-mssql
digestsha256:2e62e869106f3d98a1dcbbc40a6c7f919ef3197ab486d76710df47a5aa2a237e
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size698 MB
packages260
📦 Base Image ubuntu:22.04
also known as
  • jammy
  • jammy-20240427
digestsha256:2af372c1e2645779643284c7dc38775e3dbbc417b2d784a27c5a9eb784014fb8
vulnerabilitiescritical: 0 high: 0 medium: 9 low: 16

}
}

function AddOrUpdateRepositoriesJson {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 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

semalaiappan and others added 5 commits August 28, 2024 22:06
…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
@semalaiappan semalaiappan reopened this Aug 29, 2024
@semalaiappan
Copy link
Contributor Author

@vimayya All review comments are fixed . Ready for Review again . Thanks

semalaiappan and others added 5 commits August 29, 2024 11:06
…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
@semalaiappan semalaiappan reopened this Aug 29, 2024
@mjaksn mjaksn merged commit be8f1ad into main Aug 29, 2024
51 checks passed
@mjaksn mjaksn deleted the ODS-6434 branch August 29, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants