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

Importing a collection changes all request id's #8440

Closed
ManiacDC opened this issue May 5, 2020 · 16 comments
Closed

Importing a collection changes all request id's #8440

ManiacDC opened this issue May 5, 2020 · 16 comments

Comments

@ManiacDC
Copy link

ManiacDC commented May 5, 2020

Describe the bug
After a recent Postman update (yesterday is when I first noticed it), when I import a collection, and then export it, all the request id's are changed in the export json collection. This happens upon import, as if I export the same collection twice (without re-importing), the request id's match; however, if I Import > export > import > export, the request id's will not match.

My group's workflow is to import the collection, make changes in Postman, and then export it and commit it. Changing the request id's will cause numerous conflicts during merges.

To Reproduce
Steps to reproduce the behavior:

  1. Import a previously-exported collection v2.1
  2. Export the collection to a different file
  3. Compare the original file and the new file, note the id's are all different

Expected behavior
Prior to a recent Postman update, only the collection id (1 line) would change, which was easy enough to fix. The request id's would not change. The expected behavior is that the request id's do not change.

App information (please complete the following information):

  • Postman for Windows
  • Postman Version 7.23.0
  • OS: Windows 10 18362 x64
@arlemi
Copy link
Collaborator

arlemi commented May 7, 2020

@ManiacDC Which collection format are you using? Collection v2 and v2.1 formats do not contain request IDs. (read more about the differences between v1 and v2 here).
If you are exporting your collections in the v1 format I would recommend that you switch to v2.1.

If you are in v2 or v2.1 then you may be talking about pre-requests and tests IDs, in that case we have voluntarily changed the behaviour for these to be updated on import from Postman 7.23. Each entity that is imported is considered a new entity and therefore should have unique IDs.
We've discussed the same workflow that you have in #4802 if you'd like more context.

We're working on ID-less export in the meantime, we'll update the following issue when we have more info about it #2906.

I'll close this issue since this isn't a bug, let me know if there's anything you'd like more clarity on!

@arlemi arlemi closed this as completed May 7, 2020
@ManiacDC
Copy link
Author

ManiacDC commented May 7, 2020

Hi @arlemi , we are using v2.1. Sorry, I'm referring to pre-request and test ID's then.

It looks like there's no real solution until 2906, but I'll see if that postman-cli will do anything for us. Thank you.

@arlemi
Copy link
Collaborator

arlemi commented May 7, 2020

@ManiacDC Based on your team size/number of requests you're working with you may want to have a look at collaborating directly in Postman which gives you version control directly in the app instead of going through git.

@ManiacDC
Copy link
Author

ManiacDC commented May 7, 2020

Thanks, I'm aware of that, but it's not an option for our workflow.

@murven
Copy link

murven commented May 14, 2020

@arlemi Having two version control systems and the need for two separate PRs, reviews and approvals is definitely not a viable option in most teams.

@ManiacDC
Copy link
Author

Also, looked into postman-cli. We actually already have an assembler/disassembler that's more powerful than that tool, so it won't help us with this scenario either.

@arlemi
Copy link
Collaborator

arlemi commented May 14, 2020

@murven We're also tracking feature requests on synchronising API/collections with other git repositories (other than GitHub), see #4780 or #8245.

@ManiacDC If you have a custom tool, while we work on the ID-less export, you could add a step to remove all pre-request/test IDs before pushing to the repository.

@ManiacDC
Copy link
Author

@arlemi it's an idea we're probably going to implement. We'd have to strip it after running postman-collection module.

@arlemi
Copy link
Collaborator

arlemi commented May 14, 2020

@ManiacDC Would love to see it showcased here if you end up implementing it: https://community.postman.com/c/content-showcase/7, also feel free to open a topic on the community forum if you'd like help with it, quite a few of us who'd de be happy to help. 😄

@murven
Copy link

murven commented May 14, 2020

@arlemi I tried setting the ID to empty string in JSON, but now Postman cannot import it anymore. Would it be necessary to completely remove it?

@arlemi
Copy link
Collaborator

arlemi commented May 14, 2020

@murven Just tried with both empty string and removing it completely and import worked without issue. Admittedly I'm trying on a very simple collection but it shouldn't matter. Would you mind sharing your export (after removing any sensitive data)?

@murven
Copy link

murven commented May 14, 2020

@arlemi thanks, but I am not allowed to share, I will try to reproduce with a smaller collection on a generic API later, but without knowing what is making it fail, I am just hitting in the dark, so I will just move on for now.

@arlemi
Copy link
Collaborator

arlemi commented May 14, 2020

@murven @ManiacDC If you'd like you can reach out to me by email and we can set some time to look into it together: arlemi@postman.com.

@prakashn27
Copy link

We too have the same issue. exports and import with the version 2.1 changes all the ids.

@obarat
Copy link

obarat commented Sep 29, 2020

This is obviously a scheme to make offline collection management painful so more people buy their premium offerings

@arlemi
Copy link
Collaborator

arlemi commented Sep 30, 2020

@obarat You can follow improvements on that flow in #2906.

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

No branches or pull requests

5 participants