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

Add Golden Copy Tests #1674

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open

Add Golden Copy Tests #1674

wants to merge 54 commits into from

Conversation

pluckyswan
Copy link
Contributor

Description

Under construction...

Issue

#1600

Checklist

  • I have added tests to cover my changes
  • I have added logging where useful (with appropriate log level)
  • I have added JavaDocs where required
  • I have updated the documentation accordingly

Note: You may remove items that are not applicable

jherrflexion and others added 30 commits December 16, 2024 16:56
Co-Authored-By: Sylvie <38440028+somesylvie@users.noreply.github.com>
Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-Authored-By: Samuel Aquino <saquino@flexion.us>
Co-Authored-By: Bella L. Quintero <96704946+pluckyswan@users.noreply.github.com>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: saquino0827 <saquino@flexion.us>
Co-authored-by: Sylvie <sschuresko@flexion.us>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
…structure

Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: jcrichlake <145698165+jcrichlake@users.noreply.github.com>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
pluckyswan and others added 11 commits December 19, 2024 16:14
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: Sylvie <sschuresko@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: James Herr <jherr@flexion.us>
Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1600 - Partially compliant

Fully compliant requirements:

  • Modify automated staging test workflows (submit and run).
  • Create test.
  • Add input and expected files.
  • Update/add README.

Not compliant requirements:

  • Every validation message from the UCSD implementation is tested as defined in the provided spreadsheet.
  • Golden copy tests failing do not impact whether or not existing RS e2e test will run, and vice versa.
  • Possible modify cron schedule if needed for golden copy.
  • Add new receivers in RS.
  • Test.
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Environment Variable Dependency

The code heavily relies on the 'LOCAL_FILE_PATH' environment variable without a fallback, which could lead to runtime errors if not set.

        String files_path = System.getenv("LOCAL_FILE_PATH");
        if (files_path == null || files_path.isEmpty()) {
            throw new IllegalArgumentException("Environment variable LOCAL_FILE_PATH is not set");
        }

// when its pulled down and modify destinationName to be test folder specific
// possibly use a different receiver and filter on that

String testTypeAndSourceName = "Automated/" + sourceName;

Choose a reason for hiding this comment

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

Consider refactoring the blob naming and organizing logic into a separate method or class to improve modularity and testability. This change would help isolate the blob management logic, making the code cleaner and easier to maintain. [important]

for (filePair in matchedFiles) {
def actualFile = filePair.getKey()
def expectedFile = filePair.getValue()
if (!actualFile.equals(expectedFile)) {

Choose a reason for hiding this comment

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

Implement additional logging for each file comparison in the 'Compare files' test to provide more detailed feedback on which files are being compared and the result of each comparison. This enhancement would be beneficial for debugging and understanding test failures. [medium]

if (files_path.contains("GoldenCopy")) {
pathPrefix += datePrefix + "GoldenCopy/";
}

ListBlobsOptions options = new ListBlobsOptions().setPrefix(pathPrefix);

Choose a reason for hiding this comment

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

Add error handling for the Azure blob fetching process to manage exceptions and provide meaningful error messages if the fetching fails. This would improve the robustness of the file fetching mechanism. [important]

Copy link

PR Code Suggestions ✨

No code suggestions found for the PR.

pluckyswan and others added 11 commits December 23, 2024 14:30
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: basiliskus <541149+basiliskus@users.noreply.github.com>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: basiliskus <541149+basiliskus@users.noreply.github.com>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: basiliskus <541149+basiliskus@users.noreply.github.com>
Co-authored-by: James Herr <jherr@flexion.us>
Co-authored-by: basiliskus <541149+basiliskus@users.noreply.github.com>
Co-authored-by: basiliskus <541149+basiliskus@users.noreply.github.com>
Co-authored-by: basiliskus <541149+basiliskus@users.noreply.github.com>
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