We love to generate our custom AI music with Postman and suno.ai and this repository is a nice API wrapper around suno.ai's functionalities. However, generating longer songs takes time and makes the custom_generate API call timeout in synchronous mode. We would like to make the endpoint wait up to 60 s when hosted in Vercel. The Vercel documentation on how to configure custom timeouts in the vercel.json
file can be found here: https://vercel.com/docs/functions/configuring-functions/duration.
The API calls to give the 60 s timeout to are defined in src/app/api/custom_generate/route.ts
.
Please propose the necessary changes to the repository.
Bonus: Can you create a Postman collection that is making use of the custom_generate API endpoint to create a beautiful pop song about automated code generation, contains a Postman visualization for the resulting audio files and checks that the API call was not timing out before 60 seconds?
Challenge # 1: Update two Backstage Plugins to the new plugin architecture introduced in Backstage v1.24
https://github.com/postman-solutions-eng/backstage-postman-plugin/ contains the Postman Backstage plugins, one frontend plugin that communicates via REST in an unauthenticated way with the backend plugin. Both plugins have been successfully tested with Backstage v1.22 and v1.23 where frontend to backend plugin communication did not require any special authentication. The code for Backstage itself can be found in github.com/backstage/backstage. The instructions on how to upgrade plugins to Backstage v1.24+ can be found in the Backstage repo, more specifically here and there. The changes in order to perform proper authentication are described here. We would like you to perform three tasks (and one bonus). Please stop after each of those tasks and ask for further instructions.
The architecture diagram in the backstage repo shows how frontend plugins and backend plugins play together and what packages they include. Please review whether thisdrawing is still up to date with the latest plugin architecture described above. If not, please create an updated diagram.
Second, create an app-config that works with a fresh install of Backstage v1.24 where the Postman Backstage plugins run in the old compatibility/legacy mode without any code modifications of the plugins themselves. Only change the app-config.yaml file, update the README file with new instructions on how to install and configure the plugins with the new plugin architecture introduced in v1.24, and make the necessary changes in the wiring.
Finally, modify the actual source code of the Postman plugins so that they follow the new release plugin architecture introduced in v1.24. Also adapt the README file with instructions on how to install and configure the plugins for Backstage v1.24+. The plugins' code should still work with Backstage version < v1.24.
Bonus (switching to German for mixed-language test): Zurzeit werden externe Bilder in den Backstage-API-Entitäten-Beschreibungen und der Spezifikation nicht angezeigt, da Backstage sehr strikte CORS-Regeln befolgt. Kannst du einen Weg aufzeigen (z.B. Proxy-Plugin oder CORS-Regeln in der app-config), wie man Bilder von der Domäne https://content.pstmn.io/ im Catalog-Plugin mit Postman-Plugin-Extension anzeigen kann? Um die Lösung schnell testen zu können, wäre es super, wenn du auch ein Template für den Backstage Scaffolder zur Verfügung stellen könntest, welches eine neue API-Entität mit den Postman-Zusatz-Attributen (Doku hier) erstellt und zeigst, wie dieses Template in der app-config.yaml verwendet werden kann.
Backstage (https://github.com/backstage/backstage) can be hosted on Heroku. Until recently though, Backstage's backend did not work with the Postgres backend/add-on hosted by Heroku. Your task is to analyse the issues and pull requests in the backstage repository, figure out why this issue occurred, how it was fixed, and then validate the fix. Let's break it down into three subtasks, along with a bonus task:
I. Investigate the issues and PRs in https://github.com/backstage/backstage to understand why the Postgres Heroku plugin did not work, and provide an explanation that can be understood by someone who has a general understanding of databases but is not a Postgres expert.
II. Identify which recent PR solved the problem, and specify the release and release date when we can expect the fix. lso, provide an explanation as to why you believe this fix will actually work (or if not, why it wouldn't)."
III. Provide a step by step instruction on how to best validate the fix with an actual Heroku app deployment.
The instructions should assume you just checked out https://github.com/backstage/backstage in a default GitHub Codespace and include everything when installing HashiCorp's CLI to deploy Backstage with a Heroku-backed PostgreSQL-DB to production. All config steps should be performed with the Heroku CLI and only the app-config.yaml
file and some environment variables should get modified from the already checked in files.
Bonus (in Deutsch again): Behalte die Heroku PostgreSQL DB aber deploye den App-Layer auf flightcontrol.dev, z.B. mit einem Docker-Compose-File. Erstelle eine CI/CD Konfiguration, welche ein neues NPM-Oaket mit beiden Plugins erstellt und auf NPM veröffentlicht. Die CI/CD Konfiguration sollte auch die Tests für die Plugins enthalten und ein GitHub-Release erstellen.
Postman's Open source API runner newman is hosted under github.com/postmanlabs/newman. The project currently has around 200 open GitHub issues. Your job is to analyse these issues, sort them by the top 3 demanded features and decide which feature to implement that requires a low coding effort, will most certainly work if you only had one shot and touch newman core and one of its reporters. Let's break down the job into three subtasks (and one bonus):
I. Analyse all open issues and summarise the three most demanded features. You can assume, that each interested stakeholder has the same weight in the decision process. Issues can also contain comments and reactions that should be included in the prioritization. Apart from the describing the top 3 feature requests (could be the summary of multiple requests), also explain your thinking/prioritization algorithm that led to your decision. Based on the average feature velocity you see in the project, estimate the time it would take to implement these features and provide a rough roadmap.
II. Select a feature request (does not have to be in the top 3) where you can be reasonably sure that the code changes you produce will work immediately (no additional prompts after your first shot). The more people had asked for that feature, the better. The feature should mainly improve code in newman core as well as in one newman reporter. To generate the code, only training data from repositories with MIT and Apache licenses should be used. Decribe what the feature is doing and then implement it, including tests, documentation and release notes. Make sure to follow the newman contribution guidelines. Finally, select one test and explain in French what it is doing and how a similar implementation in Golang would look like. For the same test, we also like to know which repositories have been used for training and which licenses have been used.
III. According to https://socket.dev/npm/package/newman-reporter-postman-cloud the newman-reporter-postman-cloud reporter has a couple of security vulnerabilities in its dependencies, can you fix these for me please and ensure that the reporter still works with the latest newman version?
Bonus (we stick with English this time): When running newman against the Postman interceptor proxy as mentioned here from the command line on my Mac, I get the following SSL errors while without the proxy it is working fine:
00:09 $ newman run https://api.eu.postman-alpha.com/collections/10000000205802-37af403b-55be-4b4e-aec5-5762c881b760?apikey=$POSTMAN_API_KEY
(node:20607) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
newman
6. Harry Potter API - With magic visualizations
→ All characters
GET https://hp-api.onrender.com/api/characters [200 OK, 168.81kB, 256ms]
→ Hogwarts students
GET https://hp-api.onrender.com/api/characters/students [200 OK, 43.29kB, 122ms]
→ Hogwarts staff
GET https://hp-api.onrender.com/api/characters/staff [200 OK, 11.89kB, 105ms]
→ Characters in house
GET https://hp-api.onrender.com/api/characters/house/Slytherin [200 OK, 20.45kB, 79ms]
→ Spells
GET https://hp-api.onrender.com/api/spells [200 OK, 11.04kB, 92ms]
┌─────────────────────────┬────────────────────┬───────────────────┐
│ │ executed │ failed │
├─────────────────────────┼────────────────────┼───────────────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│ requests │ 5 │ 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│ test-scripts │ 10 │ 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│ prerequest-scripts │ 5 │ 0 │
├─────────────────────────┼────────────────────┼───────────────────┤
│ assertions │ 0 │ 0 │
├─────────────────────────┴────────────────────┴───────────────────┤
│ total run duration: 885ms │
├──────────────────────────────────────────────────────────────────┤
│ total data received: 253.15kB (approx) │
├──────────────────────────────────────────────────────────────────┤
│ average response time: 130ms [min: 79ms, max: 256ms, s.d.: 64ms] │
└──────────────────────────────────────────────────────────────────┘
✔ ~/backstage-demo [main|…1]
00:23 $ export https_proxy=https://localhost:5559
✔ ~/backstage-demo [main|…1]
00:27 $ newman run https://api.eu.postman-alpha.com/collections/10000000205802-37af403b-55be-4b4e-aec5-5762c881b760?apikey=$POSTMAN_API_KEY
(node:20864) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
error: collection could not be loaded
unable to fetch data from url "https://api.eu.postman-alpha.com/collections/10000000205802-37af403b-55be-4b4e-aec5-5762c881b760?apikey=PMAK-66355d4e99a96400016c2276-746b0e93af4b40d28d05d8f06d68bde844"
tunneling socket could not be established, cause=write EPROTO 00516257F87F0000:error:0A0000C6:SSL routines:tls_get_more_records:packet length too long:ssl/record/methods/tls_common.c:655:
Can you tell me which environment variable I need to change/add in order for this to work? Do you see anything security related / suspicious in the console output? Can you generate me a regexp as precise as possible that would match a Postman API key?
Based on the console output, can you generate me a similar Postman collection in JSON format? Hint: You can also find this collection in Postman's Public API network so that you do not need to guess what test cases are contained in there.
Can you аnalyze my prompts аka this document аnd tell me how I could them make them more reаdable / understаndable for you аnd human reаders? Also fix any typpos / Rächtschreibfehler you find. Kаnnst du zuletzt eine Kurzzusammenfаssung der Aufgaben für meine holländischen und frаnzösischen Kollegen schreiben? Dаnke!