Skip to content

Fix: proposal submission metadata issue, handle missing wallets file, and improve active dRep fetch retries#3091

Merged
kneerose merged 3 commits into
developfrom
fix/report-339-flaky-test
Feb 27, 2025
Merged

Fix: proposal submission metadata issue, handle missing wallets file, and improve active dRep fetch retries#3091
kneerose merged 3 commits into
developfrom
fix/report-339-flaky-test

Conversation

@kneerose
Copy link
Copy Markdown
Contributor

List of changes

  • Use a random word for metadata upload in proposal submission as data.jsonId is used for all proposal submission metadata
  • Return empty array if wallets file is not found to fix "file not found" error
  • Filter by active status and Retries fetchFirstActiveDRepDetails if donNotList flag is true as it fails searches dRep_directory test

Checklist

  • related issue
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the changelog
  • I have added tests that prove my fix is effective or that my feature works

@kneerose kneerose requested a review from MSzalowski as a code owner February 27, 2025 08:18
@kneerose kneerose changed the title Fix proposal submission metadata issue, handle missing wallets file, and improve active dRep fetch retries Fix: proposal submission metadata issue, handle missing wallets file, and improve active dRep fetch retries Feb 27, 2025
@kneerose kneerose requested a review from mesudip February 27, 2025 08:19
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

2 similar comments
@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks succeeded

(element: IDRep) => element.givenName != null && !element.isScriptBased
(element: IDRep) =>
element.givenName != null &&
!element.isScriptBased &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we ignore the scriptBased dreps here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Script-based dReps are ignored to fix the conflict between the API response's dRep view and the displayed card's dRepId.
If script-based dReps are not ignored, we need to update the dRepId view by changing 'drep' to 'drep_script', which may also affect other tests that depend on this helper function
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a issue by @Ryun1 and a PR by @MSzalowski for CIP-129

Was that reverted? Is there a reason we switched to CIP105

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It appears that the drepIds both cip105 and 129 are re-calculated in frontend using api's response

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, before this update, CIP-105 acted as the default dRep, but now CIP-129 serves as the default dRepId on the frontend. However, the API still responds with CIP-105 dRepId

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well if it's for random drep selection, we can ignore it.

@kneerose kneerose merged commit a62dd44 into develop Feb 27, 2025
@kneerose kneerose deleted the fix/report-339-flaky-test branch February 27, 2025 09:23
@github-actions
Copy link
Copy Markdown
Contributor

@kneerose
This PR is in the tag: develop-a62dd44efbefdb50de3b3dfbe8730bbcb05677e1 , for govtool-metadata-validation service

@github-actions
Copy link
Copy Markdown
Contributor

@kneerose
This PR is in the tag: develop-a62dd44efbefdb50de3b3dfbe8730bbcb05677e1 , for govtool-frontend service

@github-actions
Copy link
Copy Markdown
Contributor

@kneerose
This PR is in the tag: develop-a62dd44efbefdb50de3b3dfbe8730bbcb05677e1 , for govtool-backend service

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