[AutoComplete] triggerUpdateOnFocus buggy

Greetings.
On my react application, im using material-ui AutoComplete.
Im using "showAllItems" version, that passes the property triggerUpdateOnFocus with true value, mounted on a dialog (from material-ui too)
Whene I click inside the input, it shows the menu list, but it disappears  instantly on mouse click up.
I can state that if i click and leave mouse button down, that it does not disappear.
Im using the last version of materail-ui and my browser is chrome.
Best regards awatting for a feedback,
Ricardo Ferreira

Is https://github.com/callemall/material-ui/pull/3356 solving this issue?

No, it's not working. I replaced triggerUpdateOnFocus property with openOnFocus. still the same bug.

 Otherwise, that sounds like an issue with the internal Popover component.

I'm getting allways the last version via NPM on visual studio.
Atm I have the 0.14.4

Well, the PR I have linked to you wasn't released on npm.

I have encountered this bug as well. Tried to use the latest version from the master branch, and that one has another bug altogether: In certain cases, while typing in the TextField, it suddenly loses focus. And I couldn't focus on it any more after that when I tried clicking on it. So I'll be sticking to 0.14.4 for now.

@filbertteo could we have more details on the issue with the autocomplete on the master. How can we reproduce it?

@oliviertassinari My bad. I was using the AutoComplete from the master branch while the other source files are from the 0.14.4 branch, so that might be the reason why. I'll try again soon with all files from the master branch and update you again.

@oliviertassinari Whene do you think this PR will be released on NPM?
Regards

We plan to do an alpha release soon.

@RicardoJPFerreira - does it fix this issue for you?

@mbrookes The correction that oliviertassinari gave me isn't yet available on NPM, so, i didn't try it yet.
Like he said, they plan to release an alpha soon.

Okay, going to close this for now. Feel free reopen if the issue persists after you test with HEAD (or 0.15.0-alpha.1 if you'd prefer to wait).

Test

Greetings.
I must reopen this issue.
See the following video in order to understand my problem:  http://screencast.com/t/NoBptezBfiwr
The 2 times that the "popover" apears with the list, is only whene I press the mouse  left button and leave it pressed. Otherwise, a simple click will never open the list.

I'm unable to reproduce this in:
Material-UI: v0.25.0-alpha.1
Browser: Chrome 48.0.2564.116, OS X 10.9.5.
React: 0.14.7
Anyone else?

I have the same chrome version running on win7
cant you reproduce on the following link?
http://www.material-ui.com/v0.15.0-alpha.1/#/components/auto-complete

@mbrookes, you should be able to reproduce it on the "Data Sources" example on the docs page: http://www.material-ui.com/v0.15.0-alpha.1/#/components/auto-complete and/or http://www.material-ui.com/v0.14.4/#/components/auto-complete. The "showAllItems" example has a an openOnFocus property of true. If you click on and off and back onto that field you should see the popover flicker open and then close. I see this while using Chrome 48.0.2564.116 on OS X 10.11.3.
I have also run across this bug. The issue seems to arise b/c the underlying Popover / RenderToLayer elements interpret a click on the AutoComplete's TextField as a click away from from the Popover.
AutoComplete#close is passed as Popover#onRequestClose handler:
https://github.com/callemall/material-ui/blob/master/src/auto-complete.jsx#L529
Popover#onRequestClose is called whenever RenderToLayer#componentClickAway is called:
https://github.com/callemall/material-ui/blob/master/src/popover/popover.jsx#L224
https://github.com/callemall/material-ui/blob/master/src/popover/popover.jsx#L392
I've so far "fixed" this locally by adding a condition within the onRequestClose handler passed from AutoComplete to Popover. The handler ensures TextField is not in focus before calling close(). Is this a correct assumption / constraint to place on closing the Popover? If so I can put a PR together if you'd like.


param_at_point fails for CenterArc

ca = CenterArc((0,0),fruit_picker_adjustable_connector_radius,-200,220)
for i in range(0,101):
	param_expected = i/100
	param_calculated = ca.param_at_point(ca@param_expected)
	print ("Expected: " + str(param_expected)  + ", Calculated: " + str(param_calculated))

Output:
Expected: 0.01, Calculated: -0.01571428571428564
Expected: 0.02, Calculated: -0.031428571428571465
Expected: 0.03, Calculated: -0.047142857142857104
Expected: 0.04, Calculated: -0.06285714285714275
Expected: 0.05, Calculated: -0.07857142857142856
Expected: 0.06, Calculated: -0.09428571428571421
Expected: 0.07, Calculated: -0.11000000000000001
Expected: 0.08, Calculated: -0.12571428571428567
Expected: 0.09, Calculated: -0.14142857142857132
Expected: 0.1, Calculated: -0.1571428571428571
Expected: 0.11, Calculated: -0.17285714285714276
Expected: 0.12, Calculated: -0.18857142857142842
Expected: 0.13, Calculated: -0.20428571428571424
Expected: 0.14, Calculated: -0.2199999999999999
Expected: 0.15, Calculated: -0.2357142857142857
Expected: 0.16, Calculated: -0.25142857142857133
Expected: 0.17, Calculated: -0.26714285714285696
Expected: 0.18, Calculated: -0.28285714285714264
Expected: 0.19, Calculated: -0.29857142857142843
Expected: 0.2, Calculated: -0.31428571428571406
Expected: 0.21, Calculated: -0.3299999999999999
Expected: 0.22, Calculated: -0.34571428571428536
Expected: 0.23, Calculated: -0.3614285714285712
Expected: 0.24, Calculated: -0.377142857142857
Expected: 0.25, Calculated: -0.3928571428571426
Expected: 0.26, Calculated: -0.4085714285714283
Expected: 0.27, Calculated: -0.4242857142857141
Expected: 0.28, Calculated: -0.4399999999999998
Expected: 0.29, Calculated: -0.4557142857142854
Expected: 0.3, Calculated: -0.4714285714285712
Expected: 0.31, Calculated: -0.48714285714285704
Expected: 0.32, Calculated: -0.5028571428571424
Expected: 0.33, Calculated: -0.5185714285714284
Expected: 0.34, Calculated: -0.5342857142857138
Expected: 0.35, Calculated: -0.5499999999999999
Expected: 0.36, Calculated: -0.5657142857142854
Expected: 0.37, Calculated: -0.5814285714285709
Expected: 0.38, Calculated: -0.5971428571428562
Expected: 0.39, Calculated: -0.6128571428571425
Expected: 0.4, Calculated: -0.6285714285714283
Expected: 0.41, Calculated: -0.6442857142857138
Expected: 0.42, Calculated: -0.6599999999999996
Expected: 0.43, Calculated: -0.6757142857142855
Expected: 0.44, Calculated: -0.6914285714285713
Expected: 0.45, Calculated: -0.7071428571428567
Expected: 0.46, Calculated: -0.7228571428571425
Expected: 0.47, Calculated: -0.738571428571428
Expected: 0.48, Calculated: -0.7542857142857138
Expected: 0.49, Calculated: -0.7699999999999997
Expected: 0.5, Calculated: -0.7857142857142855
Expected: 0.51, Calculated: -0.8014285714285709
Expected: 0.52, Calculated: -0.8171428571428568
Expected: 0.53, Calculated: -0.8328571428571426
Expected: 0.54, Calculated: -0.8485714285714281
Expected: 0.55, Calculated: -0.8642857142857142
Expected: 0.56, Calculated: -0.8799999999999997
Expected: 0.57, Calculated: -0.8957142857142851
Expected: 0.58, Calculated: -0.9114285714285706
Expected: 0.59, Calculated: -0.9271428571428568
Expected: 0.6, Calculated: -0.9428571428571423
Expected: 0.61, Calculated: -0.9585714285714281
Expected: 0.62, Calculated: -0.9742857142857139
Expected: 0.63, Calculated: -0.9899999999999993
Expected: 0.64, Calculated: -1.0057142857142851
Expected: 0.65, Calculated: -1.021428571428571
Expected: 0.66, Calculated: -1.037142857142857
Expected: 0.67, Calculated: -1.0528571428571427
Expected: 0.68, Calculated: -1.068571428571428
Expected: 0.69, Calculated: -1.0842857142857136
Expected: 0.7, Calculated: -1.0999999999999996
Expected: 0.71, Calculated: -1.1157142857142852
Expected: 0.72, Calculated: -1.1314285714285706
Expected: 0.73, Calculated: -1.1471428571428568
Expected: 0.74, Calculated: -1.1628571428571426
Expected: 0.75, Calculated: -1.1785714285714282
Expected: 0.76, Calculated: -1.1942857142857135
Expected: 0.77, Calculated: -1.2099999999999995
Expected: 0.78, Calculated: -1.2257142857142853
Expected: 0.79, Calculated: -1.241428571428571
Expected: 0.8, Calculated: -1.2571428571428565
Expected: 0.81, Calculated: -1.272857142857142
Expected: 0.82, Calculated: -1.2885714285714278
Expected: 0.83, Calculated: -1.3042857142857136
Expected: 0.84, Calculated: -1.3199999999999996
Expected: 0.85, Calculated: -1.335714285714285
Expected: 0.86, Calculated: -1.3514285714285708
Expected: 0.87, Calculated: -1.367142857142856
Expected: 0.88, Calculated: -1.3828571428571423
Expected: 0.89, Calculated: -1.3985714285714281
Expected: 0.9, Calculated: -1.4142857142857137
Expected: 0.91, Calculated: 1.1414285714285712
Expected: 0.92, Calculated: 1.125714285714286
Expected: 0.93, Calculated: 1.1099999999999997
Expected: 0.94, Calculated: 1.0942857142857145
Expected: 0.95, Calculated: 1.0785714285714287
Expected: 0.96, Calculated: 1.062857142857143
Expected: 0.97, Calculated: 1.0471428571428572
Expected: 0.98, Calculated: 1.0314285714285716
Expected: 0.99, Calculated: 1.0157142857142858
Expected: 1.0, Calculated: 1.0

If I change code in the Edge.param_at_point function from:
        if self.is_closed:
            u_value = (param_value - param_min) / (self.param_at(1) - self.param_at(0))
        else:
            param_max = _project_point_on_curve(curve, self.position_at(1).to_pnt())
            u_value = (param_value - param_min) / (param_max - param_min)

to
        u_value = (param_value - param_min) / (self.param_at(1) - self.param_at(0))

The results are more in line for the range 0 to .9 but not good for params greater than 0.9. I am not familiar with OCCT and don't fully understand what the function is trying to do so I can't be be of more help.

I think it is a duplicate of #570.  The problem is with the "parameters" of the curve (a layer of object below an Edge) not starting / ending at 0, 1.  Here is an improvement:
fruit_picker_adjustable_connector_radius = 1
ca = CenterArc((0, 0), fruit_picker_adjustable_connector_radius, -200, 220)

# Extract the Geom_Curve from the Shape
ca_edge = ca.edge()
first: float = ca_edge.param_at(0)
last: float = ca_edge.param_at(1)
ca_curve = BRep_Tool.Curve_s(ca_edge.wrapped, first, last)

for i in range(0, 11):
    param_expected = i / 10
    # Step 2: Project the point onto the curve
    projector = GeomAPI_ProjectPointOnCurve(
        (ca_edge @ param_expected).to_pnt(), ca_curve
    )
    projectedPoint = projector.NearestPoint()
    parameter = projector.LowerDistanceParameter()
    param_calculated = (parameter - first) / (last - first)
    print(f"{param_expected=:0.3f}, {param_calculated=:0.3f}")

param_expected=0.000, param_calculated=0.000
param_expected=0.100, param_calculated=0.100
param_expected=0.200, param_calculated=0.200
param_expected=0.300, param_calculated=0.300
param_expected=0.400, param_calculated=0.400
param_expected=0.500, param_calculated=0.500
param_expected=0.600, param_calculated=0.600
param_expected=0.700, param_calculated=0.700
param_expected=0.800, param_calculated=0.800
param_expected=0.900, param_calculated=0.900
param_expected=1.000, param_calculated=-0.636

Note how the values are correct now - except for the last one.  More work needs to be done here.
P.S. Note how I've used f-strings here to simplify the print statement.


AbstractMongoEventListener BeforeConvertEvent not getting called

Hi, I am shifting from Mongobee to Mongock because of mongobee issue#87
I am using following version for my spring boot application:
compile('com.github.cloudyrock.mongock:mongock-spring:3.2.4')
I had created a sequence generator in my application whose purpose was to save the _id as a numerical value which was done through onBeforeConvert() method event extended from AbstractMongoEventListener abstract class defined in mongodb.core.mapping.event package. So I used to bulk add static data through changesets using MongoTemplate with just passing the content of the data without caring for setting the _id as it was handled by sequence generator.
@ChangeSet(author = "zambardus",id="pin_code_seeder",order="001")
   public void populatePinCode(MongoTemplate mongoTemplate)
   {
        List<PinCodeModel> pinCodes = fetchPinCodes();// which reads pincodes from a json file and convert to PinCodeModel object
        mongoTemplate.insertAll(pinCodes);
   }

This was working fine with Mongobee but when I shifted to Mongock, the onBeforeConvert() method doesn't get called and hence I get the below error as it tries to save by default value of 0 for id:
Caused by: com.mongodb.MongoBulkWriteException: Bulk write operation error on server localhost:27017. Write errors: [BulkWriteError{index=0, code=11000, message='E11000 duplicate key error collection: db.pinCode index: _id_ dup key: { _id: 0 }', details={}}].
	at com.mongodb.connection.BulkWriteBatchCombiner.getError(BulkWriteBatchCombiner.java:173) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.connection.BulkWriteBatchCombiner.throwOnError(BulkWriteBatchCombiner.java:202) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.connection.BulkWriteBatchCombiner.getResult(BulkWriteBatchCombiner.java:143) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.BulkWriteBatch.getResult(BulkWriteBatch.java:227) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.MixedBulkWriteOperation.executeBulkWriteBatch(MixedBulkWriteOperation.java:282) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.MixedBulkWriteOperation.access$700(MixedBulkWriteOperation.java:72) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.MixedBulkWriteOperation$1.call(MixedBulkWriteOperation.java:205) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.MixedBulkWriteOperation$1.call(MixedBulkWriteOperation.java:196) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.OperationHelper.withReleasableConnection(OperationHelper.java:501) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:196) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.operation.MixedBulkWriteOperation.execute(MixedBulkWriteOperation.java:71) ~[mongodb-driver-core-3.11.2.jar:na]
	at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:206) ~[mongodb-driver-3.11.2.jar:na]
	at com.mongodb.client.internal.MongoCollectionImpl.executeInsertMany(MongoCollectionImpl.java:524) ~[mongodb-driver-3.11.2.jar:na]
	at com.mongodb.client.internal.MongoCollectionImpl.insertMany(MongoCollectionImpl.java:508) ~[mongodb-driver-3.11.2.jar:na]
	at com.mongodb.client.internal.MongoCollectionImpl.insertMany(MongoCollectionImpl.java:503) ~[mongodb-driver-3.11.2.jar:na]
	at com.github.cloudyrock.mongock.decorator.MongoCollectionDecorator.lambda$insertMany$17(MongoCollectionDecorator.java:168) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.util.MethodInvokerImpl.invoke(MethodInvokerImpl.java:24) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.MongoCollectionDecorator.insertMany(MongoCollectionDecorator.java:168) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.MongoCollectionDecorator.lambda$insertMany$17(MongoCollectionDecorator.java:168) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.util.MethodInvokerImpl.invoke(MethodInvokerImpl.java:24) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.MongoCollectionDecorator.insertMany(MongoCollectionDecorator.java:168) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.MongoCollectionDecorator.lambda$insertMany$17(MongoCollectionDecorator.java:168) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.util.MethodInvokerImpl.invoke(MethodInvokerImpl.java:24) ~[mongock-core-3.2.4.jar:na]
	at com.github.cloudyrock.mongock.decorator.MongoCollectionDecorator.insertMany(MongoCollectionDecorator.java:168) ~[mongock-core-3.2.4.jar:na]
	at org.springframework.data.mongodb.core.MongoTemplate.lambda$insertDocumentList$17(MongoTemplate.java:1526) ~[spring-data-mongodb-2.2.3.RELEASE.jar:2.2.3.RELEASE]
	at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:585) ~[spring-data-mongodb-2.2.3.RELEASE.jar:2.2.3.RELEASE]
	... 38 common frames omitted

Hello @zambardus,
we'll be looking at this today and will come back to you either this evening or tomorrow morning(UK time).
Cheers

meanwhile can you provide all the information you can, like spring version, mongoDB, etc.
Cheers

and also the way you are building Mongock object, that's quite important

Springboot version: 2.2.2.RELEASE
Mongo DB version: 4.2.3
Mongock object initiation:
@Configuration
public class MongockConfig {

    @Value("${spring.data.mongodb.database}")
    private String database;

    @Value("${spring.data.mongodb.uri}")
    private String mongoUri;

    @Bean
    public SpringBootMongock mongock(ApplicationContext springContext) {
        MongoClient mongoClient = new MongoClient(new MongoClientURI(mongoUri));
        return new SpringBootMongockBuilder(mongoClient, database, "com.changelog.path")
                .setApplicationContext(springContext)
                .setLockQuickConfig()
                .build();
    }

Ok, can you try by using MongoTemplate instead of mongoClient, as you can see below?
@Bean     public SpringBootMongock mongock(ApplicationContext springContext, MongoTemplatemongotemplate) {         return new SpringBootMongockBuilder(mongotemplate,ClientChangeLog.class.getPackage().getName())                 .setApplicationContext(springContext)                 . setLockQuickConfig()                 .build();     }

You are correct in pointing out to declare mongoTemplate, as I read it here

Declare MongoTemplate inside an ApplicationContext to enable the publishing of all persistence events such as AfterLoadEvent, AfterSaveEvent, etc.

But it didn't help as I am still getting the same error. Also, it takes <IP_ADDRESS>:27017 as the mongo url since I didn't mention mongo client's url

Hi @zambardus ,
I am missing something here. You are saying that MongoTemplate is taking <IP_ADDRESS>:27017?
If that is right, the problem is that you are no configuring MongoTemplate correctly. You probably need to add your mongoDB configuration properties, like url and port, in your spring property file and then, you MongoTemplate will take and then you can inject it to Mongock.

Hey, that has been configured. But still the issue persists.

can you send me an email with the code for the Mongock generation and that new error trace as<EMAIL_ADDRESS>please?

Hi @zambardus,
I have been digging into this. It's not a bug. The method onBeforeConvert on AbstractMongoEventListener is called when using a Repository, no when using MongoTemplate.
As you can read in Mongock's documentation, you are free to use Repositories in your changelogs by just declaring the bean and add it in the Change set method signature. However, currently repository actions are not covered by the lock. This is planned in our roadmap as one of the priorities, but not yet implemented. If you are running this in a microservice or clustered environment, I don't recommend hitting the databases without a lock.

Working fine with MongoRepository. Thanks for the support and advice for using locks with repository.


Datastore says createdAt & updatedAt is undefined

Describe the bug
A clear and concise description of what the bug is.
My schema is
type Post @model {
  id: ID!
  name: String!
  createdAt: String
  updatedAt: String
}

As per my schema both createdAt and updatedAt are string | undefined.
But when I save it
const results = await DataStore.save( new Post({ name }) )
then I get following error.
"Field createdAt should be of type string, undefined received. undefined"
"Field updatedAt should be of type string, undefined received. undefined"
Amplify CLI Version
4.18.0
Expected behavior
I want to add value created from the server. I don't want to define values.
Desktop:

OS: Ubuntu 18.04 on Windows WSL 2
Node Version. 12.16.2

Additional context
if I had to add createdAt or updatedAt then is the following code acceptable??
createdAt: (new Date()).toISOString()
I need them just for sorting purposes only.

I believe this may because you have not enabled DataStore for your API. I had some similar issues.
Run amplify update api and there should be an option to enable DataStore, and then run amplify push -- your queries and such should be updated and the values should be created by the backend.

@saevarb I have enabled it and it doesn't work. Are you aware that amplify resolvers automatically add owner, createdAt & updatedAt field. But if you define them in your schema then you cannot leave it empty while submitting & hoping that amplify resolvers will fill in the details. This is across API & Datastore.

In recent update of @aws-amplify/datestore from 2.0.7 to 2.0.8 the issue has fixed itself.


Search for WKWebView version

Could you please provide me a WKwebView version project,cause UIWebView version have some odd bugs and high-memory problem.
Thank you so much!

Depends on what WKWebView plugin you want to use.
For cordova-plugin-wkwebview-engine just add it to your project and it should be fine:
cordova plugin add cordova-hot-code-push-plugin
cordova plugin add cordova-plugin-wkwebview-engine

For Teleriks WKWebView you need to use a telerik-wkwebview-fix branch of hot code push plugin:
cordova plugin add https://github.com/nordnet/cordova-hot-code-push.git#telerik-wkwebview-fix
cordova plugin add cordova-plugin-wkwebview

Now I'm using WKWebview Version and found another problem.It can't loadRequesta local path like file:///Users/admin/Library/............. My simulator just turned out nothing.But UIwebView version cordova works.Could you please give me several tips.Thank you!

Can you give me some step-by-step guide on how to reproduce your issue?

You are most probably using Apache's version of WKWebview. Remove it and use the following instead and your problem should be resolved:
https://github.com/driftyco/cordova-plugin-wkwebview-engine


[3.0] Initial implementation of a system wide certificates.

The implementation follows the registry & registry mirror style and
adds a simple (name, certificate) model.
Backport of #504

@jordimassaguerpla I added the bnc# to the first commit of the PR on the summary line to make it prominent as well.

 [P1] Bug 1090067 - Providing self-signed CA for CaaSP


Demo not working on Angular 5

The demo on this website is not working on Angular 5 and throws this error when an item is selected.
ERROR TypeError: Cannot read property 'length' of undefined
at AngularMultiSelect.onItemClick (multiselect.component.js:99)
at Object.eval [as handleEvent] (AngularMultiSelect.html:52)
at handleEvent (core.js:13543)
at callWithDebugContext (core.js:15052)
at Object.debugHandleEvent [as handleEvent] (core.js:14639)
at dispatchEvent (core.js:9958)
at eval (core.js:10583)
at HTMLLIElement.eval (platform-browser.js:2628)
at ZoneDelegate.invokeTask (zone.js:421)
at Object.onInvokeTask (core.js:4736)
The code is copy pasted from the basic demo. To me it looks like it can't bind selectedItems to the ngModel.

Silly me, didn't know that I need to import FormsModule. Sorry!


fix: ignore ALREADY_KNOWN gossip block error

Motivation

After v1.9.0, unknown block root maybe downloaded before gossip block comes:

Downloaded unknown block root=0xd6726e2f9ca882c728f81b4a6f7580327576c03d9bbd7051ec0a7868671743ca, pendingBlocks=1, parentInForkchoice=true
Received gossip block slot=5942197, root=0xd672…43ca, curentSlot=5942197, peerId=16Uiu2HAm2GTP413xneJPzKQa9C8M3JzTh18RUrVuKajjrQe1o468, delaySec=0.7290000915527344, recvToVal=0.02499985694885254

then node may show this error
Error receiving block slot=5942197, peer=16Uiu2HAm2GTP413xneJPzKQa9C8M3JzTh18RUrVuKajjrQe1o468 code=BLOCK_ERROR_ALREADY_KNOWN, root=0xd6726e2f9ca882c728f81b4a6f7580327576c03d9bbd7051ec0a7868671743ca

Description

Use ignoreIfKnown flag when processing gossip block

:tada: This PR is included in v1.9.1 :tada:

:tada: This PR is included in v1.10.0 :tada:


Substitutions Not working in CC'ed mail (Java, Send-Grid-2.0.0)

Issue Summary:-
I have been using manual templates of sendgrid to send mails. We too have substitutions in mail templates. I am setting {CC } in every mail but not getting substitutions there in CC'ed mails.
Steps to Reproduce
1.send mail to someone using sendgrid templates and add cc mail.
2.Don't forget to add substitutions.
3.You won't be able to see subtitution in cc'ed mails.
Technical details:
sendgrid-java Version: 2.0.0

Thanks for reporting this error @Jatinthakkar,
Do you mind sharing the relevant source code? I've seen this error happen when you create a new personalization object instead of adding to the one created for you when you use the constructor: https://github.com/sendgrid/sendgrid-nodejs/blob/master/examples/helpers/mail/example.js#L10
Thanks!

Hi @Jatinthakkar,
If you are still having trouble, please feel free to re-open this issue.

           email.addCc(ccDataArray);

           String arr[];
	arr = new String[1];
	arr[0] = comments;

	String arr2[];
	arr2 = new String[1];
	arr2[0] = replyLink;

	email.addSubstitution("-auditorComments-", arr);
	email.addSubstitution("-replyLink-", arr2);

This is the code snipett. The issue is that auditor comments and reportLink, values get substituted in the mail which is being sent to email.to(sender), but they do not get substituted in email.addCc(ccDataArray).
Thanks!

Hello @Jatinthakkar,
Thanks for the update, I have added this to our backlog for review.

Hi @Jatinthakkar,
The Java library is now at v3.2.1. Could you please check it out and let us know if you are still having issues? You can find it here: https://github.com/sendgrid/sendgrid-java
Thanks!
Elmer


Sharing session context / Repository pattern

Hi,
For my project we heavily use the repository pattern to abstract database queries. These repositories use the session to connect to the database, and are usually injected into the handlers.
The easiest solution to make sure the repositories use the correct session is to create them within the context of the request. So something like this.
    def get(self, testId):
        with self.make_session() as session:
            self.repository = TestRepository(session)

However, I think it would be a better separation of concerns if the handlers aren't tasked with object creation themselves. In order to do this it would be necessary to somehow share the current context between the handlers and other objects (e.g. the repository). I think this might be possible using e.g. Tornado's stack context (see Context local for an examle).
What are your thoughts on this?

How would the implementation look like? I haven't used StackContext in the past so I'm not too familiar with it. But would it be that you initialize a context before get is called and then tear it down after the request is handled? Or some other way?

What about creating a session for each request in the tornado.web.RequestHandler.initialize and tearing it down in tornado.web.RequestHandler.finish? This way the session would just be available for each handler and would be torn down when the request finishes. I guess you could then also initialize the repository independent of the actual handler functions. raven-python seems to handle something like that this way.

Not completely sure yet what the StackContext implementation would look like. Kind of figuring it out right now, just wanted to see if you had any thoughts.

I did consider the  tying it to the request handler. But I think the async will also often be used in the context of websockets (it's definitely the case with my project anyway). In that situation it might not really make sense to connect it to a specific connection. Per message might be more logical. However it probably differs per use case. That's why I liked the context manager. It's most flexible from a developer perspective.

Hmm, I haven't used stack context in the past. I understand what they are, but I'm having a hard time visualizing how it would be used here. So please feel free to propose a solution - I'm open.
Good point. A context manager for this would be great.

Quick update. I've just added a self.session property in the latest version of SessionMixin. Accessing this property from your request handlers will lazily construct and return a new session. This hooks into tornado's on_finish entry point to commit and close the session when done. No session is created if you don't access this property (which should take care of the websocket issue you mentioned). Hope this helps!

Cool stuff! I'll see if I can find some time somewhere this week to update :)

@bouke-nederstigt I'm closing this issue. Please feel free to reopen if there are still open questions.

I have some callbacks in my tornado app which are not triggered from request handlers that need the session, as far as I understand tornado-sqlalchemy uses the request handler events (eg. on_finish to scope the session. Is there any way to use the session/SessionMixin in a safe way when not in a request handler?
Eg.
class MyClass(SessionMixin):
    def my_callback(self, obj_to_save):
        with self.make_session() as session:
            ...

You could of course use the make_session context manager which automatically closes the session when it's done. But at the moment there isn't anything specific for this use case, other than performing session handling yourself in your callback function. Are you scheduling the callbacks via the IOLoop?

I use an external async lib which relies heavily on callbacks for some operations. I tried using the make_session context manager directly from my callback similar to my example above, but gets the following error:
"venv/lib/python3.6/site-packages/tornado_sqlalchemy/init.py", line 150, in _make_session
factory = self.application.settings.get('session_factory')
AttributeError: 'MyOrderCallback' object has no attribute 'application'
Do I need to supply the tornado app when creating my callback class or is there some more elegant way of making it work? Thanks a lot for your help and excellent work with this lib!


cmd/compile: self-contradictory error message when separating the definition and implementation of an interface with anonymous structs in a method signature

What version of Go are you using (go version)?

$ go version
go version go1.19 linux/amd64

Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/guamoko95/.cache/go-build"
GOENV="/home/guamoko95/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/guamoko95/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/guamoko95/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/guamoko95/go/src/play/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3021280297=/tmp/go-build -gno-record-gcc-switches"

What did you do?
package main

import "play/implementation"

// interface declaration with anonymous non-empty structure in signature

type AnonNonEmptyStructGeter interface {
	AnonNonEmptyStructGet() struct{ string }
}

func main() {
	var w AnonNonEmptyStructGeter
	w = implementation.ImpAnonNonEmptyStructGeter{}
}

play/implementation:
package implementation

// interface implementation with anonymous non-empty struct in signature
type ImpAnonNonEmptyStructGeter struct{}

func (ImpAnonNonEmptyStructGeter) AnonNonEmptyStructGet() struct{ string } {
	return struct{ string }{""}
}

What did you expect to see?
successful compilation or compilation error message indicating a problem. For example: "anonymous types in different packages"
What did you see instead?
self-contradictory error message:
# command-line-arguments
./main.go:13:6: cannot use implementation.WithMetodWithAnonStruct{} (value of type implementation.WithMetodWithAnonStruct)
as type WithAnonNonEmptyStructer in assignment:
        implementation.WithMetodWithAnonStruct does not implement WithAnonNonEmptyStructer (wrong type for WithAnonStruct method)
                have WithAnonStruct() struct{string}
                want WithAnonStruct() struct{string}

CC @golang/compiler.

struct{string} denotes different types when it appears in different packages. So failing to type check is the correct behavior here.
Agreed the error message is unfortunate for not being able to disambiguate that though.
/cc @griesemer @findleyr

Ack, this is unfortunate and confusing. It would be good to clarify that the identity of the string field does not match here.
I am not sure how high a priority this is, but we do want to continue to improve error messages in the new type checker. (I have not yet checked whether the old type checker produced a better message here).

@findleyr As part of triage assigning to you for now, but please feel free to unassign! Noted the low-ish priority.

The new type checker is annoying in its parsimony; structs, which can have packages as part of their identity, don't know their own packages.  The old type checker was similarly confusing.
I have a maybe fix, subject to passing tests.  I'm not proud of it....

structs, which can have packages as part of their identity, don't know their own packages

Named structs you can find their package with Named.Obj().Pkg().
Non-empty structs you can find their package with Field(0).Pkg(). (A struct definition can't span multiple packages, so all of its fields must exist in the same package.)
The anonymous, empty struct is identical in all packages.

The new type checker is annoying in its parsimony; structs, which can have packages as part of their identity, don't know their own packages.

Struct fields are objects, which have access to their package.

To expand: this rule is implemented in types.identical, the call to sameId for struct fields.
To implement this, we'd probably need to pass a reason *string argument into types.identical, similarly to what we do for other predicates. (aside, per the discovery in #54172, we should avoid building this reason if it won't be used).

Simplified reducer, for use as test case, and for the benefit of other readers:
// file a.go
package a

type S struct{}

func (S) M() (_ struct{ f string }) {
	return
}

package b

import "./a"

type I interface {
	M() (_ struct{ f string })
}

var _ I = a.S{}

Similar to the original, the error message is:
b.go:9:11: cannot use a.S{} (value of type a.S) as type I in variable declaration:
	a.S does not implement I (wrong type for M method)
		have M() (_ struct{f string})
		want M() (_ struct{f string})

The code compiles if the field f is exported (capitalized) in both files. The "field name" for an embedded type (string in the original code) is the type name (string), which happens to be lower-case and thus not exported. Not exported names from different packages are always different.
As stated before, the compiler is correct to reject this code.


Help Revisions for SAM 2023.12.17 Revision 2

PV uncertainty check boxes for enabling sources.
Fix IBI and CBI depreciation basis reduction descriptions.
Revise descriptions of depreciation basis: Installed cost plus financing costs.
Refine bifacial losses and spatial albedo.
Document system availability and AC losses for PV+Battery affect dispatch, but for generic system and battwatts do not.
Sort out "levelized" output variables. Note that LCOG for return on equity may cause confusion given new LCOS.
Tower and Receiver design values: Runs model at design point with made-up flux map (sine wave) trying to get at receiver thermal power with some assumption of irregular flux. Also update Help.
MSPT receiver page revisions.
Revise IEC 61853 topic to explain temperature, spectral, and optical models.
Add note for CEC model to explain air mass model.
Revise PV tracking option descriptions to clarify how tilt and azimuth inputs work for different options.
Improve descriptions of PV output variables for irradiance.
Fix "with out" typo in Indifference Point topic.
Marine Energy refer to DOE RMP per https://github.com/NREL/SAM/issues/1679
Electricity rates net energy metering with $ credits true up period not optional.
Revised wind losses descriptions for clarity.
Fix retail price dispatch expandable section.
Pull Request Template
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
[ ] This change modifies variables in existing compute modules. Please see Checking for PySAM Incompatible API Changes.

Checklist:
If you have added a new compute module in a SSC pull request related to this one, be sure to check the Process Requirements.

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[ ] I have checked my code and corrected any misspellings

I think this line in the incentives page is incorrect:

If one adds a 30% IBI to the PVWatts-commercial default costs, the ITC (correctly) remains at $284,459.03.
I don't see any lines in cashloan.cpp that differentiate residential vs commercial for ITC basis: https://github.com/NREL/ssc/blob/724d05aefd7267c66ba8d926bebd8805201ff797/ssc/cmod_cashloan.cpp#L682
I recommend updating the text to "For the residential and commercial models, SAM applies the ITC percentage to the total installed cost"

Possible typo on the incentives page. This section is talking about CBI, then switches to IBI. Is this intentional?

Other than my previous two comments, this looks good. Thanks for updating!

With apologies for my initial review not being sufficiently thorough, there are still a few references to "net capital cost" that are no longer correct.
ITC percentage description:

Depreciation page's ITC allocation text:

Did we have an alternative phrase that we can substitute in here? "Unallocated basis"?


Cockos.REAPER 6.50 and 6.51

[x] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?

[x] Does your manifest conform to the 1.0 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Is it really that problematic to have two package versions in one pr?

I will file seprate prs.


New version: evilmartians.lefthook version 1.8.3

Pull request has been created with WinGet Releaser v2 :rocket:
Microsoft Reviewers: Open in CodeFlow

@wingetbot run

@wingetbot run


Add Bootjdk11 (for jdk12) to Ansible playbooks and run/install on all build machines

Do we have a flag so we can choose whether to install hs vs openj9?
Do we have flag(s) so we only install bootjdks on build machines and not test machines?
Platforms:

[ ] Linux x64
[ ] Linux ppc64le
[ ] Linux s390x
[ ] Windows
[ ] Mac
[ ] Arm/Aarch?
[ ] AIX

Is this finished for all platforms?

I didn't catch the comment in the description of #606.  This isn't complete no.

Completed AFAIK (since we've shipped two releases of JDK12 now!) If anyone knows otherwise feel free to re-open


Improve error handling in Service Explorer

We should verify the different types of error messages and status codes we get while using Service Explorer, and improve error handling accordingly.

We started tracking this enhancement by functionality. This is a work in progress and new issues will be tracked by feature.


Screen reader users may not know about the dropdowns if the JAWS doesn't announce it to the user

Issue: Screen reader users may not know about the dropdowns if the JAWS doesn't announce them to the user
Responsible Service: https://select2.org/appearance
Actual Result:
JAWS is not announcing the dropdown options
Expected Result:
JAWS should announce the dropdown options
User Impact:
Screen reader users may not know about the dropdowns if the JAWS doesn't announce it to the user

This is already tracked here: https://github.com/select2/select2/issues/3744

I'm going to keep this open since the one linked is a multi-ticket (covers a wide variety of issues through the years) and this one is a bit more focused on the specific issue with labels.


Client is crashing while exploring end, server not.

More Weaponry v1.18+1.18.2
fabric: Fabric API 0.48.0+1.18.2
https://bytebin.lucko.me/CNCBKIJVRq
Just ask if you need more information! :)

I've uploaded the new updated file to curseforge, hopefully, they approve it soon
(The first time they had rejected it for an unknown reason, but it's currently under review)


Update Stride to v12.1.0

The upgrade is planned for block 4616678.
More information:

https://www.mintscan.io/stride/proposals/208
https://www.mintscan.io/stride/blocks/4616678

Pre-release image: ghcr.io/akash-network/cosmos-omnibus:v0.3.42-rc1-stride-v12.1.0


fix: Populate OpenTelemetry compression parameter

This is to remove a persistent WARNING level logline in the Cloud Logging output for GKE deployment.

/gcbrun


Time caching in ExecCtx can cause indefinite busy loops due to time skew between threads

The is a spinoff from internal issue b/185205431. See https://b.corp.google.com/issues/185205431#comment16 and surrounding bug for context.
Time caching in the ExecCtx appears to be highly error prone, especially on single-core VM's, because of the potential to get into indefinite busy-loops caused by some thread's view of the time drifting far away from the timer thread's view of the time. A thread who's ExecCtx::Now() has gotten stale compared to the timer manager thread(s) ExecCtx::Now() can get into a loop where it keeps initializing a timer (with grpc_timer_init), which is supposed to go off in some significant amount of time, but instead fires immediately (because the timer thread's ExecCtx::Now() is so far ahead from the thread that the absolute timeout was calculated on), with the callback scheduled by the timer thread enqueuing a callback back onto the same WorkSerializer that is still-held by the thread that originally called grpc_timer_init. This process can continue to happen in an indefinite tight loop, with the spinning thread's ExecCtx::Now() never getting invalidated and so only getting further and further behind from where it should be. With current ExecCtx::Now() and grpc_timer_init behavior, we need to be very careful about remembering to use ExecCtx::InvalidateNow in order to avoid this.
The issue seems potentially present in roughly any periodic timer events in the code base that:
a) reschedule themselves (directly or indirectly)
b) use a WorkSerializer (a combiner may have the same issue though)
The issue is exemplified by the following test, which will busy-loop forever as of commit 8777697c68971a00350e264c175d4adf529d7261
/*
 *
 * Copyright 2020 gRPC authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#include <grpc/support/port_platform.h>

#include <stdlib.h>
#include <string.h>

#include <functional>
#include <memory>

#include <gmock/gmock.h>

#include <grpc/grpc.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include <grpc/support/time.h>

#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/iomgr/work_serializer.h"

#include "test/core/util/test_config.h"

namespace {

gpr_timespec g_test_start_time;

class WorkSerializedTimerLoop {
 public:
  WorkSerializedTimerLoop() {
    GRPC_CLOSURE_INIT(&on_schedule_timer_, OnScheduleTimer, this,
                      grpc_schedule_on_exec_ctx);
  }

  void Start() {
    grpc_core::ExecCtx::Run(DEBUG_LOCATION, &on_schedule_timer_,
                            GRPC_ERROR_NONE);
  }

  void Shutdown() {
    grpc_core::MutexLock lock(&mu_);
    shutdown_ = true;
    grpc_timer_cancel(&schedule_timer_alarm_);
  }

 private:
  static void OnScheduleTimer(void* arg, grpc_error* error) {
    WorkSerializedTimerLoop* self = static_cast<WorkSerializedTimerLoop*>(arg);
    GRPC_ERROR_REF(error);
    self->work_serializer_->Run(
        [self, error] {
          std::unique_ptr<WorkSerializedTimerLoop> self_deleter(self);
          grpc_core::MutexLock lock(&self->mu_);
          // abort if this timer loop has been spinning for 5 minutes
          if (gpr_time_cmp(
                  gpr_now(GPR_CLOCK_MONOTONIC),
                  gpr_time_add(g_test_start_time,
                               gpr_time_from_seconds(30, GPR_TIMESPAN))) > 0) {
            gpr_log(GPR_ERROR,
                    "test timer loop has been spinning for more than 5 "
                    "minutes, this indicates a busy-loop bug");
            GPR_ASSERT(0);
          }
          if (error != GRPC_ERROR_NONE || self->shutdown_) {
            GRPC_ERROR_UNREF(error);
            gpr_log(GPR_INFO,
                    "test timer loop quitting, shutdown_:%d, error: %s",
                    self->shutdown_, grpc_error_string(error));
            delete self;
            return;
          }
          // Schedule a timer to go off in 500 milliseconds. Note that this is
          // explicitly less than the 1 second of delay that was inserted at the
          // beginning of the test. The goal is to try to repro a bug related to
          // time caching where such delay will cause the 500ms timer to fire
          // immediately.
          grpc_millis timeout = grpc_core::ExecCtx::Get()->Now() + 500;
          // Note that we explicitly do not call ExecCtx::InvalidateNow(). This
          // test is meant to display an example of real scenarios in the code
          // base that do not call InvalidateNow when scheduling such periodic
          // timer events.
          gpr_log(GPR_INFO,
                  "scheduled a timer to go off in 500 ms. "
                  "ExecCtx::Get()->Now(): %ld",
                  grpc_core::ExecCtx::Get()->Now());
          grpc_timer_init(&self->schedule_timer_alarm_, timeout,
                          &self->on_schedule_timer_);
          // Sleep for 1 ms to simulate some arbitrary delay that gives time for
          // the timer thread to invoke the timer callback we just scheduled,
          // pushing this lambda back onto the work serializer queue that we're
          // currently holding. If things are correct, then the 500 ms timer
          // just scheduled should very rarely fire before this sleep ends, and
          // thus the timer thread should very rarely have enough time to do
          // that.
          gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
                                       gpr_time_from_millis(1, GPR_TIMESPAN)));
          gpr_log(
              GPR_INFO,
              "thread calling grpc_timer_init just woke up from 1 ms sleep");
          GRPC_ERROR_UNREF(error);
          self_deleter.release();
        },
        DEBUG_LOCATION);
    gpr_log(GPR_INFO,
            "just appended timer-scheduling callback to work serializer");
  }

  std::shared_ptr<grpc_core::WorkSerializer> work_serializer_ =
      std::make_shared<grpc_core::WorkSerializer>();
  grpc_closure on_schedule_timer_;
  grpc_timer schedule_timer_alarm_;
  grpc_core::Mutex mu_;
  bool shutdown_ = false;
};

TEST(TimerInitBusyLoopTest,
     TestBusyLoopDoesNotHappenWithPeriodicTimerEventsOnAWorkSerializer) {
  WorkSerializedTimerLoop* work_serialized_timer_loop =
      new WorkSerializedTimerLoop();
  {
    grpc_core::ExecCtx exec_ctx;
    g_test_start_time = gpr_now(GPR_CLOCK_MONOTONIC);
    // Explicitly invoke ExecCtx::Now(), in order to try to repro a bug related
    // to caching of the ExecCtx::now_ field.
    grpc_millis now = grpc_core::ExecCtx::Get()->Now();
    gpr_log(GPR_INFO,
            "begin timer loop after sleeping for 1 second, "
            "ExecCtx::Get()->Now(): %ld",
            now);
    // Add some initial delay to try cause skew between this thread's view of
    // the time and the timer manager thread's view of the time (which can
    // happen with if the time is cached in the ExecCtx). This simulates
    // arbitrary delay in real code which can cause such skew.
    gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
                                 gpr_time_from_seconds(1, GPR_TIMESPAN)));
    work_serialized_timer_loop->Start();
  }
  {
    grpc_core::ExecCtx exec_ctx;
    work_serialized_timer_loop->Shutdown();
  }
}

}  // namespace

int main(int argc, char** argv) {
  ::testing::InitGoogleTest(&argc, argv);
  grpc::testing::TestEnvironment env(argc, argv);
  grpc_init();
  auto result = RUN_ALL_TESTS();
  grpc_shutdown();
  return result;
}

A few possible solutions:

Getting rid of time caching in the ExecCtx entirely (possibly expensive)

Coming up with a new clock source to use in the timer system that may make 1) less expensive (as mentioned by @soheilhy )

Invalidating the ExecCtx  time cache from grpc_timer_init (this approach is taken in WIP https://github.com/grpc/grpc/pull/26064)c

cc @soheilhy @ctiller

Reopening since #26086 is more a workaround for this problem (didn't mean to close this). A more general fix is probably needed here, since the current situation is still error prone as mentioned.

I believe this is going to be fixed via the promise conversion.  As part of that, we will do time caching for each call individually within the promise, and we will not do any caching for control plane operations or timers.  The time cache within ExecCtx will go away completely.

Is this still a thing?

It's still a problem until we finish the migration to promises.


KubernetesClient Breaking Changes

KubernetesClient introduced breaking changes by switching from Json.NET to System.Text.Json. Meaning consumers of this library must target the older version of KubernetesClient. This pr fixes the breaking changes and allows consumers to target recent versions of KubernetesClient (with bug fixes).
Not many changes were required, mostly using the Deserialize extension method and deleting old code.
public static async Task<NodeMetricsList> GetKubernetesNodesMetricsAsync(this IKubernetes kubernetes)
{
    var customObject = (JsonElement)await kubernetes.CustomObjects.GetClusterCustomObjectAsync("metrics.k8s.io", "v1beta1", "nodes", string.Empty).ConfigureAwait(false);
    return customObject.Deserialize<NodeMetricsList>();
}

@buehler if you're okay with these changes and can publish a new package, I can update https://github.com/buehler/dotnet-operator-sdk to use the new package - I believe there are some DI changes that are needed.

Oh, there seems to be some errors in testing @Silvenga

Oops, I saw the KubernetesClientWithMockTest failure and I incorrectly though it was my local cluster acting odd.
I missed the attributes on EntityList, needed for the behavior changes in System.Text.Json.


Upgrade operator-sdk

This upgrades operator-sdk to v0.19.4 .
The upgrade path up to 0.19.x is generally straightforward, with the jump to 1.0.0+ requiring a source layout restructure and some other changes to how images are built and packaged, so I will attempt that separately. There is a recommendation to get up to 0.19.0 first before moving to 1.0.0, so that was my goal here.
There were a series of odd go.mod version conflicts, or "module doesn't contain package" compile errors, along the way, but what I have here seems to work. I don't know how important some of the pseudo-version replaces were from before, however.
I have tried testing this in CRC and it seems okay, although during make test my CRC instance keeps dying and restarting. I encounter this often however, so I don't think it has to do with this PR in particular, and manually testing it seems to turn up normal results.

I finally got CRC to survive a test round:
Ginkgo ran 4 suites in 11.893690167s
Test Suite Passed
operator-sdk scorecard
[Deprecation Notice] Operator SDK has a new CLI and project layout that is aligned with Kubebuilder.
See `operator-sdk init -h` and the following doc on how to scaffold a new project:
https://v0-19-x.sdk.operatorframework.io/docs/golang/quickstart/
To migrate existing projects to the new layout see:
https://sdk.operatorframework.io/docs/building-operators/golang/project_migration_guide/

INFO[0000] Using config file: /home/andrew/workspace/container-jfr-operator/.osdk-scorecard.yaml
I0202 14:07:29.099943  168669 request.go:621] Throttling request took 1.079311997s, request: GET:https://api.crc.testing:6443/apis/rhjmc.redhat.com/v1beta1?timeout=32s
I0202 14:11:22.373667  168669 request.go:621] Throttling request took 1.13239322s, request: GET:https://api.crc.testing:6443/apis/rhjmc.redhat.com/v1beta1?timeout=32s
basic:
	Spec Block Exists                   : pass
	CR: containerjfr
	Labels:
		"necessity":"required"
		"suite":"basic"
		"test":"checkspectest"

	Status Block Exists                 : pass
	CR: containerjfr
	Labels:
		"necessity":"required"
		"suite":"basic"
		"test":"checkstatustest"
	Suggestions:
		Add a 'status' field to your Custom Resource

	Writing into CRs has an effect      : pass
	CR: containerjfr
	Labels:
		"necessity":"required"
		"suite":"basic"
		"test":"writingintocrshaseffecttest"

	Spec Block Exists                   : pass
	CR: example-flightrecorder
	Labels:
		"test":"checkspectest"
		"necessity":"required"
		"suite":"basic"

	Status Block Exists                 : pass
	CR: example-flightrecorder
	Labels:
		"necessity":"required"
		"suite":"basic"
		"test":"checkstatustest"
	Suggestions:
		Add a 'status' field to your Custom Resource

	Writing into CRs has an effect      : pass
	CR: example-flightrecorder
	Labels:
		"necessity":"required"
		"suite":"basic"
		"test":"writingintocrshaseffecttest"

	Spec Block Exists                   : pass
	CR: example-recording
	Labels:
		"test":"checkspectest"
		"necessity":"required"
		"suite":"basic"

	Status Block Exists                 : pass
	CR: example-recording
	Labels:
		"necessity":"required"
		"suite":"basic"
		"test":"checkstatustest"
	Suggestions:
		Add a 'status' field to your Custom Resource

	Writing into CRs has an effect      : pass
	CR: example-recording
	Labels:
		"necessity":"required"
		"suite":"basic"
		"test":"writingintocrshaseffecttest"

olm:
	Bundle Validation Test              : pass
	CR: containerjfr
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"bundlevalidationtest"

	Provided APIs have validation       : pass
	CR: containerjfr
	Labels:
		"suite":"olm"
		"test":"crdshavevalidationtest"
		"necessity":"required"

	Owned CRDs have resources listed    : fail
	CR: containerjfr
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"crdshaveresourcestest"
	Suggestions:
		If it would be helpful to an end-user to understand or troubleshoot your CR, consider adding resources [secrets/v1 configmaps/v1 containerjfrs/v1alpha1 deployments/v1 services/v1 servicemonitors/v1 persistentvolumeclaims/v1 routes/v1 pods/v1 flightrecorders/v1alpha2 recordings/v1alpha2 replicasets/v1] to the resources section for owned CRD ContainerJFR

	Spec fields with descriptors        : fail
	CR: containerjfr
	Labels:
		"test":"specdescriptorstest"
		"necessity":"required"
		"suite":"olm"
	Suggestions:
		Add a spec descriptor for minimal

	Status fields with descriptors      : fail
	CR: containerjfr
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"statusdescriptorstest"

	Bundle Validation Test              : pass
	CR: example-flightrecorder
	Labels:
		"test":"bundlevalidationtest"
		"necessity":"required"
		"suite":"olm"

	Provided APIs have validation       : pass
	CR: example-flightrecorder
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"crdshavevalidationtest"

	Owned CRDs have resources listed    : fail
	CR: example-flightrecorder
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"crdshaveresourcestest"
	Suggestions:
		If it would be helpful to an end-user to understand or troubleshoot your CR, consider adding resources [pods/v1 configmaps/v1 recordings/v1alpha2 flightrecorders/v1alpha2 servicemonitors/v1 containerjfrs/v1alpha1 replicasets/v1 deployments/v1 services/v1] to the resources section for owned CRD FlightRecorder

	Spec fields with descriptors        : fail
	CR: example-flightrecorder
	Labels:
		"suite":"olm"
		"test":"specdescriptorstest"
		"necessity":"required"
	Suggestions:
		Add a spec descriptor for recordingSelector

	Status fields with descriptors      : fail
	CR: example-flightrecorder
	Labels:
		"suite":"olm"
		"test":"statusdescriptorstest"
		"necessity":"required"

	Bundle Validation Test              : pass
	CR: example-recording
	Labels:
		"test":"bundlevalidationtest"
		"necessity":"required"
		"suite":"olm"

	Provided APIs have validation       : pass
	CR: example-recording
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"crdshavevalidationtest"

	Owned CRDs have resources listed    : fail
	CR: example-recording
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"crdshaveresourcestest"
	Suggestions:
		If it would be helpful to an end-user to understand or troubleshoot your CR, consider adding resources [pods/v1 flightrecorders/v1alpha2 containerjfrs/v1alpha1 replicasets/v1 deployments/v1 configmaps/v1 recordings/v1alpha2 services/v1 servicemonitors/v1] to the resources section for owned CRD Recording

	Spec fields with descriptors        : fail
	CR: example-recording
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"specdescriptorstest"
	Suggestions:
		Add a spec descriptor for archive
		Add a spec descriptor for duration
		Add a spec descriptor for eventOptions
		Add a spec descriptor for flightRecorder
		Add a spec descriptor for name

	Status fields with descriptors      : fail
	CR: example-recording
	Labels:
		"necessity":"required"
		"suite":"olm"
		"test":"statusdescriptorstest"

make: *** [Makefile:113: scorecard] Error 1

gingko succeeded and scorecard failed, but the test failures here look the same or similar to what we currently have in upstream main if I'm not mistaken.

That scorecard result seems fine for now, there are similar failures in main, as you said. I filed #150 to fix the issues there.

Rebased - the conflicts seemed pretty minor and easy to resolve. make test still finishes with the same results as before.


Add the optional interrupt stack to the Xtensa architecture

Summary
This PR has to commits:

Add the interrupt stack to the Xtensa architecture.
Extends the interrupt stack to SMP mode (dual-core in case of ESP32)

Impact
The option defaults to disabled, so no impact in current configurations.
Testing
Testing in hardware and QEMU with ostest.

@masayuki2009 is the use of XXX_intstack_base() in SMP case correct in XXX_dumpstate?
I based my change on other architectures, but it looks as if "base" is used instead of "top".
This not something related (only) to this PR but to dumpstate in general.

@masayuki2009 is the use of XXX_intstack_base() in SMP case correct in XXX_dumpstate?
I based my change on other architectures, but it looks as if "base" is used instead of "top".
This not something related (only) to this PR but to dumpstate in general.

@Ouss4
Thanks for the comments.
I will check the code later.

@masayuki2009 is the use of XXX_intstack_base() in SMP case correct in XXX_dumpstate?
I based my change on other architectures, but it looks as if "base" is used instead of "top".
This not something related (only) to this PR but to dumpstate in general.

@Ouss4
Thanks for the comments.
I will check the code later.

Hi @Ouss4,
I checked both imx6 (armv7-a) and cxd56xx (armv7-m) and found that
arm_assert.c expects arm_intstack_base() to return the top of the
interrupt stack for the current CPU.
static void up_dumpstate(void)
{
...
#ifdef CONFIG_SMP
  istackbase = (uint32_t)arm_intstack_base();
#else
  istackbase = (uint32_t)&g_intstackbase;
#endif
  istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~7);

Actually, &g_intstackbase stores "top" of the interrupt stack for non-SMP,
but the naming might be confusing.  Anyway, we need to follow the same rule for SMP case.
However, I also noticed that  arm_intstack_base() for imx6 and cxd56xx were incorrect.
Currently they return "bottom" of the interrupt stack for the current CPU.
So I will need to fix them later.

However, I also noticed that arm_intstack_base() for imx6 and cxd56xx were incorrect.
Currently they return "bottom" of the interrupt stack for the current CPU.
So I will need to fix them later.

Yes, this is what I was reffering to.  arm_intstack_base is returning the bottom of the stack while it was used assuming it returns the top of the stack.

However, I also noticed that arm_intstack_base() for imx6 and cxd56xx were incorrect.
Currently they return "bottom" of the interrupt stack for the current CPU.
So I will need to fix them later.

Yes, this is what I was reffering to. arm_intstack_base is returning the bottom of the stack while it was used assuming it returns the top of the stack.
This function is used for debugging only in arm_assert (arch_dumpstate for some architectures) and arm_checkstack. Its usage in xxx_checkstack is correct though.

@Ouss4
Hmm, I also found the following code in arm_initialize.c and arm_checkstack.c
I think we need to fix these as well.
in arm_initialize.c
...
#if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 3
static inline void up_color_intstack(void)
{
#ifdef CONFIG_SMP
  uint32_t *ptr = (uint32_t *)arm_intstack_base();
#else
  uint32_t *ptr = (uint32_t *)&g_intstackalloc;
#endif
  ssize_t size;

  for (size = (CONFIG_ARCH_INTERRUPTSTACK & ~3);
       size > 0;
       size -= sizeof(uint32_t))
    {
      *ptr++ = INTSTACK_COLOR;
    }
}
...

in arm_checkstack.c
...
#if CONFIG_ARCH_INTERRUPTSTACK > 3
size_t up_check_intstack(void)
{
#ifdef CONFIG_SMP
  return do_stackcheck((FAR void *)arm_intstack_base(),
                        INT32_ALIGN_DOWN(CONFIG_ARCH_INTERRUPTSTACK));
#else
  return do_stackcheck((FAR void *)&g_intstackalloc,
                        INT32_ALIGN_DOWN(CONFIG_ARCH_INTERRUPTSTACK));
#endif
}
...

Hmm, I also found the following code in arm_initialize.c and arm_checkstack.c
I think we need to fix these as well.

@masayuki2009 Yes, however the use in arm_initialize.c and arm_checkstack.c is correct.  Both expect to get the bottom of the stack.  The only issue is arm_assert that uses arm_intstack_base expecting to get the "top" of the stack.

Hmm, I also found the following code in arm_initialize.c and arm_checkstack.c
I think we need to fix these as well.

@masayuki2009 Yes, however the use in arm_initialize.c and arm_checkstack.c is correct. Both expect to get the bottom of the stack. The only issue is arm_assert that uses arm_intstack_base expecting to get the "top" of the stack.

@Ouss4
Yeah, but the current use of arm_intstack_base() in in arm_initialize.c and arm_checkstack.c is very confusing for me. So I will introduce arm_intstack_allock() which returns the "bottom" address of the stack and will be called in arm_initialize.c and arm_checkstack.c Also, I will modify arm_intstack_base() so that I can return the "top" address of the stack. These modifications will be consistent with non-SMP case.
What do you think?

I agree, this is the correct way to fix it. This will eliminate any confusion and be consistent with non-SMP case.
I'll modify this PR to include these changes too.

@Ouss4
I wrote my code and pushed to https://github.com/masayuki2009/incubator-nuttx/tree/fix_arm_intstack_for_smp
I think the code is now simpler than before and basic test passed.
However, I will do more testing tomorrow and then send a PR.

Hi @Ouss4 and @masayuki2009 is it done? LGTM???

Hi @Ouss4 and @masayuki2009 is it done? LGTM???

It is done but I'm also monitoring https://github.com/apache/incubator-nuttx/pull/2061 to see if there is anything to add here.
Let's wait until that one is merged first.

LGTM


ci: migrate browser tests to GHA

Migrate browser tests to Github Actions

@devversion PTAL

I think I was waiting on https://github.com/angular/components/pull/27675#discussion_r1311562419.


invalid download link

invalid download link in https://github.com/NVIDIA/spark-rapids-examples/blob/branch-21.10/docs/get-started/xgboost-examples/prepare-package-data/preparation-python.md

need to update MortgageETL.ipynb/preparing_datasets.md/preparation-python.md/preparation-scala.md   docs url to https://docs.rapids.ai/datasets/mortgage-data

fix in #46

close since #46 merged


Not able to workaround Database mount error, yet I can use all function of Oracle database

Hello,
My database Oracle <IP_ADDRESS> standard edition is fully functional, But I am still getting the same ERROR which is
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID .
You can set ORACLE_BASE manually if it is required.
which leads to =
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
The error is not blocking but in order to have a clean installation, I would like to fix this bug and I am asking for your help on this.
Thanks in advance !

Can you please provide more details on what you are executing. The <IP_ADDRESS> SE2 image comes up just fine with the latest version of the build files:
[oracle@localhost ~]$ docker run --name oracle-se2 -p 1521:1521 -v /home/oracle/oradata:/opt/oracle/oradata -e ORACLE_SID=SE2 oracle/database:<IP_ADDRESS>-se2
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: 4rGuKq5Og8Q=1

LSNRCTL for Linux: Version <IP_ADDRESS>.0 - Production on 18-APR-2018 19:17:12

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Starting /opt/oracle/product/<IP_ADDRESS>/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version <IP_ADDRESS>.0 - Production
System parameter file is /opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/0ebc66f43525/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<IP_ADDRESS>)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version <IP_ADDRESS>.0 - Production
Start Date                18-APR-2018 19:17:13
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/0ebc66f43525/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<IP_ADDRESS>)(PORT=1521)))
The listener supports no services
The command completed successfully
[WARNING] [DBT-10102] The listener configuration is not selected for the database. EM DB Express URL will not be accessible.
   CAUSE: The database should be registered with a listener in order to access the EM DB Express URL.
   ACTION: Select a listener to be registered or created with the database.

SQL*Plus: Release <IP_ADDRESS>.0 Production on Wed Apr 18 19:24:18 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Standard Edition Release <IP_ADDRESS>.0 - 64bit Production

SQL>
System altered.

SQL>
Pluggable database altered.

SQL> Disconnected from Oracle Database 12c Standard Edition Release <IP_ADDRESS>.0 - 64bit Production
The Oracle base remains unchanged with value /opt/oracle
#########################
DATABASE IS READY TO USE!
#########################
The following output is now a tail of the alert.log:
Completed: alter pluggable database ORCLPDB1 open
2018-04-18T19:24:17.546169+00:00
ORCLPDB1(3):CREATE SMALLFILE TABLESPACE "USERS" LOGGING  DATAFILE  '/opt/oracle/oradata/SE2/ORCLPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED  EXTENT MANAGEMENT LOCAL  SEGMENT SPACE MANAGEMENT  AUTO
ORCLPDB1(3):Completed: CREATE SMALLFILE TABLESPACE "USERS" LOGGING  DATAFILE  '/opt/oracle/oradata/SE2/ORCLPDB1/users01.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT  1280K MAXSIZE UNLIMITED  EXTENT MANAGEMENT LOCAL  SEGMENT SPACE MANAGEMENT  AUTO
ORCLPDB1(3):ALTER DATABASE DEFAULT TABLESPACE "USERS"
ORCLPDB1(3):Completed: ALTER DATABASE DEFAULT TABLESPACE "USERS"
2018-04-18T19:24:18.627791+00:00
ALTER SYSTEM SET control_files='/opt/oracle/oradata/SE2/control01.ctl' SCOPE=SPFILE;
   ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
Completed:    ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE

Hello, thanks for your response, I won't be at work before monday. I will give you more details then.
Thanks.

Hey, here what getting wrong
LSNRCTL for Linux: Version <IP_ADDRESS>.0 - Production on 23-APR-2018 12:42:47
Copyright (c) 1991, 2016, Oracle.  All rights reserved.
Starting /opt/oracle/product/<IP_ADDRESS>/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version <IP_ADDRESS>.0 - Production
System parameter file is /opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/2a730c555204/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<IP_ADDRESS>)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version <IP_ADDRESS>.0 - Production
Start Date                23-APR-2018 12:42:49
Uptime                    0 days 0 hr. 0 min. 1 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/2a730c555204/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<IP_ADDRESS>)(PORT=1521)))
The listener supports no services
The command completed successfully
SQLPlus: Release <IP_ADDRESS>.0 Production on Mon Apr 23 12:42:49 2018
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> ORACLE instance started.
Total System Global Area<PHONE_NUMBER> bytes
Fixed Size                  8793304 bytes
Variable Size             520094504 bytes
Database Buffers<PHONE_NUMBER> bytes
Redo Buffers                7983104 bytes
ORA-00221: error on write to control file
ORA-00206: error in writing (block 1, # blocks 1) of control file
ORA-00202: control file: '/opt/oracle/oradata/VINCENT/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 3
SQL> Disconnected from Oracle Database 12c Standard Edition Release <IP_ADDRESS>.0 - 64bit Production
ls: cannot access /opt/oracle/oradata/ORCLCDB: No such file or directory
ls: cannot access VINCENT//: No such file or directory
ORACLE_HOME = [/home/oracle] ? ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID .
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /opt/oracle
/opt/oracle/checkDBStatus.sh: line 27: sqlplus: command not found
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################
The following output is now a tail of the alert.log:
Executing user defined scripts
./runUserScripts.sh: running /opt/oracle/scripts/startup/01_truncate_table.sql
SQLPlus: Release <IP_ADDRESS>.0 Production on Mon Apr 23 12:43:25 2018
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
Enter user-name: Enter password:
ERROR:
ORA-01005: null password given; logon denied
Enter user-name:
./runUserScripts.sh: running /opt/oracle/scripts/startup/02_script_insert.sql
SQLPlus: Release <IP_ADDRESS>.0 Production on Mon Apr 23 12:43:28 2018
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
ERROR:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
Enter user-name: Enter password:
ERROR:
ORA-01005: null password given; logon denied
Enter user-name:
DONE: Executing user defined scripts
2018-04-23T12:43:23.213552+00:00
Using default pga_aggregate_limit of 2048 MB
2018-04-23T12:43:25.381613+00:00
Errors in file /opt/oracle/diag/rdbms/vincent/VINCENT/trace/VINCENT_ora_97.trc:
ORA-00206: error in writing (block 1, # blocks 1) of control file
ORA-00202: control file: '/opt/oracle/oradata/VINCENT/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 3
ORA-221 signalled during: ALTER DATABASE   MOUNT...
What is really upsetting me is before the 'DATABASE SETUP WAS NOT SUCCESSFUL!"
here is my docker-compose.yml
version: '2' services:   database:     image: oracle/database:<IP_ADDRESS>-se2     environment:       - ORACLE_SID=VINCENT       - ORACLE_PWD=Password1       - ORACLE_CHARACTERSET=utf8     container_name: oracle     volumes:       - /home/oracle/oradata:/opt/oracle/oradata # persistent oracle database data.       - /opt/docker-images-master/OracleDatabase/dockerfiles/<IP_ADDRESS>/resources/:/opt/oracle/scripts/startup/     ports:       - 1521:1521       - 8080:8080
I am executing my docker-compose up -d as normal user, not root.
ORACLE_BASE is set to : /opt/oracle/product/<IP_ADDRESS>/dbhome_1
and sqlplus is installed on my linux & my container.
Any idea what I'm doing wrong?
I am currently re editing a clean oradata folder, maybe some files got into error.
Thanks for support !

Hi @tetardv, your container doesn't have write permissions on /home/oracle/oradata:
ORA-00202: control file: '/opt/oracle/oradata/VINCENT/control01.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 13: Permission denied
Additional information: 3

Please see FAQ: Cannot create directory error when using volumes.

Closing due to lack of response, considering it solved.

Hi, I am battling an error and don't have where to look anymore. Any idea?
oracle@localhost ~]$ docker run --name oracle-se2 -p 1521:1521 -v /home/oracle/oradata:/opt/oracle/oradata -e ORACLE_SID=SE2 oracle/database:<IP_ADDRESS>-se2
ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN: kMZBvCscrQE=1
LSNRCTL for Linux: Version <IP_ADDRESS>.0 - Production on 11-JUL-2019 20:07:04
Copyright (c) 1991, 2016, Oracle.  All rights reserved.
Starting /opt/oracle/product/<IP_ADDRESS>/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version <IP_ADDRESS>.0 - Production
System parameter file is /opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/a3345411aab1/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<IP_ADDRESS>)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version <IP_ADDRESS>.0 - Production
Start Date                11-JUL-2019 20:07:05
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora
Listener Log File         /opt/oracle/diag/tnslsnr/a3345411aab1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<IP_ADDRESS>)(PORT=1521)))
The listener supports no services
The command completed successfully
[WARNING] [DBT-10102] The listener configuration is not selected for the database. EM DB Express URL will not be accessible.
CAUSE: The database should be registered with a listener in order to access the EM DB Express URL.
ACTION: Select a listener to be registered or created with the database.
Look at the log file "/opt/oracle/cfgtoollogs/dbca/SE2.log" for further details.
cat: /opt/oracle/cfgtoollogs/dbca/SE2/SE2.log: No such file or directory
[ 2019-07-11 20:07:36.513 UTC ] Cannot create directory "/opt/oracle/oradata/SE2".
SQL*Plus: Release <IP_ADDRESS>.0 Production on Thu Jul 11 20:07:36 2019
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
Connected to an idle instance.
SQL>    ALTER SYSTEM SET control_files='/opt/oracle/oradata/SE2/control01.ctl' scope=spfile
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL>    ALTER PLUGGABLE DATABASE ORCLPDB1 SAVE STATE
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> BEGIN DBMS_XDB_CONFIG.SETGLOBALPORTENABLED (TRUE); END;

ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
SQL> Disconnected
mkdir: cannot create directory '/opt/oracle/oradata/dbconfig': Permission denied
mv: cannot stat '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/dbs/spfileSE2.ora': No such file or directory
mv: cannot stat '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/dbs/orapwSE2': No such file or directory
mv: cannot move '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/sqlnet.ora' to '/opt/oracle/oradata/dbconfig/SE2/': No such file or directory
mv: cannot move '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora' to '/opt/oracle/oradata/dbconfig/SE2/': No such file or directory
mv: cannot move '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/tnsnames.ora' to '/opt/oracle/oradata/dbconfig/SE2/': No such file or directory
cp: cannot create regular file '/opt/oracle/oradata/dbconfig/SE2/': No such file or directory
ln: failed to create symbolic link '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/sqlnet.ora': File exists
ln: failed to create symbolic link '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/listener.ora': File exists
ln: failed to create symbolic link '/opt/oracle/product/<IP_ADDRESS>/dbhome_1/network/admin/tnsnames.ora': File exists
cp: cannot stat '/opt/oracle/oradata/dbconfig/SE2/oratab': No such file or directory
ORACLE_HOME = [/home/oracle] ? ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID .
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /opt/oracle
/opt/oracle/checkDBStatus.sh: line 26: sqlplus: command not found
#####################################
########### E R R O R ###############
DATABASE SETUP WAS NOT SUCCESSFUL!
Please check output for further info!
########### E R R O R ###############
#####################################
The following output is now a tail of the alert.log:
tail: cannot open '/opt/oracle/diag/rdbms///trace/alert*.log' for reading: No such file or directory
tail: no files remaining


MINOR: use readlock for read epochs

use readlock for epochs reading
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@divijvaidya @satishd , a quick fix for the lock.


Decompound Words For German Languange

In German language it is common to combine nouns without whitespace.
e.g.
apple => Apfel
tree => Baum
apple tree => Apfelbaum (no white space between the two words)
Having that said, searching for "Baum" (tree) should also give a hit for the apple tree. If there are documents with "Baum" and "Apfelbaum" then user may expect that the document with "Baum" is higher ranked, but they also expect to find "Apfelbaum" within the result.
In Elasticsearch there is a HyphenationCompoundWordTokenFilter that split words by using a hyphon ruleset and a word list. The hyphon ruleset helps to avoid splitting words in a wrong way and may speedup the search for words within other words.
Anyway any simple tokenizer that uses a word list to split the words would help a lot.

This should actually already be done via the fast-fuzzy system to some extent (although this could definitely be added to the traditional fuzzy system)
In theory the system should split apfelbaum into apfel baum providing the documents contain a high frequency count of apfel or baum and not apfelbaum (if it matches exactly the system wont try segment it) unless something else is closer / occurs more commonly.
The second part of the idea you mentioned isn't currently implemented automatically i.e joining parts back up although this is slightly possible via synonyms doing apfel:apfelbaum as a mapping but I can see the possible use for doing this automatically (although maybe this could be an opt in feature and/or only done when the system has started to run out of options on the original method)

The fast-fuzzy system without synonyms does not give good results in my test. By using the synonyms the way you suggested also didn't work for me:
Searching for "Baum" in a dataset containing "Apfelbaum" did only return the documents with exact match "Baum"
 "query": [
        {
            "fuzzy": {
                "ctx": "Baum"
            },
            "occur": "must"
        }
    ]

with synonyms (already added before indexing)
{"apfelbaum":["baum","apfel"],"apfelschale":["schale","apfel"],"nussbaum":["baum","nuss"]}

Using synonyms the other way round improved the results a lot:
Apfel,Baum:Apfelbaum
That way searching for Baumor Apfel also returns the document "Apfelbaum" as result.
search:
{
    "query": [
        {
            "fuzzy": {
                "ctx": "Baum"
            },
            "occur": "must"
        }
    ]
}

with synonyms:
{"schale":["apfelschale"],"apfel":["apfelschale","apfelbaum"],"baum":["apfelbaum","nussbaum"],"nuss":["nussbaum"]}
result:
with score:410.13638 title:Apfelbaum
with score:410.13638 title:Nussbaum
with score:410.13638 title:Baum
with score:23.718506 title:Zierleiste

Sadly in that case "Apfelbaum" goes before the exact match which I think could be improved in LNX because exact match should always have higher ranking than synonym matches.
But even if this could be improved, I am not sure how to create this synonyms automatically.
I guess without this feature LNX can not be used with German language to produce good results.

Yeah I think we should do some sort of boost adjustment to have the system display the results better.

Searching for "Baum" in a dataset containing "Apfelbaum" did only return the documents with exact match "Baum"

This is quite a difficult problem to solve in terms of deciding how the system should match close terms or if we should try something more radical like modifying the tokenized text in such a way that it matches those sorts of things.
But for now I'm not sure how easy improving it would be realistically. I don't think you'll match Apfelbaum for the term Baum in many existing systems anyway right now because most are prefixed based (although I'm not saying that's ideal)

I am not sure how to create this synonyms automatically.

That is ultimately the biggest issue plaguing relevancy with stuff like this, how and when should stuff be 'similar'/ related without human intervention

This is the case with some Armenian words too.
Maybe we could try using something like Hugging Face Tokenizers or Hugging Face Transformers and use NLP models (in this case stop words) distributed online, instead of creating new ones from scratch (and if they do not exist we will create them separately for each missing language of course)? There is this library that I found called rust_bert, which essentially is a port of Hugging Face's official transformer API to Rust and it seems like it is very well-maintained.
This might heavily impact the performance though. What do you think?

Hugging face have all their tokenizers in Rust to begin with it's what the backbone of their system is in.
But yes, I'm slightly concerned to the performance impact it would have (which I imagine is a lot).

This is the case with some Armenian words too.

Armenian words also suffer from the system having slightly conflicting methods of normalizing the unicode right now so it's largely trying its hardest but its difficult when two systems are potentially producing different conversions (for fast fuzzy that is)
this issue also runs with CJK languages as well.

I think the tokenizing system could do with be played around with to try improve relevancy in places, especially for non-whitespace separated languages.

that would be an idea, although im not sure how well that would work in practice if you have hundreds of these words it's going to get pretty tedious.
I think we should start by trying to improve the automatic tokenization first before trying to do manual special casing (although that certainly would still be a good idea)

@keywan-ghadami-oxid  @michaelgrigoryan25  I have an experimental branch relevancy-tests if you fancy trying that out and giving feedback on how the relevancy is in your respective languages. Although it's slightly out of tune atm it might be a possible solution.

@keywan-ghadami-oxid  @michaelgrigoryan25  I have an experimental branch relevancy-tests if you fancy trying that out and giving feedback on how the relevancy is in your respective languages. Although it's slightly out of tune atm it might be a possible solution.
This does tank the English relevancy however.

Sure!

You change improves the relevance a lot. I did not need any synonym settings, and already did a lot of testing.
One downside of the change is that indexing is now a lot slower. Maybe it should be configurable which tokenizer to use.
Anyway thank you already for this great improvement.

Yeah... It is considerably slower and also affects the English relevancy quite negatively. Although it seems like a step in the right direction.

I guess indexing all nGrams is quite heavy and much more then it needs (sometimes even bad). I was wondering if using a rust hyphenation library to first check good positions to split the words in combination with matching the tokens against a language specific dictionary could drastically reduce the amount of tokens. see this
https://github.com/uschindler/german-decompounder
Another (maybe stupid or genius) idea would be to use the word list (together with some stemming and hyphen rules) to build a giant regular expression that can be used to split any string into words in linear time.

So I've worked out a system that should work as best as we can do in reality without compromising on relevancy for other languages or indexing time.
Hopefully should have a test system available soon but for the most part, it brings prefix searching for free with no additional overhead to what already exists with lnx i.e apple will match appletree. But also with the ability to opt into suffix support. The reason why this is opt-in is that it adds an additional load to memory usage when processing a commit and can potentially increase commit times (although not by much), this gives allows you to match appletree when you search for the query tree if enabled.
Note there's one real caveat:
Prefix and Suffix search only works for words that are under 7 characters long.  In theory, this can be increased but this comes at the cost of additional processing time, slower searches and less relevancy for most other words. i.e words like apple/Apfel will match appletree/Apfelbaum respectively but words like wonderer won't have a prefix search applied for terms like wonderers realistically though most words where you would have a prefix situation probably fit in under 6 characters. This same logic applies to suffix searching.
The plus side is though that this is essentially fee (minus some commit time for suffix search) for us to use and should hopefully drastically improve relevancy for situations like this.
note: when I say it will increase commit time I mean it goes from talking about 8s to processing 400,000 unique words to 17s when suffix processing is enabled. (400,000 unique words roughly is ~5 million document database of arbitrary user data)


Permanently delete a file in App Folder

Is there any way to permanently delete a file in my App Folder?
DELETE /me/drive/items/item-id
This method move the items to the recycle bin, but the storage usage isn't decrease.
Why the App Data can not be deleted permanently? This is unexpected for users.
Thank you.

At the moment we do not provide an API endpoint for working with the recycle bin through Microsoft Graph, this is an item in our roadmap but does not have an ETA right now.


Avoid internal const to mut pointer casts

Fixes #1
You may feel free to implement this pr yourself

This also allows Sync for T: ?Send and Send for T: ?Sync for LendingCell and BorrowedCell.

I was reading around I think I'm convinced that it's necessary.


Only accept lexical declarations in for loops if esnext is enabled

eh, nvm --- this is good enough


Release To Preview - v1.0.0-preview.2

Preview Release Pull Request
✅Code Review Checklist✅

[x] The head(source) branch for this pull request is a preview branch, with the correct naming syntax, in the following example:

A head(source) branch is the branch being merged into a target branch.
Example
Syntax: preview/v<major>.<minor>.<patch>-preview.<prev-num>
Example: preview/v1.2.3-preview.4

[x] The base(target) branch for this pull request is a release branch, with the correct naming syntax, in the following example:

A base(target) branch is the branch that the head(source) branch is merging into.
Example
Syntax: release/v<major>.<minor>.<patch>
Example: release/v1.2.3

[x] The head(source) branch for this pull request is created from a release branch with the correct naming syntax in the following example.
Example
Syntax: release/v<major>.<minor>.<patch>
Example: release/v1.2.3

[x] Pull request title matches the example below, using the correct version.
Example
Syntax: 🚀Release To Preview - v<major>.<minor>.<patch>-preview.<prev-num>
Example: 🚀Release To Preview - v1.2.3-preview.4

[x] A https://github.com/KinsonDigital/VersionMiner/labels/🚀Preview Release label has been added to this PR.

[x] ~A QA issue has been created and manual QA testing has been performed for the changes being released.~

QA Testing not required or setup.


Pylance says Code is unreachable even though it executes in python [BUG]

Environment data

Language Server version: v2022.11.20
OS and version: Ubuntu 22.04.1 LTS
Python version (& distribution if applicable, e.g. Anaconda): 3.8.15

Code Snippet
class CodeUnreachable:
    def __init__(self):
         num_figs = 6
         nrow, ncol = self._get_nrow_ncol(num_figs, 3)
         # pylance grays out code and says code unreachable

    @staticmethod
    def _get_nrow_ncol(
        num_plots: int,
        row_limit: int = None,
        col_limit: int = None,
    ):
        if row_limit is not None and col_limit is not None:
            raise ValueError(
                "Both `row_limit` and `col_limit` cannot be set"
            )

        if col_limit is not None:
            raise NotImplementedError(
                "`col_limit` arg functionality has not been implemented yet"
            )

        if num_plots <= row_limit:
            return (num_plots, 1)
        else:
            return (row_limit, np.ceil(num_plots / row_limit).astype(int).item())

Expected behavior
Not graying out the code block
Actual behavior
The function causing this issue :arrow_down_small:

The code block where the function is called :arrow_down_small:

Logs

XXX

The problem is that you've declared parameter row_limit and col_limit to be type int, which means they can never legally be None. That means that the statement if row_limit is not None and col_limit is not None will always evaluate to True, and the function will always raise a ValueError exception.
You can fix this one of several ways:

Fix the type declarations for row_limit and col_limit to be int | None (or Optional[int]).
Provide a return type annotation for method _get_nrow_ncol so the type checker doesn't need to infer its type.
Create a pyrightconfig.json config file that sets strictParameterNoneValue to 'false'. This tells pyright (the type checker that underlies pylance) to treat parameters that have a default argument value of None as though they are implicitly Optional. This implicit behavior was originally allowed in PEP 484, but the PEP was updated later to indicate that type checkers should not default to this behavior and should require explicit Optional.

@erictraut
Thank you for the information. I managed to fix it the following way:
    def _get_nrow_ncol(
        num_plots: int,
        row_limit: Optional[int] = None,
        col_limit: Optional[int] = None,
    ) -> Tuple[int]:


SET UP KANBAN BOARD

Project link - https://github.com/MargaretTechworld/Ruby-Capstone/projects/1
We are three in goup.
Team member #1 - @noelfoka
Team member #2 - @Simpleshaikh1
Team member #3 - @MargaretTechworld

Hi @MargaretTechworld, @Simpleshaikh1 and @noelfoka,
Highlights
✔ Assigned tasks
Good job so far!
There are some issues that you still need to work on to go to the next project but you are almost there!
Required Changes ♻

[ ] As stated in the requirements, each item on the requirements should have a corresponding issue. Kindly divide the tasks into distinct issues, instead of having everything in one issue.

Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, do not open a new Pull Request for re-reviews. You should use the same Pull Request submitted for the first review, either valid or invalid unless it is requested otherwise.

As described in the Code reviews limits policy you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.