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

Fix CI workflows: continuous-integration.yml #3815

Merged
merged 1 commit into from
Dec 3, 2024
Merged

Conversation

gabezurita
Copy link
Collaborator

@gabezurita gabezurita commented Dec 3, 2024

PR Description

This PR addresses the issue of the failing continuous-integration workflow in the abd-vro-internal repository.

Background

The continuous-integration workflow has been failing for months solely in abd-vro-internal, and there is no record of a successful run in the abd-vro-internal. (See workflow run history).

image

Root Cause

The likely cause of the failures is the absence of the ACCESS_TOKEN_CHECKOUT_INTERNAL_REPO secret in abd-vro-internal. (See missing secret in repository settings). This variable is used in the workflow and is needed for checking out dependencies from the internal repository. (See usage in workflow).

Rationale

The abd-vro-internal CI workflow fails consistently due to this misconfiguration and doesn’t provide additional insights beyond what is already available in the abd-vro repository. Running the same workflow in both repositories introduces risks of:

  • Misconfigurations: Variables or settings missing in one repository.
  • De-synchronization: Potential for the two workflows to become out of sync over time.
  • Redundancy: Duplicate workflows without added value.

Since the CI workflow passes successfully in abd-vro and only fails in abd-vro-internal due to Git-related issues, the abd-vro-internal runs do not offer meaningful insight or benefit.

Solution

This PR limits the execution of the CI workflow to the abd-vro repository by adding a conditional check:

if: github.repository == 'department-of-veterans-affairs/abd-vro'

This ensures that CI runs are limited to the abd-vro repository, where the workflow is properly configured, avoiding redundant failures in abd-vro-internal.

How to Test

  1. Verify that the CI workflow in abd-vro executes successfully.
  2. Confirm that the CI workflow does not run in the abd-vro-internal repository.

Errata:

Checkout abd-vro-dev-secrets repo
Determining the default branch
  Retrieving the default branch name
  Not Found - https://docs.github.com/rest/repos/repos#get-a-repository
  Waiting 10 seconds before trying again
  Retrieving the default branch name
  Not Found - https://docs.github.com/rest/repos/repos#get-a-repository
  Waiting 10 seconds before trying again
  Retrieving the default branch name
  Error: Not Found - https://docs.github.com/rest/repos/repos#get-a-repository
* What went wrong:
A problem occurred configuring root project 'abd_vro'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.3.3.
     Required by:
         root project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.3.3
      > Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:2.7.14.
     Required by:
         root project : > project :gradle-plugins > org.springdoc.openapi-gradle-plugin:org.springdoc.openapi-gradle-plugin.gradle.plugin:1.8.0 > org.springdoc:springdoc-openapi-gradle-plugin:1.8.0
      > Dependency requires at least JVM runtime version 17. This build uses a Java 11 JVM.

* Try:
> Run this build using a Java 17 or newer JVM.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 1m
Error: Process completed with exit code 1.

@gabezurita gabezurita marked this pull request as ready for review December 3, 2024 01:10
@gabezurita gabezurita requested a review from a team as a code owner December 3, 2024 01:10
Copy link
Contributor

github-actions bot commented Dec 3, 2024

Test Results

103 tests  ±0   103 ✅ ±0   19s ⏱️ -1s
 31 suites ±0     0 💤 ±0 
 31 files   ±0     0 ❌ ±0 

Results for commit 5fd9d35. ± Comparison against base commit 7151d26.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 3, 2024

JaCoCo Test Coverage

Overall Project 68%

There is no coverage information present for the Files changed

@gabezurita
Copy link
Collaborator Author

gabezurita commented Dec 3, 2024

Running this manually to see if this is fixed below:
https://github.com/department-of-veterans-affairs/abd-vro-internal/actions/runs/12148061651

Confirmed it's skipped in abd-vro-internal and succeeds in abd-vro:
image

@gabezurita gabezurita marked this pull request as draft December 3, 2024 15:41
The **continuous-integration** workflow has been failing consistently in `abd-vro-internal`, with no successful runs on record. ([Workflow history](https://github.com/department-of-veterans-affairs/abd-vro-internal/actions/workflows/continuous-integration.yml)).

The failure stems from a misconfiguration: the `ACCESS_TOKEN_CHECKOUT_INTERNAL_REPO` secret, required for dependency checkout, is missing in `abd-vro-internal`. ([See usage in workflow](https://github.com/department-of-veterans-affairs/abd-vro/blob/b046987e9c6cf8babef566cef31d87161ef51219/.github/workflows/ee-ep-merge-end-to-end.yml#L13-L27)).

- Restricted CI workflow execution to the `abd-vro` repository using:
```yaml
if: github.repository == 'department-of-veterans-affairs/abd-vro'
```
- Ensures CI runs only where workflows are properly configured, avoiding failures and redundant executions in `abd-vro-internal`.
@gabezurita gabezurita marked this pull request as ready for review December 3, 2024 20:55
@gabezurita gabezurita enabled auto-merge December 3, 2024 21:06
@gabezurita gabezurita merged commit 18fba93 into develop Dec 3, 2024
28 checks passed
@gabezurita gabezurita deleted the fix-ci-workflow branch December 3, 2024 21:23
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.

2 participants