-
Notifications
You must be signed in to change notification settings - Fork 4
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
GPII-3921: Update gpii-express-user to use modern dependencies, especially gpii-json-schema. #6
Conversation
…n-schema to enable a dev release.
…er component's lifecycle.
@sgithens, here's the pull to update gpii-express-user to support your work. I left the version of kettle alone, it still matches universal master. As I mentioned on IRC, there's a dev release for you to use: 1.0.2-dev.20190628T073950Z.6efdc50.GPII-3921 |
…ma validated model component lifecycle.
…alidation middleware.
@amb26, I tried using the resource loader support for promises to bring in schema holder content. If I launch tests/js/launch-test-harness.js with debugging enabled, I get an error like the following:
If I set a breakpoint at that line in |
Turns out that |
…sions of Infusion.
…handlebars and gpii-json-schema.
… template directory" work.
…directory prioritisation.
@the-t-in-rtf Now that the resulting gpii-json-schema pull has been merged in, do you think we can look at merging this work back in to master? |
@sgithens, thanks for reminding me here and in chat. I had actually completely forgotten that I'd already made a pass at this. It's been so long that I hadn't even checked out the repo on my new machine yet, and I've had that for months. Anyway, @amb26, this is ready for review, and now more urgently needed. The changes are adjustments to use the new resource loader aware stuff from gpii-handlebars and gpii-json-schema, it would be good to get another pair of eyes on at least that part. @sgithens, I did cut a dev release at the time if that helps at all, it's:
|
@the-t-in-rtf Awesome thanks. I might try the dev release, although it does actually work as is (but I'm just using the password unlocking, may need more of the repo soon). |
src/js/common/globalOrLiteral.js
Outdated
|
||
/** | ||
* | ||
* Evaluate a single entry and retrieve the associated global variable if possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be a bit clearer about the workflow here, and what object is returned, since the logic is a little complex. If the argument is a string, it is looked up, and any value other than undefined is returned, else {} .... otherwise the input argument is returned. Does this really need to be this complex? I don't see that it is used elsewhere in the pull.
In my experience, functions like this which include lots of special cases in order to be "helpful" end up causing problems down the line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was left over from a previous approach, I have deleted it.
src/js/common/globalOrLiteral.js
Outdated
* Evaluate a single entry and retrieve the associated global variable if possible. | ||
* | ||
* @param {String|Object} toEvaluate - A single message bundle represented as a raw object or as a global variable name. | ||
* @return {Object} - A message bundle object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that it might not be of type {Object} if some value other than undefined or an Object is stored in the global name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's gone.
package.json
Outdated
"gpii-grunt-lint-all": "1.0.5", | ||
"gpii-mail-test": "1.0.5", | ||
"gpii-webdriver": "1.1.0", | ||
"grunt": "1.0.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few of these have become further outdated since this pull was issued, e.g. grunt -> 1.1.0, eslint -> 6.8.0 (doesn't lint-all pull in its own deps anyway?)
Also please could you try updating to kettle 1.12.0 and infusion 3.0.0-dev.20200317T122331Z.1aa7ea8a1.FLUID-6145 - thanks
Due to some bug in Chrome and/or chromedriver 81, I am no longer able to run the webdriver tests - https://stackoverflow.com/questions/61321143/12296266720420-163936-459errorbrowser-switcher-service-cc238-xxx-init-er |
CI job failed: https://ci.gpii.net/job/gpii-express-user-tests/1/ |
I initially got an error related to a chrome/chromedriver mismatch, just fixed that. I still see the same issue when running in Vagrant locally, although interestingly the gpii-webdriver tests pass with the same VM image and chrome/chromedriver version. |
CI job failed: https://ci.gpii.net/job/gpii-express-user-tests/3/ |
Now it's broken in the same way as everything else. My next ideas are:
|
…tance of CouchDB.
Cheers @the-t-in-rtf - I've rolled infusion 3.0.0-dev.20200512T100752Z.0d704c4.FLUID-6148 from the current head of that branch. Interesting that my choice to keep FLUID-6148 and FLUID-6145 development separated seems somewhat vindicated which otherwise might have been a pointless piece of bureaucracy .... |
Ok - there is now 3.0.0-dev.20200514T203129Z.505489c.FLUID-6145 which fixes this issue, you should be able to update to it |
CI job failed: https://ci.gpii.net/job/gpii-express-user-tests/9/ |
Provisioning error in the VM creation stage. Ok to test again. |
CI job failed: https://ci.gpii.net/job/gpii-express-user-tests/10/ |
@amb26, just refreshing this with the newer release. It still has the circular dependency error when run locally in a VM. |
So, I updated all dependencies just to make sure I hadn't had to make a code change in either |
CI job failed: https://ci.gpii.net/job/gpii-express-user-tests/11/ |
CI job failed: https://ci.gpii.net/job/gpii-express-user-tests/12/ |
Cheers - I have rolled a fresh 3.0.0-dev.20200528T154535Z.9cd9261.FLUID-6145 which contains even an even more egregious version of the hack to avoid tripping this as a circular dependency - all of this code so badly needs rewriting. |
The latest failure looks like another options-munging issue where I used the old pattern of stuffing material to be inspected later on into the request: I'll add a member variable or other safe stash for that, and then fingers crossed. |
Ugh, it was nothing nearly as innocent, it was straight-up options munging to avoid writing a proper termMap and passing direct options to incorporate into the path. Fixing it properly now. |
When we switched to a FLUID-6145 variant I had to update the tests to avoid options munging. They now pass locally, fingers crossed to round this out shortly. |
CI job passed: https://ci.gpii.net/job/gpii-express-user-tests/13/ |
The second build is just with the full release of gpii-mail-test, I saw once that passes we're good here. |
CI job passed: https://ci.gpii.net/job/gpii-express-user-tests/14/ |
src/js/common/schemaHolders.js
Outdated
properties: { | ||
username: { | ||
anyOf: [ | ||
// TODO: Revert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this TODO can be done now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this, fixing it now.
src/js/common/schemaHolders.js
Outdated
title: "gpii-express-user user resend verification code schema", | ||
description: "This schema defines the format accepted when requesting that a verification code be resent.", | ||
properties: { | ||
// TODO: Revert |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one
Last build seemed to hang and was killed off. Tests still pass locally, the TODO changes will kick of another build, let's see how it goes. |
CI job passed: https://ci.gpii.net/job/gpii-express-user-tests/15/ |
Ready to merge this when you are, @amb26. |
Self-merged based on conversations with reviewer. |
See GPII-3921 for details.
@amb26, this should be reviewed after the related gpii-json-schema pull that fixed a blocking bug.