Skip to content

Conversation

@kaspermarkus
Copy link
Member

@kaspermarkus kaspermarkus commented Feb 27, 2018

This pull request includes Josephs GPII-442 work (the relevant parts of it)

Contains fixes for: GPII-1230, GPII-1235, GPII-2106, GPII-1936, GPII-1750, GPII-1173, GPII-2165, GPII-1930, GPII-2824

Related linux and windows branches: GPII/linux#91, GPII/windows#120

This extends and replaces the old MM pull: #507

Kasper Markus added 30 commits January 26, 2017 10:42
@gpii-bot
Copy link

CI job passed: https://ci.gpii.net/job/universal-tests/717/

if (rootAction === "start" || rootAction === "update") {
var toSnapshot = gpii.lifecycleManager.removeSettingsBlocks(fluid.copy(solutionRecord));

// Disabled the removing of all settingshandlers blocks to ensure that we have them available when restoring the system.
Copy link
Member

Choose a reason for hiding this comment

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

Rather than having commenting out code lying around, we should reword the comment to simply reflect the current state - e.g. "Do not remove settingsHandler blocks, since ..."

@gpii-bot
Copy link

CI job failed: https://ci.gpii.net/job/universal-tests/719/

@gpii-bot
Copy link

CI job passed: https://ci.gpii.net/job/universal-tests/720/

@gpii-bot
Copy link

CI job passed: https://ci.gpii.net/job/universal-tests/721/

@gpii-bot
Copy link

CI job passed: https://ci.gpii.net/job/universal-tests/722/

@gpii-bot
Copy link

CI job passed: https://ci.gpii.net/job/universal-tests/723/

gpii.matchMakerFramework.utils.preProcess = function (initialPayload) {
var matchMakerInput = fluid.extend({
activeContexts: [], // set later in the process
environmentReporter: {}, // TODO,
Copy link
Member

Choose a reason for hiding this comment

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

What is the TODO here?

* if entries for multiple solutions are provided, only the "first" solution entry will be
* extended. The remaining arguments will be fluid.extended onto the first argument.
*
* @currentInstructions {Object} a set of lifecycle instructions keyed by a solution id. For example,
Copy link
Member

Choose a reason for hiding this comment

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

Fix up JSDocs here - it should (now) be @param {Object} currentInstructions - A set of etc.

*/
gpii.tests.lifecycleManager.extendLifecycleInstructions = function (currentInstructions) {
var togo = fluid.copy(currentInstructions);
var solId = Object.keys(currentInstructions)[0];
Copy link
Member

Choose a reason for hiding this comment

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

I think it would well be worth having a check that the length of Object.keys is exactly 1 and if it isn't, exploding


/*
* responsible for building the input payload to the matchmaker, via a bunch of helper functions
* initialPayload consists of:
Copy link
Member

Choose a reason for hiding this comment

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

Comment should be clear on whether the input argument is modified since it isn't totally clear from the implementation

Copy link
Member Author

Choose a reason for hiding this comment

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

good point! It would depend on the specific matchmaker implementation whether the input is modified - and while I dont think neither the canopy MM nor flat MM touches the inputs right now, I've changed the code to make a copy of it and pass that on - though it goes against all of Kasparnets principles not to leave a time bomb bug like that laying around :)

// augment payload with inferred common terms
payload.preferences = gpii.matchMakerFramework.utils.addInferredCommonTerms(payload.preferences, payload.inferredCommonTerms);
payload.preferences = gpii.matchMakerFramework.utils.addInferredCommonTermsToPreferences(payload.preferences, payload.inferredCommonTerms);
// gpii.matchMakerFramework.utils.addCapabilitiesInformation(payload);
Copy link
Member

Choose a reason for hiding this comment

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

Stray commented line - does this need to stay or go?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll remove it.. This has now been moved to the matchmaker utitilies as part of building the MM input payload

}
}
if (inCanopy) {
// if solution is already disposed, dont redo it. Previous steps make sure canopy is raised accordingly
Copy link
Member

Choose a reason for hiding this comment

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

Global S&R dont -> don't : P

@gpii-bot
Copy link

CI job failed: https://ci.gpii.net/job/universal-tests/757/

@gpii-bot
Copy link

CI job failed: https://ci.gpii.net/job/universal-tests/777/

@gtirloni
Copy link
Contributor

gtirloni commented Apr 2, 2018

test this please

@gpii-bot
Copy link

gpii-bot commented Apr 2, 2018

CI job failed: https://ci.gpii.net/job/universal-tests/796/

@gpii-bot
Copy link

gpii-bot commented Apr 2, 2018

CI job passed: https://ci.gpii.net/job/universal-tests/797/

@amb26 amb26 merged commit 51ccd0f into GPII:master Apr 3, 2018
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.

4 participants