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

Refactor (accessing) the cosign state #4888

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

sergei-maertens
Copy link
Member

Closes #4320

Changes

This refactor sets up a dedicated interface to read the cosign state of a submission. Highlights:

  • Good typing support
  • Ability to deal with cosign v1 and v2 details in the proper context
  • Proper factory trait to set up the necessary database state of a submission
  • Prepared for cosign v3

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Problem detection in the admin email digest is handled
  • Release management

    • I have labelled the PR as "needs-backport" accordingly
  • I have updated the translations assets (you do NOT need to provide translations)

    • Ran ./bin/makemessages_js.sh
    • Ran ./bin/compilemessages_js.sh
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.61%. Comparing base (2084974) to head (efa8791).
Report is 34 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4888      +/-   ##
==========================================
+ Coverage   96.60%   96.61%   +0.01%     
==========================================
  Files         752      753       +1     
  Lines       25812    25879      +67     
  Branches     3412     3416       +4     
==========================================
+ Hits        24935    25003      +68     
  Misses        613      613              
+ Partials      264      263       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The cosign information/state was smeared out across the form and
submission model, and is consulted in a number of places to control
template/feedback behaviour.

The implementation details of how cosign works are now properly
encapsulated in a data structure, which also allows us to prepare for
cosign v3 which will most-likely not be Formio based.
@sergei-maertens sergei-maertens merged commit 53d6f8d into master Dec 9, 2024
33 checks passed
@sergei-maertens sergei-maertens deleted the chore/4320-refactor-cosign-state branch December 9, 2024 14:42
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.

Various co-sign improvements
2 participants