-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Upgrade bug and test fixes #17500
Upgrade bug and test fixes #17500
Conversation
…ubmission throwing errors
/* eslint-disable ember/no-computed-properties-in-native-classes */ | ||
import FlashMessage from 'ember-cli-flash/components/flash-message'; | ||
|
||
export default FlashMessage.extend({ | ||
export default class FlashMessageComponent extends FlashMessage { | ||
// override alertType to get Bulma specific prefix | ||
//https://github.com/poteto/ember-cli-flash/blob/master/addon/components/flash-message.js#L35 | ||
alertType: computed('flash.type', { | ||
get() { | ||
const flashType = this.flash.type || ''; | ||
let prefix = 'is-'; | ||
|
||
return `${prefix}${flashType}`; | ||
}, | ||
}), | ||
}); | ||
//https://github.com/poteto/ember-cli-flash/blob/master/addon/components/flash-message.js#L55 | ||
get alertType() { | ||
const flashType = this.args.flash.type || ''; | ||
return `is-${flashType}`; | ||
} | ||
} |
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.
This needed to be updated after upgrading to the latest version since they converted to native class.
@@ -40,7 +38,7 @@ const LIST_ROOT_ROUTE = 'vault.cluster.secrets.backend.list-root'; | |||
const SHOW_ROUTE = 'vault.cluster.secrets.backend.show'; | |||
|
|||
export default class SecretCreateOrUpdate extends Component { | |||
@tracked codemirrorString = null; | |||
// @tracked codemirrorString = null; |
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.
Did you mean to keep this as a comment?
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 don't think so. Guessing I was trying to debug something so let me uncomment it and see if the tests still pass.
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.
So commenting that out did fix these tests which are now failing. I must have forgot to loop back and look for a proper solution. I'm thinking the code-mirror modifier must be send the on change event right away which is triggering the same computation error.
@@ -11,7 +11,7 @@ | |||
class="input" | |||
{{on "input" this.onInput}} | |||
/> | |||
<BasicDropdown @registerAPI={{fn (mut this.dropdownAPI)}} @renderInPlace={{true}} as |D|> |
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.
is this removed because mut is being deprecated?
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.
No mut
is still a good helper but it was throwing the twice in the same computation error but didn't when I moved it to an action.
@@ -11,7 +11,7 @@ module('Integration | Component | link-status', function (hooks) { | |||
|
|||
// this can be removed once feature is released for OSS | |||
hooks.beforeEach(function () { | |||
this.owner.lookup('service:version').set('isEnterprise', true); | |||
this.owner.lookup('service:version').set('version', '1.13.0+ent'); |
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.
will this continue to stay true after we increase the binaries? say when we hit the next 1.14 binary?
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 the plan is to introduce this to OSS in the next version so it's likely only temporary. The problem with this particular line was that isEnterprise
is a computed property and an error is thrown now when a computed property without a setter is overriden. Setting the version this way makes isEnterprise
return true
.
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.
Nice work. left two comments about comments that might have accidentally been left in.
…ausing same computation error
this.args.named.onUpdate(editor.getValue(), this._editor); | ||
// avoid sending change event after initial setup when editor value is set to content | ||
if (this.args.named.content !== editor.getValue()) { | ||
this.args.named.onUpdate(editor.getValue(), this._editor); | ||
} |
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.
@Monkeychip this was this issue causing the same computation error. Since we are setting the editor value to the content arg in the setup the change event was firing immediately.
* runs ember-cli-update to 4.4.0 * updates yarn.lock * updates dependencies causing runtime errors (#17135) * Inject Store Service When Accessed Implicitly (#17345) * adds codemod for injecting store service * adds custom babylon parser with decorators-legacy plugin for jscodeshift transforms * updates inject-store-service codemod to only look for .extend object expressions and adds recast options * runs inject-store-service codemod on js files * replace query-params helper with hash (#17404) * Updates/removes dependencies throwing errors in Ember 4.4 (#17396) * updates ember-responsive to latest * updates ember-composable-helpers to latest and uses includes helper since contains was removed * updates ember-concurrency to latest * updates ember-cli-clipboard to latest * temporary workaround for toolbar-link component throwing errors for using params arg with LinkTo * adds missing store injection to auth configure route * fixes issue with string-list component throwing error for accessing prop in same computation * fixes non-iterable query params issue in mfa methods controller * refactors field-to-attrs to handle belongsTo rather than fragments * converts mount-config fragment to belongsTo on auth-method model * removes ember-api-actions and adds tune method to auth-method adapter * converts cluster replication attributes from fragment to relationship * updates ember-data, removes ember-data-fragments and updates yarn to latest * removes fragments from secret-engine model * removes fragment from test-form-model * removes commented out code * minor change to inject-store-service codemod and runs again on js files * Remove LinkTo positional params (#17421) * updates ember-cli-page-object to latest version * update toolbar-link to support link-to args and not positional params * adds replace arg to toolbar-link component * Clean up js lint errors (#17426) * replaces assert.equal to assert.strictEqual * update eslint no-console to error and disables invididual intended uses of console * cleans up hbs lint warnings (#17432) * Upgrade bug and test fixes (#17500) * updates inject-service codemod to take arg for service name and runs for flashMessages service * fixes hbs lint error after merging main * fixes flash messages * updates more deps * bug fixes * test fixes * updates ember-cli-content-security-policy and prevents default form submission throwing errors * more bug and test fixes * removes commented out code * fixes issue with code-mirror modifier sending change event on setup causing same computation error * Upgrade Clean Up (#17543) * updates deprecation workflow and filter * cleans up build errors, removes unused ivy-codemirror and sass and updates ember-cli-sass and node-sass to latest * fixes control groups test that was skipped after upgrade * updates control group service tests * addresses review feedback * updates control group service handleError method to use router.currentURL rather that transition.intent.url * adds changelog entry
Other than general bug fixes that were causing tests to fail, here are the primary things addressed:
ember-cli-content-secrity-policy
was causing a weird browser timeout issue in test runs when not using-s
. We were on a really old version so I bumped it to the latest which moves the config to a dedicated file with more options. There's an option to choose whether or not policy errors will cause a test to fail and I left it enabled for nowflashMessages
service was being automatically injected so that was throwing errors in places. I updated the inject-service codemod to take an arg for service name so that it's more flexible and did another pass forflashMessages
hbs
and not usingthis
which I cleaned up