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

TFRS - Test and Debug TFRS Integration with LCFS Redis Balance Cache #1418

Open
AlexZorkin opened this issue Dec 10, 2024 · 0 comments
Open
Labels
Medium Medium priority Task Work that does not directly impact the user

Comments

@AlexZorkin
Copy link
Collaborator

Description:
This ticket focuses on testing and debugging the cross-application integration where TFRS retrieves organization balance data from LCFS’s Redis cache. LCFS stores current compliance unit balances for all organizations and compliance periods, and TFRS should display these balances accordingly. The goal is to ensure that the correct balances appear in TFRS under various user views and scenarios and to address any issues related to OpenShift configurations or communication between TFRS and LCFS. This is to be tested int Development environment.

Scenarios to Test:

BCeID Users:

  1. Dashboard Organization Balance:

    • When a fuel supplier logs into TFRS using BCeID credentials, the application should display the supplier’s current available balance in the top right corner of the interface.
    • Confirm that this balance is correctly fetched from the LCFS Redis cache, reflecting the supplier’s most up-to-date available compliance units.
  2. Compliance Report Balance Display:

    • When creating a new draft compliance report or opening an existing one, the application should display the supplier’s available balance for the compliance period associated with that report.
    • Ensure that TFRS requests the correct compliance period balance from LCFS’s Redis cache and that the number displayed matches the supplier’s actual available balance for that year.

IDIR Users:

  1. Organizations List View Balance Display:
    • On the organizations list page (visible to IDIR users), each organization’s total compliance unit balance should be displayed.
    • Verify that TFRS queries LCFS’s Redis cache for each organization’s current balance and displays the correct totals in the list view.

Purpose and Benefit:
Accurate and timely display of compliance unit balances is critical for user transparency and decision-making. Ensuring that TFRS retrieves and displays correct balances from LCFS’s Redis cache improves user confidence, reduces confusion, and streamlines compliance reporting and management.

Acceptance Criteria:

  • Given a BCeID user (fuel supplier), upon login, the top-right balance display in TFRS matches the organization’s current LCFS balance.
  • Given a BCeID user reviewing a compliance report, the displayed available balance for the associated compliance period matches the LCFS Redis data.
  • Given an IDIR user viewing the organizations list, each organization’s balance matches the data retrieved from LCFS’s Redis cache.
  • Errors, if any, in data retrieval or display (e.g., incorrect balances, missing data) are logged and resolved.
  • Communication issues between TFRS and LCFS in the Dev environment (e.g., OpenShift networking, authorization) are identified and fixed.

Development Checklist:

  1. Configuration Check:

    • Verify that TFRS’s Dev environment is correctly configured to query LCFS’s Redis cache (e.g., environment variables, service URLs, authentication tokens).
  2. Endpoint Testing in Dev:

    • Manually query the LCFS Redis endpoints from TFRS Dev (e.g., using curl or a test tool) to confirm that data retrieval works.
    • Check logs on both TFRS and LCFS sides to ensure that requests and responses are occurring as expected.
  3. UI Verification:

    • Log in as a BCeID user and confirm that the top-right balance appears and updates as expected.
    • Open or create a compliance report and confirm that the balance displayed aligns with the correct compliance period’s data in Redis.
    • Log in as an IDIR user and navigate to the organizations list view to confirm that balances are correctly populated from LCFS’s cache.
  4. Debugging and Fixes:

    • If incorrect balances appear, investigate LCFS caching logic, TFRS retrieval endpoints, and ensure correct compliance period and organization IDs are used in queries.
    • Address networking, DNS, or routing issues in OpenShift that may prevent TFRS from reaching LCFS services.
    • Update logs or error handling to provide clearer diagnostics.
  5. Retesting and Validation:

    • After applying any fixes, retest all scenarios to confirm that issues are resolved and the correct balances display consistently.

Notes:
This ticket does not introduce new features but ensures the existing integration for displaying balances via LCFS’s Redis cache works correctly. Debugging and adjustments may involve changes to TFRS and LCFS configuration, logging enhancements, or minor code adjustments to properly handle data retrieval and display.

@AlexZorkin AlexZorkin added Medium Medium priority Task Work that does not directly impact the user labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium Medium priority Task Work that does not directly impact the user
Projects
None yet
Development

No branches or pull requests

1 participant