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

FED-1956 Gold file workflow improvements #865

Merged
merged 8 commits into from
Dec 11, 2023

Conversation

greglittlefield-wf
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf commented Dec 2, 2023

Motivation

We didn't have a great workflow for updating gold files in response to builder changes.

Also, it looks like there were some inconsistencies in the paths for the test fixture source files and their corresponding golds.

Changes

  • Add script to regenerate gold files
    • It looks like this currently generates some extraneous files, since apparently not all source files are actually used in tests. We can look into this into a follow-up PR
  • Update paths of gold files

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed
    • Steps from PR author:
      • CI passes (minus analyzer_plugin tests, which are failing in v5_wip)
    • Anything falling under manual testing criteria outlined in CONTRIBUTING.md

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@aviary2-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

file.copySync(newPath);
}

print('Building files in temporary directory ${tmpSourceDir.path}');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is kind of hacky, but it's way better than our current workflow of manually updating them.

@greglittlefield-wf greglittlefield-wf marked this pull request as ready for review December 2, 2023 00:26
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All these renames are just from me deleting all golds within test_fixtures/gold_output_files/ and running dart tool/update_gold_output_files.dart to repopulate them with consistent paths (see also over_react_builder_test.dart for path updates).

@rmconsole5-wk rmconsole5-wk changed the title Gold file workflow improvements FED-1956 Gold file workflow improvements Dec 5, 2023
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

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

Looks like formatting is failing in CI

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this file supposed to be referenced somewhere? Or is this a followup ticket?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like the tests for these files verify builder errors, but don't actually check the output of the file, so this being unused is expected.

Rather than adding an exception for these, I figured we could just check em in and have em be unused 🤷. Sorry, forgot to note that in that other thread.

Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

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

+10 (pending passing CI)

  • Ran the script on this branch and verified no additional diff was generated
  • Ran this script on one of my branches to update golds and it was awesome!!

@greglittlefield-wf greglittlefield-wf merged commit f4cfcd5 into v5_wip Dec 11, 2023
10 checks passed
@greglittlefield-wf greglittlefield-wf deleted the gold-file-workflow-improvements branch January 30, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants