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

issue #1362 Upgrade to openpgp.js v5 #1374

Merged
merged 185 commits into from Feb 18, 2022
Merged

issue #1362 Upgrade to openpgp.js v5 #1374

merged 185 commits into from Feb 18, 2022

Conversation

IvanPizhenko
Copy link
Contributor

@IvanPizhenko IvanPizhenko commented Feb 9, 2022

This PR upgrades OpenPGP.js to v 5.1.0

close #1362


Tests (delete all except exactly one):

  • Tests added or updated

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@IvanPizhenko
Copy link
Contributor Author

I understand this, but if you at least knew what to lookup, I had no idea completely what can be done else. So I would (and I already said this before) stick for some time with such slightly patched openpgp.js and would wait until they fix web-stream-tools so that it does not require any extra steps to use it and then update to them.

Copy link
Collaborator

@tomholub tomholub left a comment

Choose a reason for hiding this comment

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

Code looks good except the tests as below.

I've closed all conversations that can be closed, and left some open to resolve (you need to click a few times to show them all since there is so many).

Here is a screenshot - this is still unresolved, I cannot merge such large changes together with test asset changes, regardless how small the test asset changes are. Tests must be exactly testing same inputs and same outputs. You can change the inputs in another PR, but not in this one - please revert.

image

@tomholub
Copy link
Collaborator

tomholub commented Feb 13, 2022

Meanwhile @rrrooommmaaa please have a look at this. We'll soon have to update browser-extension to OpenPGP v5 as well - your input on this PR will be greatly appreciated 👍 (see https://github.com/FlowCrypt/flowcrypt-ios/invitations - I wanted to request a review from you but GH doesn't allow until you are added to the repo).

@rrrooommmaaa rrrooommmaaa self-requested a review February 14, 2022 15:51
@IvanPizhenko
Copy link
Contributor Author

@tomholub Please read this feedback from openpgp.js developers regarding capabilities - openpgpjs/openpgpjs#1493 (comment)
Anyway, what I did is tried to port original code of getExpirationTime() with capabilities.

@IvanPizhenko
Copy link
Contributor Author

Code looks good except the tests as below.

I've closed all conversations that can be closed, and left some open to resolve (you need to click a few times to show them all since there is so many).

Here is a screenshot - this is still unresolved, I cannot merge such large changes together with test asset changes, regardless how small the test asset changes are. Tests must be exactly testing same inputs and same outputs. You can change the inputs in another PR, but not in this one - please revert.

image

@tomholub In this case these tests will be failing and I will have to mark them with skip to have CI passing. Is it ok?

@tomholub
Copy link
Collaborator

@tomholub In this case these tests will be failing and I will have to mark them with skip to have CI passing. Is it ok?

Why would they be failing? If it's just removed comments and \r\n changed to \n? I was exactly worried about this - that there is something more going on.

What will they be failing on and why?

@IvanPizhenko
Copy link
Contributor Author

IvanPizhenko commented Feb 15, 2022

@tomholub In this case these tests will be failing and I will have to mark them with skip to have CI passing. Is it ok?

Why would they be failing? If it's just removed comments and \r\n changed to \n? I was exactly worried about this - that there is something more going on.

What will they be failing on and why?

These changes to test string are done because strings returned by openpgp.js v5 are different. So I had to fix these strings to match what openpgp.js returns now. Because test matches strings exactly (is.deep.equal(...)).

@tomholub
Copy link
Collaborator

These changes to test string are done because strings returned by openpgp.js v5 are different. So I had to fix these strings to match what openpgp.js returns now. Because test matches strings exactly (is.deep.equal(...)).

My bad, I thought these were test inputs. Now I see these are outputs. Looks good.

tomholub
tomholub previously approved these changes Feb 15, 2022
@tomholub
Copy link
Collaborator

Once tests are passing, I'm good to merge it, assuming Roman is.

@tomholub
Copy link
Collaborator

@IvanPizhenko well done to update to v5, not an easy task.

@IvanPizhenko
Copy link
Contributor Author

@tomholub I can see in CI that Appium UI tests fail. What's that?

@tomholub
Copy link
Collaborator

Likely unrelated. Try updating the branch to master, let's see if that passes.

rrrooommmaaa
rrrooommmaaa previously approved these changes Feb 16, 2022
@tomholub tomholub enabled auto-merge (squash) February 17, 2022 11:59
@IvanPizhenko
Copy link
Contributor Author

@tomholub Still failing, even after multiple times merging updates from master

@tomholub
Copy link
Collaborator

@IvanPizhenko let's have @sosnovsky finalize this, assuming the issue is unrelated to the code (which it should be, we haven't actually changed the app yet)

@sosnovsky sosnovsky dismissed stale reviews from rrrooommmaaa and tomholub via d06f77d February 17, 2022 21:38
@tomholub tomholub merged commit 42ddb39 into master Feb 18, 2022
@tomholub tomholub deleted the issue-1362-openpgp-js-v5 branch February 18, 2022 09:46
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.

update OpenPGP.js to v5
4 participants