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

chore(deps): Update @aws-sdk client libraries #16887

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

Conversation

AndesKrrrrrrrrrrr
Copy link
Member

@AndesKrrrrrrrrrrr AndesKrrrrrrrrrrr commented Nov 14, 2024

Depends on #16890.

Merged to main, was broken, trying again.

  • Remove unused script
  • Simplify deploy-feature comment generation
  • Remove unused Dockerfile

This reverts commit af1d531.

Summary by CodeRabbit

  • Dependency Updates

    • Updated multiple AWS SDK packages to latest versions (3.687.0)
    • Added new AWS SDK abort controller package
  • Code Maintenance

    • Reorganized import statements across multiple Contentful app components
    • Minor type corrections in test files
  • No Functional Changes

    • No significant changes to application logic or user experience were introduced

Copy link
Contributor

coderabbitai bot commented Nov 14, 2024

Walkthrough

This pull request involves multiple updates across various files, primarily focusing on dependency version updates in package.json and reorganization of import statements in several TypeScript/React components. The most significant change is the update of multiple AWS SDK packages from version 3.662.0 to 3.687.0, including additions like @aws-sdk/abort-controller. Additionally, numerous Contentful app components have had their import statements reordered without changing their core functionality.

Changes

File Change Summary
infra/package.json Updated @aws-sdk/client-ssm from 3.145.0 to 3.687.0
package.json Updated multiple AWS SDK packages from 3.662.0 to 3.687.0
Added @aws-sdk/[email protected]
apps/contentful-apps/components/* Reordered import statements in multiple components
apps/financial-aid/backend/src/app/modules/staff/test/numberOfUsersForMunicipality.spec.ts Updated type from Number to number

Possibly related PRs

Suggested Labels

automerge, high priority

Suggested Reviewers

  • lodmfjord
  • unakb
  • thorhildurt
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@AndesKrrrrrrrrrrr AndesKrrrrrrrrrrr added the deploy-feature Deploys features to dev label Nov 14, 2024
@AndesKrrrrrrrrrrr AndesKrrrrrrrrrrr changed the title Reapply "chore(deps): Update @aws-sdk client libraries (#16839)" (#16884) chore(deps): Update @aws-sdk client libraries Nov 14, 2024
Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 35.44%. Comparing base (3a496da) to head (78c5c3e).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...app/modules/samgongustofa/samgongustofa.service.ts 50.00% 4 Missing ⚠️
...-ui/core/src/lib/DatePicker/DatePicker.stories.tsx 0.00% 3 Missing ⚠️
...lates/financial-aid/src/lib/hooks/useFileUpload.ts 0.00% 1 Missing ⚠️
...st-server/src/lib/httpRequestDurationMiddleware.ts 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16887      +/-   ##
==========================================
- Coverage   35.57%   35.44%   -0.13%     
==========================================
  Files        7030     7028       -2     
  Lines      150490   151836    +1346     
  Branches    42974    43838     +864     
==========================================
+ Hits        53536    53818     +282     
- Misses      96954    98018    +1064     
Flag Coverage Δ
air-discount-scheme-backend 48.15% <0.00%> (ø)
air-discount-scheme-web 0.00% <ø> (ø)
api 3.33% <ø> (ø)
api-catalogue-services 75.81% <ø> (ø)
api-domains-air-discount-scheme 37.90% <ø> (ø)
api-domains-assets 26.71% <ø> (ø)
api-domains-auth-admin 48.49% <ø> (ø)
api-domains-communications 39.48% <ø> (ø)
api-domains-criminal-record 47.81% <ø> (ø)
api-domains-driving-license 44.77% <ø> (ø)
api-domains-education 31.09% <ø> (ø)
api-domains-health-insurance 35.19% <ø> (ø)
api-domains-payment-schedule 42.04% <ø> (ø)
application-api-files 61.80% <ø> (ø)
application-core 75.68% <ø> (ø)
application-system-api 38.67% <66.66%> (-0.01%) ⬇️
application-template-api-modules 27.54% <ø> (-0.03%) ⬇️
application-templates-accident-notification 27.60% <ø> (ø)
application-templates-car-recycling 3.12% <ø> (ø)
application-templates-criminal-record 25.79% <ø> (ø)
application-templates-driving-license 18.15% <ø> (ø)
application-templates-estate 13.58% <0.00%> (ø)
application-templates-example-payment 24.66% <ø> (ø)
application-templates-financial-aid 14.99% <0.00%> (+0.06%) ⬆️
application-templates-general-petition 23.11% <ø> (ø)
application-templates-inheritance-report 6.59% <ø> (ø)
application-templates-marriage-conditions 14.80% <ø> (ø)
application-templates-mortgage-certificate 43.73% <ø> (ø)
application-templates-new-primary-school 21.02% <ø> (ø)
clients-driving-license 40.68% <ø> (ø)
clients-driving-license-book 43.75% <ø> (ø)
clients-financial-statements-inao 49.48% <ø> (ø)
clients-license-client 1.26% <ø> (ø)
clients-middlewares 73.06% <ø> (ø)
clients-regulations 42.75% <ø> (ø)
clients-rsk-company-registry 31.18% <ø> (ø)
clients-rsk-personal-tax-return 38.32% <ø> (ø)
clients-smartsolutions 12.77% <ø> (ø)
clients-syslumenn 49.18% <ø> (ø)
clients-zendesk 49.88% <ø> (ø)
cms 0.39% <ø> (ø)
cms-translations 38.81% <ø> (ø)
content-search-index-manager 95.65% <ø> (ø)
content-search-toolkit 8.16% <ø> (ø)
contentful-apps 4.56% <ø> (ø)
dokobit-signing 61.66% <ø> (ø)
email-service 59.68% <ø> (ø)
feature-flags 90.40% <ø> (ø)
file-storage 45.32% <ø> (ø)
financial-aid-backend 51.38% <ø> (ø)
financial-aid-shared 17.88% <ø> (ø)
icelandic-names-registry-backend 54.44% <0.00%> (ø)
island-ui-core 30.32% <40.00%> (ø)
judicial-system-api 20.07% <ø> (ø)
judicial-system-audit-trail 68.53% <ø> (ø)
judicial-system-backend 55.81% <ø> (ø)
judicial-system-formatters 78.86% <ø> (ø)
judicial-system-scheduler 71.24% <ø> (ø)
judicial-system-types 37.77% <ø> (ø)
judicial-system-web 27.97% <0.00%> (ø)
license-api 42.91% <0.00%> (-0.08%) ⬇️
localization 10.15% <ø> (ø)
logging 58.02% <ø> (ø)
message-queue 67.76% <ø> (ø)
nest-audit 65.78% <ø> (ø)
nest-aws 51.93% <ø> (ø)
nest-config 76.05% <ø> (ø)
nest-core 53.16% <ø> (ø)
nest-feature-flags 50.69% <ø> (ø)
nest-problem 45.64% <0.00%> (ø)
nest-sequelize 94.44% <ø> (ø)
nest-swagger 51.13% <ø> (ø)
nova-sms 60.96% <ø> (ø)
portals-admin-regulations-admin 1.80% <ø> (ø)
portals-core 19.60% <0.00%> (ø)
regulations 16.78% <ø> (ø)
residence-history 85.00% <ø> (ø)
services-auth-admin-api 52.47% <0.00%> (ø)
services-auth-delegation-api 58.39% <0.00%> (ø)
services-auth-ids-api 52.48% <0.00%> (-0.02%) ⬇️
services-auth-public-api 49.36% <0.00%> (ø)
services-sessions 65.33% <0.00%> (ø)
services-university-gateway 49.46% <0.00%> (+0.11%) ⬆️
services-user-notification 46.52% <0.00%> (ø)
services-user-profile 56.83% <0.00%> (ø)
shared-components 29.47% <50.00%> (ø)
shared-form-fields 33.36% <0.00%> (ø)
shared-mocking 58.64% <ø> (ø)
shared-pii 92.85% <ø> (ø)
shared-problem 87.50% <ø> (ø)
shared-utils 28.67% <ø> (ø)
skilavottord-ws 23.97% <50.00%> (ø)
web 2.39% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...uth-admin-web/components/Admin/nav/AdminTabNav.tsx 0.00% <ø> (ø)
...h-admin-web/components/Client/nav/ClientTabNav.tsx 0.00% <ø> (ø)
apps/contentful-apps/components/Layout.tsx 0.00% <ø> (ø)
...ps/contentful-apps/components/LocalhostWarning.tsx 0.00% <ø> (ø)
...nts/MideindTranslationSidebar/fieldUtils/index.tsx 0.00% <ø> (ø)
...ul-apps/pages/fields/active-translations-field.tsx 0.00% <ø> (ø)
...entful-apps/pages/fields/admin-only-json-field.tsx 0.00% <ø> (ø)
...elds/admin-only-short-text-checkbox-list-field.tsx 0.00% <ø> (ø)
...es/fields/admin-only-short-text-dropdown-field.tsx 0.00% <ø> (ø)
...-apps/pages/fields/admin-only-short-text-field.tsx 0.00% <ø> (ø)
... and 21 more

... and 107 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a496da...78c5c3e. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented Nov 14, 2024

Datadog Report

All test runs fa46579 🔗

10 Total Test Services: 0 Failed, 10 Passed
🔻 Test Sessions change in coverage: 3 decreased, 3 increased, 194 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-backend 0 0 0 63 0 31.07s N/A Link
air-discount-scheme-web 0 0 0 2 0 7.36s N/A Link
api 0 0 0 4 0 3.54s N/A Link
api-catalogue-services 0 0 0 23 0 9.25s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 19.49s N/A Link
api-domains-assets 0 0 0 3 0 13.13s N/A Link
api-domains-auth-admin 0 0 0 18 0 11.33s N/A Link
api-domains-communications 0 0 0 5 0 34.28s N/A Link
api-domains-criminal-record 0 0 0 5 0 10.12s N/A Link
api-domains-driving-license 0 0 0 23 0 44.69s N/A Link

🔻 Code Coverage Decreases vs Default Branch (3)

  • services-auth-delegation-api - jest 50.41% (-0.04%) - Details
  • services-user-profile - jest 49.23% (-0.02%) - Details
  • application-template-api-modules - jest 30.02% (-0.01%) - Details

@AndesKrrrrrrrrrrr AndesKrrrrrrrrrrr marked this pull request as ready for review November 14, 2024 21:12
@AndesKrrrrrrrrrrr AndesKrrrrrrrrrrr requested review from a team as code owners November 14, 2024 21:12
@AndesKrrrrrrrrrrr AndesKrrrrrrrrrrr added the deprecated:automerge (Disabled) Merge this PR as soon as all checks pass label Nov 14, 2024
.github/workflows/push.yml Outdated Show resolved Hide resolved
.github/workflows/push.yml Outdated Show resolved Hide resolved
Copy link
Member

@peturgq peturgq left a comment

Choose a reason for hiding this comment

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

Makes sense to move this out of docker, good job 👍

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
.github/workflows/push.yml (1)

661-670: LGTM with a suggestion for improved error handling.

The Docker build step correctly sets up the build arguments and executes the build script. However, consider adding error handling for the case when environment variables are undefined.

 - name: Docker build and push helm-config image
   working-directory: infra
   env:
     PUBLISH: 'true'
   run: |
     set -euxo pipefail
+    : "${DOCKER_BASE_IMAGE_REGISTRY:?Required environment variable is not set}"
+    : "${NODE_IMAGE_TAG:?Required environment variable is not set}"
     echo Registry is: ${{env.DOCKER_BASE_IMAGE_REGISTRY}}
     echo Image tag is: ${{env.NODE_IMAGE_TAG}}
     export EXTRA_DOCKER_BUILD_ARGS="--build-arg DOCKER_IMAGE_REGISTRY=${{env.DOCKER_BASE_IMAGE_REGISTRY}} --build-arg NODE_IMAGE_TAG=${{env.NODE_IMAGE_TAG}}"
     ./scripts/build-docker-container.sh "$DOCKER_TAG"
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3583b64 and f5ecea3.

📒 Files selected for processing (3)
  • .github/workflows/push.yml (2 hunks)
  • infra/scripts/Dockerfile (1 hunks)
  • infra/scripts/build-docker-container.sh (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • infra/scripts/Dockerfile
  • infra/scripts/build-docker-container.sh

.github/workflows/push.yml Outdated Show resolved Hide resolved
@AndesKrrrrrrrrrrr AndesKrrrrrrrrrrr added the test everything 💀 test & build everything 💀 label Nov 29, 2024
@AndesKrrrrrrrrrrr
Copy link
Member Author

Low value, high risk, everything affected. Closed.

…cation-templates-social-insurance-administration-additional-support-for-the-elderly,application-templates-transport-authority-order-vehicle-registration-certificate,application-templates-social-insurance-administration-household-supplement,application-templates-transport-authority-digital-tachograph-workshop-card,application-templates-transport-authority-digital-tachograph-company-card,application-templates-transport-authority-digital-tachograph-drivers-card,application-templates-social-insurance-administration-pension-supplement,application-templates-transport-authority-anonymity-in-vehicle-registry,application-templates-transport-authority-transfer-of-vehicle-ownership,application-templates-parliamentary-list-creation,application-templates-parliamentary-list-signing,application-templates-presidential-list-creation,application-templates-social-insurance-administration-old-age-pension,application-templates-transport-authority-order-vehicle-license-plate,application-templates-presidential-list-signing,application-templates-social-insurance-administration-death-benefits,application-templates-transport-authority-change-co-owner-of-vehicle,application-templates-transport-authority-change-operator-of-vehicle,fiancial-statement-individual-election,application-templates-children-residence-change-v2,application-templates-social-insurance-administration-income-plan,clients-university-application-agricultural-university-of-iceland,application-templates-transport-authority-license-plate-renewal,application-templates-inao-financial-statement-political-party,clients-university-application-iceland-university-of-the-arts,api-domains-administration-of-occupational-safety-and-health,application-templates-directorate-of-immigration-citizenship,application-templates-driving-license-book-update-instructor,clients-transport-authority-digital-tachograph-drivers-card,application-templates-social-insurance-administration-core,application-templates-aosh-transfer-of-machine-ownership,clients-administration-of-occupational-safety-and-health,financial-statement-cemetery,api-domains-icelandic-government-institution-vacancies,application-templates-complaints-to-althingi-ombudsman,application-templates-driving-instructor-registrations,application-templates-aosh-work-accident-notification,clients-university-application-university-of-akureyri,application-templates-aosh-change-machine-supervisor,application-templates-european-health-insurance-card,application-templates-healthcare-license-certificate,clients-university-application-university-of-iceland,api-domains-financial-statement-individual-election,api-domains-official-journal-of-iceland-application,clients-health-insurance,clients-university-application-reykjavik-university,application-templates-document-provider-onboarding,application-templates-health-insurance-declaration,clients-icelandic-government-institution-vacancies,clients-transport-authority-vehicle-plate-ordering,application-templates-aosh-request-for-inspection,application-templates-driving-assessment-approval,application-templates-driving-school-confirmation,application-templates-funding-government-projects,application-templates-official-journal-of-iceland,clients-transport-authority-vehicle-plate-renewal,clients-university-application-bifrost-university,clients-rights-portal,clients-transport-authority-vehicle-owner-change,application-templates-aosh-register-new-machine,application-templates-data-protection-complaint,application-templates-driving-license-duplicate,application-templates-financial-statements-inao,application-templates-institution-collaboration,clients-official-journal-of-iceland-application,clients-university-application-holar-university,application-templates-aosh-street-registration,application-templates-grindavik-housing-buyout,application-templates-public-debt-payment-plan,clients-transport-authority-vehicle-codetables,application-templates-aosh-deregister-machine,application-templates-driving-learners-permit,application-templates-general-fishing-license,clients-transport-authority-vehicle-infolocks,clients-transport-authority-vehicle-operators,portals-my-pages-education-student-assessment,portals-my-pages-social-insurance-maintenance,application-templates-alcohol-tax-redemption,application-templates-healthcare-work-permit,clients-transport-authority-vehicle-printing,services-auth-personal-representative-public,application-templates-accident-notification,application-templates-announcement-of-death,application-templates-mortgage-certificate,clients-official-journal-of-iceland,application-templates-family-matters-core,application-templates-marriage-conditions,application-templates-no-debt-certificate,api-domains-financial-statement-cemetery,api-domains-municipalities-financial-aid,application-templates-inheritance-report,application-templates-new-primary-school,application-templates-passport-annulment,application-templates-reference-template,api-domains-official-journal-of-iceland,application-templates-operating-license,clients-district-commissioners-licenses,clients-social-insurance-administration,api-domains-housing-benefit-calculator,application-templates-general-petition,application-templates-health-insurance,application-templates-secondary-school,portals-admin-icelandic-names-registry,portals-my-pages-occupational-licenses,api-domains-financial-statements-inao,application-templates-criminal-record,application-templates-driving-license,application-templates-example-payment,clients-ums-cost-of-living-calculator,portals-my-pages-signature-collection,services-auth-personal-representative,api-domains-icelandic-names-registry,api-domains-national-registry-x-road,api-domains-occupational-licenses-v2,application-templates-parental-leave,clients-municipalities-financial-aid,api-domains-intellectual-properties,application-templates-car-recycling,application-templates-financial-aid,application-templates-login-service,judicial-system-digital-mailbox-api,application-templates-energy-funds,application-templates-home-support,clients-directorate-of-immigration,clients-housing-benefit-calculator,portals-admin-signature-collection,portals-my-pages-education-license,portals-shared-modules-delegations,regulations-admin-backend,api-domains-directorate-of-labour,api-domains-occupational-licenses,api-domains-watson-assistant-chat,clients-data-protection-complaint,clients-financial-statements-inao,contentful-role-permissions,portals-admin-air-discount-scheme,portals-my-pages-education-career,portals-my-pages-education-degree,api-domains-driving-license-book,api-domains-mortgage-certificate,api-domains-signature-collection,api-domains-umbodsmadur-skuldara,application-template-api-modules,application-templates-university,icelandic-names-registry-backend,portals-admin-application-system,services-contentful-entry-tagger,api-consultation-portal,api-domains-air-discount-scheme,api-domains-transport-authority,clients-adr-and-machine-license,clients-intellectual-properties,clients-judicial-administration,clients-rsk-personal-tax-return,island-ui-vanilla-extract-utils,judicial-system-message-handler,portals-admin-document-provider,portals-admin-regulations-admin,api-domains-disability-license,api-domains-endorsement-system,api-domains-health-directorate,api-domains-university-careers,api-domains-university-gateway,application-templates-passport,clients-university-gateway-api,clients-vehicle-service-fjs-v1,delegation-admin,icelandic-names-registry-types,portals-my-pages-law-and-order,api-domains-aircraft-registry,api-domains-document-provider,api-domains-national-registry,api-domains-regulations-admin,application-templates-id-card,clients-ultraviolet-radiation,my-pages-air-discount,portals-my-pages-applications,portals-my-pages-restrictions,api-domains-company-registry,api-domains-health-insurance,api-domains-housing-benefits,api-domains-payment-schedule,api-domains-secondary-school,api-domains-social-insurance,application-templates-estate,application-templates-p-sign,clients-driving-license-book,clients-hms-housing-benefits,clients-national-registry-v2,clients-national-registry-v3,clients-rsk-company-registry,clients-signature-collection,content-search-index-manager,content-search-indexer-types,judicial-system-court-client,portals-my-pages-information,services-auth-delegation-api,air-discount-scheme-backend,api-domains-criminal-record,api-domains-driving-license,api-domains-fishing-license,api-domains-license-service,application-template-loader,clients-air-discount-scheme,clients-auth-delegation-api,clients-consultation-portal,judicial-system-audit-trail,services-university-gateway,air-discount-scheme-consts,api-domains-communications,api-domains-content-search,clients-althingi-ombudsman,clients-disability-license,clients-health-directorate,clients-judicial-system-sp,clients-smart-solutions-v2,clients-university-careers,judicial-system-formatters,portals-admin-service-desk,portals-my-pages-constants,portals-my-pages-documents,portals-my-pages-education,portals-my-pages-petitions,services-user-notification,air-discount-scheme-types,aircraft-registry,api-domains-api-catalogue,api-domains-law-and-order,api-domains-notifications,api-domains-rights-portal,api-domains-ship-registry,api-domains-work-machines,application-ui-components,clients-document-provider,clients-regulations-admin,clients-rsk-relationships,clients-user-notification,clients-work-accident-ver,financial-aid-web-osk-e2e,judicial-system-scheduler,portals-admin-form-system,portals-my-pages-licenses,portals-my-pages-sessions,services-endorsements-api,api-domains-email-signup,api-domains-energy-funds,api-domains-user-profile,clients-payment-schedule,clients-secondary-school,clients-vehicles-mileage,clients-workpoint-arborg,external-contracts-tests,portals-my-pages-consent,portals-my-pages-finance,portals-my-pages-graphql,services-auth-public-api,services-xroad-collector,air-discount-scheme-api,air-discount-scheme-web,api-domains-application,api-domains-file-upload,api-domains-regulations,api/domains/form-system,application-api-history,application-api-payment,application-system-form,clients-auth-public-api,clients-criminal-record,clients-driving-license,clients-firearm-license,clients-fishing-license,clients-hunting-license,financial-aid-web-veita,judicial-system-backend,judicial-system-lawyers,judicial-system-message,judicial-system-xrd-api,portals-admin-ids-admin,portals-my-pages-assets,portals-my-pages-health,services-auth-admin-api,services-search-indexer,api-catalogue-services,api-domains-auth-admin,api-domains-fiskistofa,api-domains-statistics,application-system-api,clients-auth-admin-api,clients-ehic-client-v1,clients-license-client,clients-smartsolutions,content-search-indexer,content-search-metrics,content-search-toolkit,financial-aid-open-api,judicial-system-consts,portals-admin-petition,api-catalogue-elastic,api-domains-documents,api-domains-education,api-domains-hms-loans,api-domains-syslumenn,application-api-files,application-ui-fields,clients-car-recycling,clients-charge-fjs-v2,clients-work-machines,financial-aid-backend,financial-aid-web-osk,judicial-system-types,portals-my-pages-core,services-auth-ids-api,services-auth-testing,services-user-profile,ship-registry,api-catalogue-consts,api-domains-identity,api-domains-passport,api-domains-sessions,api-domains-vehicles,application-api-core,application-ui-forms,application-ui-shell,clients-auth-ids-api,clients-documents-v2,clients-energy-funds,clients-user-profile,financial-aid-shared,github-actions-cache,infra-express-server,island-ui-contentful,judicial-system-auth,license-api,services-form-system,api-catalogue-types,api-domains-finance,api-domains-payment,application-graphql,application-testing,clients-middlewares,clients-mms,clients-regulations,consultation-portal,form-system-client,island-ui-storybook,judicial-system-api,judicial-system-web,react-feature-flags,shared-translations,skilavottord-consts,api-domains-assets,clients-finance-v2,clients-fiskistofa,clients-statistics,nest-feature-flags,portals-admin-core,reference-next-app,services-documents,shared-form-fields,skilavottord-types,testing-containers,university-gateway,application-types,application-utils,clients-documents,clients-hms-loans,clients-mms-frigg,clients-mms-grade,clients-passports,clients-syslumenn,financial-aid-api,infra-nest-server,infra-next-server,reference-backend,residence-history,services-sessions,shared-components,api-domains-auth,application-core,clients-identity,clients-islykill,clients-sessions,clients-vehicles,cms-translations,download-service,license,react-components,react-spa-shared,service-portal,shared-connected,shared-constants,skilavottord-web,testing-fixtures,auth-nest-tools,clients-finance,clients-zendesk,contentful-apps,dokobit-signing,island-ui-theme,island-ui-utils,nest-dataloader,nest-pagination,skilavottord-ws,user-monitoring,auth-admin-web,clients-assets,clients-p-card,island-ui-core,nest-sequelize,shared-mocking,shared-problem,email-service,feature-flags,infra-metrics,infra-tracing,message-queue,next-ids-auth,portals-admin,react-spa-bff,auth-api-lib,clients-inna,clients-vmst,file-storage,localization,nest-graphql,nest-problem,nest-swagger,portals-core,services-bff,shared-babel,shared-types,shared-utils,testing-nest,auth-scopes,auth-shared,clients-cms,nest-config,regulations,testing-e2e,api-schema,native-app,nest-audit,shared-pii,system-e2e,api-mocks,nest-core,plausible,nest-aws,nova-sms,logging,cache,api,cms,web update dirty files
@AndesKrrrrrrrrrrr
Copy link
Member Author

Re-opening because it's still useful, and runners are less congested now.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
apps/financial-aid/backend/src/app/modules/staff/test/numberOfUsersForMunicipality.spec.ts (1)

Line range hint 1-89: Consider enhancing test maintainability.

While the tests are well-structured, consider these improvements for better maintainability:

  1. Extract test constants to a separate configuration object
  2. Add type assertions for the mock functions to improve type safety
  3. Consider using test data builders for complex objects

Example implementation:

// Test configuration
const TEST_CONFIG = {
  DEFAULT_MUNICIPALITY_ID: uuid(),
  MOCK_USER_COUNT: 10,
  ERROR_MESSAGE: 'Some error'
} as const;

// Type-safe mock helper
const createMockStaffModel = () => {
  const mockCount = jest.fn() as jest.MockedFunction<typeof StaffModel.count>;
  return {
    ...StaffModel,
    count: mockCount
  };
};
apps/auth-admin-web/components/Client/nav/ClientTabNav.tsx (2)

Line range hint 24-39: Enhance accessibility for tab navigation.

While the component follows React best practices, it could benefit from improved accessibility features for the tab navigation.

Consider these improvements:

  1. Add role="tablist" to the <ul> element
  2. Add role="tab" to each button
  3. Add aria-selected attribute to indicate the active tab
  4. Use aria-controls to associate each tab with its panel

Example implementation:

-        <ul>
+        <ul role="tablist">
           <li className={activetab === ClientTab.BasicForm ? 'active' : ''}>
             <button
               type="button"
+              role="tab"
+              aria-selected={activetab === ClientTab.BasicForm}
               onClick={() => handleTabChange(ClientTab.BasicForm)}
               className={activetab === ClientTab.BasicForm ? 'active' : ''}

Line range hint 6-9: Strengthen type safety for the activeTab prop.

The optional activeTab prop could lead to undefined behavior if not properly handled.

Consider making the prop required or providing a default value:

 interface Props {
   handleTabChange: (tab: ClientTab) => void
-  activeTab?: ClientTab
+  activeTab: ClientTab
 }

Or provide a default prop value:

ClientTabNav.defaultProps = {
  activeTab: ClientTab.BasicForm,
}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a20e792 and 78c5c3e.

📒 Files selected for processing (22)
  • apps/auth-admin-web/components/Admin/nav/AdminTabNav.tsx (1 hunks)
  • apps/auth-admin-web/components/Client/nav/ClientTabNav.tsx (1 hunks)
  • apps/contentful-apps/components/Layout.tsx (1 hunks)
  • apps/contentful-apps/components/LocalhostWarning.tsx (1 hunks)
  • apps/contentful-apps/components/MideindTranslationSidebar/fieldUtils/index.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/active-translations-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/admin-only-json-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/admin-only-short-text-checkbox-list-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/admin-only-short-text-dropdown-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/admin-only-short-text-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/admin-only-single-reference-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/article-related-articles-field.tsx (2 hunks)
  • apps/contentful-apps/pages/fields/article-subarticles-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/content-type-notifications-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/embed-link-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/form-default-namespace-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/formatted-location-input-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/publish-date-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/theme-properties-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/time-duration-field.tsx (1 hunks)
  • apps/contentful-apps/pages/fields/vacancy-contacts-field.tsx (1 hunks)
  • apps/financial-aid/backend/src/app/modules/staff/test/numberOfUsersForMunicipality.spec.ts (1 hunks)
✅ Files skipped from review due to trivial changes (19)
  • apps/contentful-apps/pages/fields/admin-only-json-field.tsx
  • apps/contentful-apps/pages/fields/time-duration-field.tsx
  • apps/contentful-apps/pages/fields/admin-only-short-text-field.tsx
  • apps/contentful-apps/pages/fields/publish-date-field.tsx
  • apps/contentful-apps/components/LocalhostWarning.tsx
  • apps/auth-admin-web/components/Admin/nav/AdminTabNav.tsx
  • apps/contentful-apps/components/MideindTranslationSidebar/fieldUtils/index.tsx
  • apps/contentful-apps/pages/fields/active-translations-field.tsx
  • apps/contentful-apps/pages/fields/vacancy-contacts-field.tsx
  • apps/contentful-apps/pages/fields/admin-only-short-text-checkbox-list-field.tsx
  • apps/contentful-apps/pages/fields/article-subarticles-field.tsx
  • apps/contentful-apps/pages/fields/content-type-notifications-field.tsx
  • apps/contentful-apps/pages/fields/admin-only-short-text-dropdown-field.tsx
  • apps/contentful-apps/pages/fields/formatted-location-input-field.tsx
  • apps/contentful-apps/pages/fields/article-related-articles-field.tsx
  • apps/contentful-apps/pages/fields/theme-properties-field.tsx
  • apps/contentful-apps/pages/fields/admin-only-single-reference-field.tsx
  • apps/contentful-apps/pages/fields/embed-link-field.tsx
  • apps/contentful-apps/components/Layout.tsx
🧰 Additional context used
📓 Path-based instructions (3)
apps/auth-admin-web/components/Client/nav/ClientTabNav.tsx (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/financial-aid/backend/src/app/modules/staff/test/numberOfUsersForMunicipality.spec.ts (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
apps/contentful-apps/pages/fields/form-default-namespace-field.tsx (1)

Pattern apps/**/*: "Confirm that the code adheres to the following:

  • NextJS best practices, including file structure, API routes, and static generation methods.
  • Efficient state management and server-side rendering techniques.
  • Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (2)
apps/financial-aid/backend/src/app/modules/staff/test/numberOfUsersForMunicipality.spec.ts (1)

9-9: Good improvement on type usage!

The change from Number to number follows TypeScript best practices by using the primitive type instead of the wrapper object type. This improves type safety and reduces potential boxing/unboxing operations.

apps/contentful-apps/pages/fields/form-default-namespace-field.tsx (1)

2-2: LGTM! Import organization follows best practices.

The reorganization of imports improves code organization while maintaining proper type safety with the SDK. The component demonstrates good TypeScript practices and follows NextJS conventions.

Also applies to: 7-9

Comment on lines +12 to 14
handleTabChange,
activeTab: activetab,
children,
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Follow TypeScript naming conventions.

The prop rename from activeTab to activetab breaks the camelCase naming convention commonly used in TypeScript/React. This inconsistency could lead to confusion and maintenance issues.

Apply this diff to maintain consistent naming:

 const ClientTabNav: React.FC<React.PropsWithChildren<Props>> = ({
   handleTabChange,
-  activeTab: activetab,
+  activeTab,
   children,
 }) => {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
handleTabChange,
activeTab: activetab,
children,
handleTabChange,
activeTab,
children,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-feature Deploys features to dev deprecated:automerge (Disabled) Merge this PR as soon as all checks pass test everything 💀 test & build everything 💀
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants