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: rename export zip to {flow-slug}-{session-id}.zip #2893

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

jessicamcinchak
Copy link
Member

@jessicamcinchak jessicamcinchak commented Mar 15, 2024

When downloading zips via "Send to email", councils want to more clearly see which service a zip is associated with for reporting.

Relies on theopensystemslab/planx-core#328

Testing:

  • Run through a send to email flow using your own email as the teams.submission_email - confirm the zip is named as expected on download

@jessicamcinchak
Copy link
Member Author

Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Nice and simple! ✅

Update: Jumped the gun here sorry, didn't realise it was still in draft 🤦

Copy link

github-actions bot commented Mar 15, 2024

Removed vultr server and associated DNS entries

@jessicamcinchak
Copy link
Member Author

Zip is working as expected on pizza here, but invite to pay is broken -
https://api.2893.planx.pizza/invite-to-pay/9b02ef22-1cf6-4ec0-b602-c3650706b48a is throwing error "could not initiate a payment request: Cannot read properties of undefined (reading 'id')"

Can't spot where I've missed a session type update, going to switch tasks for a bit and come back with fresh eyes later.

@jessicamcinchak jessicamcinchak marked this pull request as ready for review March 15, 2024 17:46
this.zip = new AdmZip();
// make a tmp directory to avoid file name collisions if simultaneous applications
this.tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), sessionId));
this.filename = path.join(__dirname, `ripa-test-${sessionId}.zip`);
this.filename = path.join(__dirname, `${flowSlug}-${sessionId}.zip`);
Copy link
Contributor

@DafyddLlyr DafyddLlyr Mar 15, 2024

Choose a reason for hiding this comment

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

This gives me the following on Pizza -
image

Are you getting this also? Could we drop __dirname here?

Copy link
Member Author

Choose a reason for hiding this comment

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

dirname only occurs on docker envs as I understand it (so local & pizzas), should be automatically omitted on staging / prod !

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect, thanks for clarifying! Makes sense considering we don't get this on staging / prod.

Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

  • ITP tested ✅
  • Send to email zip name tested ✅

All looking good!

@jessicamcinchak jessicamcinchak merged commit c8acf02 into main Mar 15, 2024
12 checks passed
@jessicamcinchak jessicamcinchak deleted the jess/rename-export-zip branch March 15, 2024 18:16
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