RS485 data collision detector failing (IDFGH-1274)

Hi,
I'm working with UART RS485 at low level and I received UART_RS485_CLASH_INT interruptions without actually there is data collision. Oscilloscope image attached: yellow is TX and blue is RX, connected direct on ESP32 pins.

My code was inspired by the source "uart.c". To prove that the system does not detect collision correctly, I did a little test as shown:
static void writer_task()
{

    const int uart_num = UART_NUM_2;

    uart_config_t uart_config = {
        .baud_rate = J1708_BAUD_RATE,
        .data_bits = UART_DATA_8_BITS,
        .parity = UART_PARITY_DISABLE,
        .stop_bits = UART_STOP_BITS_1,
        .flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
        .rx_flow_ctrl_thresh = 122,
        .use_ref_tick = false
    };

    ESP_LOGI(TAG, "Starting Writer...");

    // Configure UART parameters
    uart_param_config(uart_num, &uart_config);

    ESP_LOGI(TAG, "UART1 set pins, mode and install driver.");

    uart_set_pin(uart_num, ECHO_TXD1, ECHO_RXD1, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);

    // Inverse line to match with hw
    uart_set_line_inverse(uart_num, UART_INVERSE_TXD);

    // Install UART driver
    uart_driver_install(uart_num, 1024, 0, 0, NULL, 0);

    // Set RS485 mode
    uart_set_mode(uart_num, UART_MODE_RS485_COLLISION_DETECT);

    // buffer for send
    uint8_t *dtmp = (uint8_t *)malloc(1024);

    while (true)
    {
        uart_write_bytes(uart_num, (const char*)dtmp, 5);

        bool col;
        uart_get_collision_flag(uart_num, &col);

        printf("COLLISION1: %d\n", col);

        vTaskDelay(1000 / portTICK_PERIOD_MS);

        uart_get_collision_flag(uart_num, &col);

        printf("COLLISION2: %d\n", col);

        vTaskDelay(1000 / portTICK_PERIOD_MS);
    }
}

The result is basically:
COLLISION1: 1
COLLISION2: 1
COLLISION1: 1
COLLISION2: 1
COLLISION1: 1
COLLISION2: 1

In my version, when a put:
uart->rs485_conf.tx_rx_en = 1;
there's no collision, but I receive data from rx by tx.
There any workaround for that? Maybe uart.c miss some configuration.

Could it be because of the uart_set_line_inverse?

No. I thought about that possibility. Then I shorted RX with TX. In this case there is no collision.
I think it's something about sampling. As the data is sent by the transceiver to the bus and is later read, there is a small time lag that the hardware is not accepting.
I am using the MAX3485 as a transceiver in the "C" mode described in the documentation.

Well this seems wrong, mixing enable bits and status bits
https://github.com/espressif/esp-idf/blob/81ca1c01395f604972fbf141cfbe49764a746023/components/driver/uart.c#L994-L996

This is not the best practice, but it should not be the problem. Otherwise, the interrupt would not triggered.
In my version I used the correct flag.
See, it's the same bit:
https://github.com/espressif/esp-idf/blob/81ca1c01395f604972fbf141cfbe49764a746023/components/soc/esp32/include/soc/uart_reg.h#L176-L177
https://github.com/espressif/esp-idf/blob/81ca1c01395f604972fbf141cfbe49764a746023/components/soc/esp32/include/soc/uart_reg.h#L302-L303
I found another error in uart.c, but I'll open another Issue.

This is not the best practice, but it should not be the problem. It's same mask.
Otherwise, the interrupt would not triggered.
In my version I used the correct flag.
About clear, it's missing! And it can be a big problem: I think interrupt will be triggered every time.
However, it still would not solve the problem. I have verified that the clash is responsible for the error, not frame error or parity error.
I found another error in uart.c, but I'll open another Issue.

Hi neorevx, negativekelvin,
Thank you for reporting this issue. I agree that UART_RS485_FRM_ERR_INT_ST and UART_RS485_PARITY_ERR_INT_ST bits should be cleared in status register. Your issue reproduced on my side. I perform investigation of collision detection issue and will communicate with hardware team to clarify hw behavior of the feature. It will take some time to get information and test it. I will let you know as soon as receive any information. The driver will be corrected accordingly after this.

Hi, @neorevx
This is a hardware issue, the clash interrupt will be triggered by mistake in half-duplex mode(rs485_conf.tx_rx_en=0). Can you accept the use of full-duplex((rs485_conf.tx_rx_en=0) mode to workaround this issue?

For my implementation there will be few problems. Nothing severe. I will have to process the sent message because the sending is received. Or discard my actively sent message.
But in order to implement correctly, please provide me with some information:

How long after sending (TX_DONE) do I get the data in RX_OUT / RX_FULL? I'll need to discard my message. If I spend more time, I will not receive the message.
If there is a collision, are the remaining bytes in the FIFO TX discarded or sent?

By the way, the GLITCH interrupt does not work as START BIT. I imagine there should be some confusion in the documentation (reference manual). I get GLITCH when there is noise in the signal. Is that correct? Or could it be the same problem with the half-duplex?
Thank you.

Hi, @neorevx
When tx_rx_en is set, the hardware can not detect the collision(hardware issue). If you are not using UART2, please try the following method(I guess you just want to discard the data you received when sending data.).

Set the register rxfifo_rst = 1 before you fill the txfifo.
Enable tx_done interrupt after the data is filled in txfifo.
Clear the register rxfifo_rst=0 when the tx_done interrupt arrives.

thanks !!

Hi, @koobest,
You told me that the interrupt does not work correctly in half-duplex (rs485_conf.tx_rx_en = 0). But now you told me that it also does not work in full-duplex (rs485_conf.tx_rx_en = 1).

When tx_rx_en is set

I think it meant "when tx_rx_en is not set". Or there is no way to detect collision via hardware. I will have to implement reading and comparing to the sent byte. In that case I would need a timeout if the collision generates an invalid frame and does not get back into the RX.
Look at this snippet of code. The comment says one thing and the code another. This is the code that initializes the UART to collision detection mode.
https://github.com/espressif/esp-idf/blob/58df1d93bc17c74499d58e05390af9c309192a5c/components/driver/uart.c#L1503-L1504
I will try to use rxfifo_rst = 1. However, I read somewhere that this flag can cause problems in other FIFOs. Do you think there will be problems?
So will there be normal collision detection?
I need to detect collision when transmitting the first byte of a message. It is a key point of the J1708 protocol. So here's the question: if there is a collision in the first byte and there are other bytes in the FIFO, Is the rest discarded or will it be sent after the collision?
Thank you!!!

Hi,@neorevx

Yes, the hardware fifo_reset has a bug. but this bug does not matter if UART1 and UART2 are not used at the same time.
Data in fifo is not discarded when a collision occurs.

In your hardware, the data you send will be read back by the hardware, so, you can determine whether conflicts occur by comparing  the received and transmitted data, if they are the same, no conflicts occur, and if they are not the same, a conflict occurs.

thanks !!

Hi, @neorevx
There are some new updates to this issue. A few days ago, I did this test in an incorrect way, so I got the wrong conclusion. I'm sorry for this. Now I can provide a test code to support this conclusion.

Due to hardware problems, the collision detection function of half-duplex mode (rs485_conf.tx_rx_en = 0) does not work (in fact, it can be used to detect collisions, but the RX idle level is required to be low when transmitting data).

The collision detection function of full-duplex mode (rs485_conf.tx_rx_en = 1) can work. If the data you send (on TX line) is different from the received data (on the RX line), a collision inerrupt will occur. Data will continue to be sent when a collision occurs.

You need two ESP32 board to do this test(you need to set rs485_conf.tx_rx_en=1).

Burn the test code onto two boards.(need to modify the macro #if 0 / #if 1 to select the board).
Connect GPIO13 of these two board. connect GPIO18 of board1 with GPIO19 of board0.

You will see the collision detection works.
//Test code
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "nvs_flash.h"
#include "driver/uart.h"
#include "freertos/queue.h"
#include "esp_log.h"

#define ECHO_TEST_TXD   (18)
#define ECHO_TEST_RXD   (19)

#define ECHO_TEST_RTS   (UART_PIN_NO_CHANGE)

#define ECHO_TEST_CTS  UART_PIN_NO_CHANGE

#define BUF_SIZE        (1024)
#define BAUD_RATE       (115200)

// Read packet timeout
#define PACKET_READ_TICS        (100 / portTICK_RATE_MS)
#define ECHO_TASK_STACK_SIZE    (2048)
#define ECHO_TASK_PRIO          (10)
#define ECHO_UART_PORT          (UART_NUM_1)

static const char *TAG = "RS485_ECHO_APP";

#include "soc/io_mux_reg.h"
#include "driver/gpio.h"

//make flash to board 1
#if 1

void test_task(void *param)
{
    uint8_t* data = (uint8_t*) malloc(BUF_SIZE);
    for(int i = 0; i < 1024; i++) {
        data[i] = i + 1;
    }
    const int uart_num = ECHO_UART_PORT;
    uart_config_t uart_config = {
        .baud_rate = BAUD_RATE,
        .data_bits = UART_DATA_8_BITS,
        .parity = UART_PARITY_DISABLE,
        .stop_bits = UART_STOP_BITS_1,
        .flow_ctrl = UART_HW_FLOWCTRL_CTS_RTS,
        .rx_flow_ctrl_thresh = 122,
    };
    // Configure UART parameters
    uart_param_config(uart_num, &uart_config);
    uart_set_pin(uart_num, 18, 19, -1, 13);
    uart_driver_install(uart_num, BUF_SIZE * 2, 0, 0, NULL, 0);

    while(1) {
        vTaskDelay(2000/portTICK_PERIOD_MS);
        uart_write_bytes(uart_num, (const char *)data, 1024);
        uart_wait_tx_done(uart_num, 1000/portTICK_PERIOD_MS);
        vTaskDelay(2000/portTICK_PERIOD_MS);
    }
}

//make flash to board 0
#else

void test_task(void *param)
{
    uint8_t* data = (uint8_t*) malloc(BUF_SIZE);
    for(int i = 0; i < 1024; i++) {
        data[i] = 0xff;
    }
    const int uart_num = ECHO_UART_PORT;
    uart_config_t uart_config = {
        .baud_rate = BAUD_RATE,
        .data_bits = UART_DATA_8_BITS,
        .parity = UART_PARITY_DISABLE,
        .stop_bits = UART_STOP_BITS_1,
        .flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
        .rx_flow_ctrl_thresh = 122,
    };
    // Configure UART parameters
    uart_param_config(uart_num, &uart_config);
    uart_set_pin(uart_num, 18, 19, -1, -1);
    uart_driver_install(uart_num, BUF_SIZE * 2, 0, 0, NULL, 0);
    uart_set_mode(uart_num, UART_MODE_RS485_COLLISION_DETECT);
    gpio_set_level(13, 1);
    PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[13], PIN_FUNC_GPIO);
    gpio_set_pull_mode(13, GPIO_PULLUP_ONLY);
    gpio_set_direction(13, GPIO_MODE_OUTPUT);

    while(1) {
        printf("start\n");
        vTaskDelay(2000/portTICK_PERIOD_MS);
        gpio_set_level(13, 0);
        ets_delay_us(1000)
        uart_write_bytes(uart_num, (const char *)data, 1024);
        vTaskDelay(2000/portTICK_PERIOD_MS);
        gpio_set_level(13, 1);
    }
}

#endif

void app_main()
{
    test_task(NULL);
}

thanks!!

Hello,
I had already tested the full-duplex collision and it worked (with interruption). However, I need to remove the sent message. In most cases it is only necessary to read all data from the RX-FIFO in the TX-DONE interrupt.
But in some cases, TX-DONE is sent before the byte is in the RX-FIFO. In that case, I believe we can look at the RX finite state machine and check if the byte is being read when TX-DONE happens. And if there is a byte, we discard the next byte of the RX-FIFO at the next reading.
There is also a collision before the TX-DONE. In my case, I need to record that there was a collision and discard all bytes when TX-DONE happens.
In half-duplex, I've inverted the TX with external hardware to see if it impacts the collision, but the answer is: No.
But I got some conclusions about inverting the logic level of the pins. There is no collision when I invert the RX (logical only). Obviously, there is also no correct data, since the RX is inverted. I tried to invert the RX only when sending data, but it generated false collisions as well. In some cases a 0x00 byte is also read by the transmitter, indicating that the hardware could not remove the byte sent, probably because the data is inverted ou RX delay.
It is interesting to note that jump RX with TX does not cause collision! But only with TX or RX inverted. When both are inverted or not, there is a collision.
Apparently the hardware expects the inverted bits but with no logical level inverted! I could use another GPIO and external hardware to invert the bits of the RX during the transmission, but it's a lot of effort. The inversion could only happen during transmission, while reception can not be inverted. Better to remove the Full-Duplex bytes. There is also no guarantee that the collision will be detected when there is. I still do not know exactly the behavior of the hardware.
I also tried other things without success.
About your example, I believe you miss something. You can not test by directly connecting the pins of two boards. It is necessary that you have a transceiver. The transceiver will always send the TX value to the RX, with some microseconds or nanoseconds of delay. The ESP32 hardware that removes TX from the RX. By connecting the pins directly, you will not have the loopback, so you will not be able to find collisions in the transmitter.
I'll test some things with RTS. Currently I control sw_rts during transmission. But in J1708 there is no RTS line, so I can not use it. I think there no where to go with RTS.
I tried putting the RX Pull-Down during transmission. But it did not help.
I will implement using full-duplex. If I have other news, I'll let you know.

The update for this issue to demonstrate described configuration of collision detection feature is added here .

Hi,
Could anyone check the above code with HAL and provide some feedback for this issue?

Related issue: https://github.com/espressif/esp-idf/issues/7446


Update project to use .Net 7 SDK

Polyglot Notebooks extension for VS Code has a new baseline requirement to use .Net 7 SDK.

Polyglot Notebooks page on Visual Studio Marketplace for reference.


Android: Housekeeping

Attempting to fix up our Android build environment to be more standard, flexible, and to satisfy automated F-Droid builds that recently broke.  Also updated to newer versions of some of our dependencies.
Strongly recommend doing a clean or nuke in your build environment before attemping to build after these changes.

Error:Gradle version 2.2 is required. Current version is 1.12. If using the gradle wrapper, try editing the distributionUrl in /Users/sclay/projects/newsblur/clients/android/NewsBlur/gradle/wrapper/gradle-wrapper.properties to gradle-2.2-all.zip.
Please fix the project's Gradle settings.
Gradle settings

I would suggest getting the latest gradle.  1.12 is quite out of date.  I have tested with 2.6 and above with no problems.

Now getting a Proguard error. I swear I'm googling these before I post it here.
Error:(15, 0) Build script error, unsupported Gradle DSL method found: 'runProguard()'!
Possible causes could be:

you are using Gradle version where the method is absent (Fix Gradle settings)
you didn't apply Gradle plugin which provides the method (Apply Gradle plugin)
or there is a mistake in a build script (Goto source)

What build environment are you using?

It really doesn't want to work now. I'm following the building directions with Android Studio and no modules are being imported when I start from a clean repo and import clients/android/NewsBlur.

Hmm, I know AS uses gradle internally, so it is possible that our
standalone configuration is confusing it. I will have to install AS and
play around to see how to smooth out compatibility. In the meantime, you
should be able to build with gradle from a shell or just
temporarily/locally rm the build.gradle config file and AS will function
as before.

I am a bit stumped.  I created a new AS project (in AS v1.5.1) pointed at the Android client root directory for import, and it built perfectly with even fewer steps than in the past.  If anything, the new gradle config file made the import go much more smoothly (there was one question about letting AS manage the gradle environment version, but that was it).
(This was on GNU/Linux. I also borrowed a Windows PC and tried the project with the newest AS v2.0, and though the install process was so awful that it broke gradle, it fell back to the legacy build method just fine and built the APK.)

Oh dear lord I figured it out. I have no idea how this happened, but I was running a 0.8.4 BETA. Forget the fact that as of yesterday AS was version 1.6, but I was running a beta of some old version. I'm just going to download AS 2.0 and hope for the best.

I wonder if I would have figured that out if AS 2.0 wasn't released today.

Excellent, all's well again.
Could you make the Saved icon in the feed list's all/unread/focus/saved control a bit larger? We just implemented this on iOS and had the same issue.

Also, I'm getting 0's for unread counts.

By the way, that footer's looking nice! Can we turn those font sizes down just a touch? Also, lets use the iOS icons. I don't think color belongs in that toolbar.

By the way, that footer's looking nice! Can we turn those font sizes down just a touch? Also, lets use the iOS icons. I don't think color belongs in that toolbar.

Created #908 to track (I swear I had an issue for that, but it must have been closed)


generation support: tracing API and implementation

This PR contributes:

Definition of the API for gathering tracing information within code generators
Implementation of the processing of tracing data to pairs of text regions
Extension of the JsonSerializer to optionally add $textRegion properties to the AstNodes while serializing them

I declare this PR to be complete now. 👊 😉

@sailingKieler @spoenemann
Tracing API feels good to use. All the common cases are covered, for corner cases there are low-level "back-doors" open. With the naming here and there I have my own flavor, but this is okay :)


[TEST] Fix flaky test case test_allow_volume_creation_with_degraded_availability_csi

What's the test to develop? Please describe
Fix flaky test case test_allow_volume_creation_with_degraded_availability_csi
Describe the items of the test development (DoD, definition of done) you'd like

[x] Script have consistent result

Additional context
https://ci.longhorn.io/job/public/job/master/job/sles/job/amd64/job/longhorn-tests-sles-amd64/155/testReport/junit/tests/test_csi/test_allow_volume_creation_with_degraded_availability_csi/

Close this ticket because now the flaky result not happen in case test_allow_volume_creation_with_degraded_availability_csi


Missing nullability annotation

In the param description it says "If this is null, default serialization settings will be used" but the param is not marked as nullable.

Is this change backwards incompatible for already compiled code? The parameter was a ref type, it became a struct.


Excludes directories to search in

What do you think about adding an option to restrict some directories to search in, such as vendor for PHP or node_modules for JS?
Maybe it can help to search faster.
Thank you.

Unless I'm mistaken, it already won't search node_modules by default. At least, I can't get it to find any functions contained in a file in node_modules.
Anyway, it is a good suggestion for other folders. I'll look into it when I have the chance (or you could do it and make a pull request). This is probably the relevant function that I use: https://github.com/atom/atom/blob/v1.10.2/src/workspace.coffee#L968

Hey, so I realized that this is already sort of configurable. If you look at the scan function, it does the following:
 directoriesForSearcher.forEach (directories, searcher) =>       searchOptions =         inclusions: options.paths or []         includeHidden: true         excludeVcsIgnores: @config.get('core.excludeVcsIgnoredPaths')         exclusions: @config.get('core.ignoredNames')         follow: @config.get('core.followSymlinks')         didMatch: (result) =>           iterator(result) unless @project.isPathModified(result.filePath)         didError: (error) ->           iterator(null, error)         didSearchPaths: (count) -> onPathsSearched(searcher, count)       directorySearcher = searcher.search(directories, regex, searchOptions)       allSearches.push(directorySearcher)
It excludes whatever you have in your core ignored names setting in Settings -> Core. I'll still look into adding a specific one for Code Peek, though.

Alternatively you could just parse .gitignore, as that's most likely the best indicator on what's not your source code.

Thank you for the answer.
It could be interesting to have a specific one for Code Peek. For example, I don't want to modify a vendor function, but I want to find the file containing the function via the Fuzzy Finder.
If I exclude the vendor directory, I won't be able to find a file into it via the Fuzzy Finder. Without autocompletion, the Fuzzy Finder is pretty useful.
@DFreds I'll try to do the modification and make a pull request, I just need to find some time to do it.

@dodekeract It actually does this if you have the Exclude VCS Ignored Paths checked in the core settings. That's why I wasn't finding anything in node_modules, because it was being ignored in my .gitignore.
@Cronos87 I'm not sure if it makes sense for you, but you could ignore the vendor folder using your .gitignore (or equivalent for you VCS) file.
Anyway, I'm thinking that the easiest way to implement this feature would be to create our own implementation of the scan function I'm currently using that is built into the Atom workspace. That way, you could change what is in the exclusions property to be a config in Code Peek. Just a thought. Let me know if you pick it up. Otherwise, I might have time this weekend to do it.

I added a configuration setting to do this. It was easier than I assumed. It should be included in 1.4.12. Thanks @Cronos87!
Reference: #13

Awesome! Thanks to you @DFreds!


S3 Notification to an Aliased Lambda?

Hi,
My intent is to create an aliased Lambda function and have a S3 bucket configured to invoke the aliased lambda when an object is created in that bucket.
Using AWS::Serverless::Function and the Events subkey, I can configure a non-aliased lambda function to be invoked.
However, I don't know how to make S3 invoke an aliased lambda function using the SAM template. I couldn't find documentation so I am guessing this is a feature request?
I was able to create an alias for my lambda function using AWS::Lambda::Alias but am unable to configure S3 with the ARN of the aliased lambda.

Create the alias using AWS::Lambda::Alias resource and use !GetAtt <logical-id-of-alias>.Arn in the S3 Event specification to point to the alias.

Awesome, was wondering just this!

"Create the alias using AWS::Lambda::Alias resource and use !GetAtt .Arn in the S3 Event specification to point to the alias."
This doesn't make sense. On what property of the S3 Event specification would you set the Arn of the Lambda alias? The documentation only describes 3 possible properties, none of which are relevant:
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#s3
"Bucket," "Events," and "Filter"...


Extended Rcode

On file edns.go, function SetExtendedRcode, I believe the following check is inappropriate:
if v < RcodeBadVers { // Smaller than 16.. Use the 4 bits you have!`
	return
}

since "v" supposedly already holds the only the 8 upper bits of the RCode, as it is called on file msg.go, line 718:
opt.SetExtendedRcode(uint8(dns.Rcode >> 4))

This issue has come up many times already, but it definitely looks wrong to me. x/net/dns/dnsmessage does it differently:
https://github.com/golang/net/blob/4dfa2610cdf3b287375bbba5b8f2a14d3b01d8de/dns/dnsmessage/message.go#L1679
https://github.com/golang/net/blob/4dfa2610cdf3b287375bbba5b8f2a14d3b01d8de/dns/dnsmessage/message.go#L1696

See #682, #516, #517, #339, #340 & #135 for a history of Extended RCode support.

[ Quoting<EMAIL_ADDRESS>in "Re: [miekg/dns] Extended Rcode (#76..." ]

See #682, #516, #517, #339, #340 & #135 for a history of Extended RCode support.

Yes, it was wrong. Can't remember if it still is, discussion mostly stalled on
having a backwards compatible way to doing it right IIRC

I forgot to mention that the calling of method SetExtendedRcode on file msg.go would have to changed too:
-               opt.SetExtendedRcode(uint8(dns.Rcode >> 4))
+               opt.SetExtendedRcode(uint16(dns.Rcode))

@cesarkuroiwa #791 should fix this

#791 was merged on the 17th.


ci(cd): remove old workflow

:tada: This PR is included in version 1.0.0-alpha.18 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0-alpha.18 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


update rust-rocksdb

Signed-off-by: Yi Wu<EMAIL_ADDRESS>
What have you changed? (mandatory)
Update rust-rocksdb with the following cherry-picks:
6ead62c 2019-07-25<EMAIL_ADDRESS>   Avoid build require system zlib (#303)
9246b9c 2019-07-25<EMAIL_ADDRESS>   Skip jemalloc options on specific platform (#324)
7a8dd73 2019-07-22<EMAIL_ADDRESS>   Add jemalloc-sys dependency when jemalloc is enabled (#320)
6f2c632 2019-07-23<EMAIL_ADDRESS>   Not compile with gflags (#322)
09b8032 2019-07-22<EMAIL_ADDRESS>   Fix perf context test (#321)
d67f38e 2019-07-21<EMAIL_ADDRESS>   Add jemalloc feature (#319)

Also update rocksdb to fix compile error with gcc9:
7a03c83ed 2019-07-23<EMAIL_ADDRESS>Fix MyRocks compile warnings-treated-as-errors on Fedora 30, gcc 9.1.1 (#5553)

What are the type of the changes? (mandatory)
Bug fix
How has this PR been tested? (mandatory)
CI
Does this PR affect documentation (docs) or release note? (mandatory)
no
Does this PR affect tidb-ansible update? (mandatory)
no
Refer to a related PR or issue link (optional)
Benchmark result if necessary (optional)
Add a few positive/negative examples (optional)

/run-integration-tests


Center vertically in a square container

Great package. It worked perfectly for my needs. The only thing I needed to have the package do is center the video vertically in the container. I've added another prop square which will add margin to the top of the video to make the video centered in a square container.

Hi, thank you for contributing and submitting this PR -- very much appreciated.
I'm reviewing your commits now and just wanted to clarify the exact use case for the square prop. Let me know if my assessment is correct:
I would set square to true if canvasvideo was placed inside of an element with square dimensions. for example:
`

`
This would center `` vertically within the `div` by setting a margin-top to a factor of the video's height.

Yes, that's right.

Merged, thanks again for contributing!
I've added a bit of conditional logic on the computed prop that applies the styles to the wrapper element. I noticed that the cover prop and square prop conflict, so their styles needed to be separated. Additionally, I added a bit of validation in the mounted hook to prevent both cover and square from being used together, since there's no use case for that.


Added Sugar Intake Calculator

Fixes Issue🛠

Closes #1354
Description👨💻

Added Sugar Intake Calculator to know the amount of intake of sugar
Type of Change📄

[ ] Bug fix (non-breaking change which fixes a bug)
[x] New feature (non-breaking change which adds functionality)
[ ] Style (non-breaking change which improves website style or formatting)
[ ] Documentation (non-breaking change which updates or adds documentation)
[ ] Responsiveness (non-breaking change which improves UI/UX on different screen sizes)

Checklist✅

[x] I am an Open Source contributor
[x] I have performed a self-review of my code
[x] My code follows the style guidelines of this project
[x] I have commented on my code, particularly in hard-to-understand areas

Screenshots/GIF📷

@Rakesh9100 Please review it soon

Made The changes @Rakesh9100

Style and enhance the UI @Saipradyumnagoud

@Rakesh9100 Yes i have updated the file
you can check now

Enhance the UI with some good gradient background color, font color and so on @Saipradyumnagoud

Enhance the UI with some good gradient background color, font color and so on @Saipradyumnagoud

Yes sir i will do it in a while

@Rakesh9100 This PR is reviewed & can be merged.

Yes @Rakesh9100 please Review is soon sir..


Cache invalidation

Is it possible to invalidate a specific cache, for example based on a tag like the EntityFramework.Extended FromCache method has?

Nevermind, in the readme.txt i read cache invalidation
1- Setting up the cache invalidation by overriding the SaveChanges method to prevent stale reads:


InvalidMacaroonError uploading an SDist (44 large wheels are fine)

Describe the bug
Uploading awkward has suddenly started producing this error:
Invalid API Token: InvalidMacaroonError('invalid macaroon signature')

The really weird thing is that all wheels upload, and this error occurs only on the SDist! We've tried regenerating the token, but no change. This also just started happening, with no apparent changes, between RC 3 and 4.
We can try adding verbose: true to https://github.com/scikit-hep/awkward-1.0/blob/5e4e4b984a62baf4075ab96113903f49de058ada/.github/workflows/wheels.yml#L144-L146 and see if anything changes.
Expected behavior
The SDist should upload too.
To Reproduce
https://github.com/scikit-hep/awkward-1.0/actions/workflows/wheels.yml
My Platform
GHA & cibuildwheel
Additional context
CC @jpivarski

Looking at the build log, it looks like it's failing on the first upload of a wheel for awkward_cuda_kernels. Is it possible the API token is only scoped to the awkward project?
You can use https://pypi.org/project/pypitoken/ to unpack your token and determine what permissions it has.

Ahh, fantastic, thanks! Didn’t realize this was added in an RC. The error message could be a bit nicer, though, I had no idea what a Macaroon was.

That's a great point, I think we can definitely improve the error message here.

(Shameless plug: https://github.com/pypa/warehouse/pull/9264 might solve this problem by changing most of the macaroon-related messages :) )

We also recently changed some of the plumbing here; it should be possible to make these error messages much nicer in the near future.
Ref: https://github.com/pypa/warehouse/pull/11122#discussion_r849979151

Fixed by #11885.


I get "The request body must contain the following parameter: 'code'" error

I get this error after entering email and password
Sorry, but we’re having trouble signing you in.
AADSTS900144: The request body must contain the following parameter: 'code'.
Not sure what to do

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0c90e134-28de-dd70-5bce-c4a829866288
Version Independent ID: 2c62c86f-4bac-9cce-f05d-ebd95cbb3d15
Content: Troubleshoot Azure sign-up
Content Source: articles/cost-management-billing/manage/troubleshoot-azure-sign-up.md
Service: cost-management-billing
GitHub Login: @v-miegge
Microsoft Alias: v-miegge

@RezaRahmati Thank you for reaching out to us, we will further evaluate the query and get back to you at the earliest.

@RezaRahmati Sorry to hear that you experienced the login failures. We had an issue related to MSA Login Failures which impacted subset of customers in specific scenarios. Our engineers have mitigated the issue and working on full root cause and prevent future occurrences.
You can please find the issue details here. (MSA Login Failures - Mitigated (Tracking ID CT05-PC0) - 02/21). Request you to please retry the sign in option and let us know if you continue to see the same error which was listed earlier in the thread.
Hope the above information helps. Please revert back if you have any further queries. Thanks

@BharathNimmala-MSFT thanks for clarification, yes now I can login with no issue


Update CRNN Readme

Thank you for your contribution to the MindOCR repo.
Before submitting this PR, please make sure:

[x] You have read the Contributing Guidelines on pull requests
[x] Your code builds clean without any errors or warnings
[x] You are using approved terminology
[ ] You have added unit tests

Motivation
Updated the following parts:

Added the section for MS Lite Inference (section 6)
Added the data shape of mindir file in Notes
Updated MindIR download links
Merged the Accuracy table and Training Perf. table

Test Plan
(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)
Related Issues and PRs
(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)

Updated according to the comments, please check, thanks thanks @HaoyangLee


Does meshio read binary vtu files?

Does meshio read binary vtu files?
Trying to read the vtu files posted here: https://github.com/topology-tool-kit/ttk-data
I get the same error for all:
XMLSyntaxError: Input is not proper UTF-8, indicate encoding !
Bytes: 0xC9 0x0C 0x00 0x00, line 28, column 6 (dragon.vtu, line 28)

During handling of the above exception, another exception occurred:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc9 in position 1365: invalid continuation byte

I read the file as follows:
fdata = meshio.read("dragon.vtu")
For any other file at the above link the same errors are displayed, the only difference is the line number.
I doubt that all vtu files in that repo have the same errors. Is something I missing when reading the files?

This appears to be a bug in LXML, reported here.

@nschloe   Thank you!!!

Okay, so it appears that this is not an lxml bug after all. VTU with raw binary data violates the XML specification and cannot by read by XML parsers. To support these kind of files, meshio would have to implement its own parser, and this isn't going to happen. Raw binary data seems like an oversight in the initial VTU spec, and indeed there is a footnote saying

There is one case in which the file is not a valid XML document. When the AppendedData section is not encoded as base64, raw binary data is present that may violate the XML specification. This is not default behavior, and must be explicitly enabled by the user.

If you ever meet those files, it's best to ask upstream to change the data into base64.


A big spam error and the infinite log error

IMPORTANT: Please first search existing bugs to ensure you are not creating a duplicate bug report!
Describe the bug
When i start the save and 1 of my colonis have a chance of major break the game spam the message of mental break risk every seconds and the log repeats a error at the same time, this make the game lag and unplayable. when i deinstall the Threaded mod the game works fine. My save game is from 1 year and i didn´t know why the problem it´s generated because the game doesn´t present this error before.
Steps to reproduce the behavior (VERY IMPORTANT)

Load the save with the mods
wait 10 seconds in 1x
the spam of messages generates
See the log and the infinite progressive messages generate

Error Log
[Error.txt](https://github.com/cseelhoff/RimThreaded/files/7009827/Error.txt
https://gist.github.com/31a930393b4b1ca10c2558f66921bf0d
Save file
Heaven.zip
Screenshots

https://user-images.githubusercontent.com/89160730/129962371-0078cf37-b02b-4b55-989e-2fc128e64250.mp4
Mod list (Preferably a RimPy compatible list.)
*Harmony
*Realistic Rooms [1.3]
*Damage Indicators [1.3]
*Vanilla Expanded Framework
*Vanilla Weapons Expanded
*Vanilla Weapons Expanded - Quickdraw
*Vanilla Weapons Expanded - Laser
*Vanilla Weapons Expanded - Heavy Weapons
*Vanilla Weapons Expanded - Coilguns
*Vanilla Factions Expanded - Settlers
*Vanilla Weapons Expanded - Frontier
*Vanilla Factions Expanded - Mechanoids
*Vanilla Factions Expanded - Medieval
*No Lazy Doctors
*Quest Reward Rebalance
*Vanilla Traits Expanded
*Smarter Construction
*Dubs Performance Analyzer
*[FSF] More Quest
*Expanded Prosthetics and Organ Engineering - Forked
*RimSaves
*Startup impact
*Dire Raids
*RuntimeGC [1.3]
*Replace Stuff
*Snap Out!
*Pick Up And Haul
*RunAndGun
*Sparkling Worlds - Full Mod
*Animals Logic
*Vanilla Expanded - Royalty Patches
*Vanilla Furniture Expanded
*Vanilla Furniture Expanded - Medical Module
*No Shadows
*Repair Workbench
*No Debris
*Vanilla Apparel Expanded — Accessories
*Vanilla Fishing Expanded
*Vanilla Fishing Expanded - Fishing Treasures AddOn
*Vanilla Weapons Expanded - Tribal
*Vanilla Weapons Expanded - Non-Lethal
*Vanilla Social Interactions Expanded
*Vanilla Weapons Expanded - Makeshift
*Vanilla Factions Expanded - Vikings
*Vanilla Weapons Expanded - Grenades
*Vanilla Books Expanded
*Vanilla Factions Expanded - Insectoids
*Vanilla Furniture Expanded - Power
*Vanilla Furniture Expanded - Spacer Module
*No ZzZ
*Vanilla Furniture Expanded - Art
*Vanilla Furniture Expanded - Farming
*Vanilla Furniture Expanded - Production
*Vanilla Furniture Expanded - Security
*Vanilla Armour Expanded
*Vanilla Apparel Expanded
*No More Filth
*[SYR] Harvest Yield (1.3)
*Melee Psycasts
*Graphics Settings+
*Specialists Can Work!
*Ducks' No Limits - Ideology
*Go Explore!
*Stack XXL
*Faster Biosculpting Pod
*[FSF] Better Ancient Complex Loot
*Vanilla Plants Expanded
*RimThreaded

Try updating your Rimworld and validating files
seems like your issues are not related to rimthreaded


Update HHL chapter

Changes
The linear_solvers package within Terra will be deprecated. The code has now been moved to https://github.com/anedumla/quantum_linear_solvers. This PR updates the content from the textbook to point to the new repository instead of Terra.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Awesome!

Very cool project! Next up: JAX.js 😁
Also wanted to give you a heads up that the link to this repo in your announcement tweet is broken, so you may be getting fewer stars than you otherwise would have.

thank you so much!
and thanks for the heads up! X doesn't let me update the link :/
I quote tweeted but probably won't reach the same audience 🤷


Add wrapper for gbm_device_get_format_modifier_plane_count

I'm not sure what to do about the error type here. gbm_dri_get_format_modifier_plane_count does potentially return -1, but doesn't set errno.
Error handling generally looks like it could use some fixes in both gbm.rs and in Mesa...

I found myself needing this as well. What's left to be done here?

I'm not sure what to do about the error type here. gbm_dri_get_format_modifier_plane_count does potentially return -1, but doesn't set errno.

Maybe just put this into an Option then and parse every value <= 0 as None?
It seems reasonable that some modifiers (e.g. INVALID) don't have a defined plane count.

Closed via https://github.com/Smithay/gbm.rs/pull/46


documentation 1.7

Hi,
i have a project that i worked on last  year with the version 1.7 , know i want to use some of the ready code in it , the problem is i cant find the old documentation for the version 1.7 ?

It would require some time to track the specific commit. I would look back a year ago in commit history and look in usage docs. I can't remember, otherwise it might be gone since it might have been in the wiki' (no longer used)


Since v4.4.0, dropdown-item with "active" class without href attribute have black text on hover

Windows 10: Chrome, Firefox, IE, Edge
Bootstrap v4.4.1 test case: https://codepen.io/caseyjhol/pen/ExVoYGg

Click button
Hover over active item
Text is black

Bootstrap v4.3.1 test case: https://codepen.io/caseyjhol/pen/bGVabzZ

Click button
Hover over active item
Text is white

Caused by commit 970c41755a2bdd8f3a4f5dbee039ca7c2dc8b053 (#29140). Obviously a button element could be used instead, but it would potentially require changing a lot of markup, and any existing a styling would also have to be applied to button. An empty href tag could also be used, but that's technically invalid HTML. Perhaps an exception for links with the dropdown-item class could be added?

I couldn't reproduce with the latest v4-dev, soon to be v4.4.2
https://v4-dev--twbs-bootstrap.netlify.app/docs/4.4/dist/css/bootstrap.min.css

/CC @MartijnCuppens

I think in this case, since you're not using an href on the anchors, you should use the <button> element or add href="#". #29140 seems right given the comparison to the native browser styles. Thoughts from @twbs/css-review?

In theory, a link without href is valid and can be used like in the demo provided. We could do
a:not([href]):not([class]) {
  &,
  &:hover,
  &:focus {
  &:hover {
    color: inherit;
    text-decoration: none;
  }
}

which only removes the styles from links without href or class.

I'm okay with the not class addition there... it'd at least fix issues where things overlap with our components.

Hi @MartijnCuppens and @mdo, since Bootstrap 4.5.1, all my color links can't be overridden because you add :not([class]).
It would be better I think to add another case with :not([class]) if not it's too restrictive.
a:not([href]),
a:not([href]):not([class]) {
  &,
  &:hover,
  &:focus {
    &:hover {
      color: inherit;
      text-decoration: none;
    }
  }
}

For example, I can't color all my links once and add a custom class for each link separately:

   <--- since I have a class on the `<a>` my `text-muted` class on the `div` can't be applied, I need to add it to all my links with 4.5.1 :/
    <fa-icon [icon]="['fas', 'plus']"></fa-icon>

    <fa-icon [icon]="['fas', 'pencil-alt']"></fa-icon>

    <fa-icon [icon]="['fas', 'history']"></fa-icon>

    <fa-icon [icon]="['fas', 'trash-alt']"></fa-icon>

What do you think?

@Jukien, you should use a button instead of an  tag if you're handling things with js.

@MartijnCuppens thank you for your answer. A button comes with a different html layout (padding, border, outline).
What I have today (4.5.0):

When I replace  with <button>:

If I use a button link:

It's better but still need to:

overide the link color (blue) and add some more css to get my text-muted
the button is too big so add btn-sm but my icons will shrunk
add d-flex align-items-center to center all elements (title and buttons)

A button isn't as flexible as a link.

@MartijnCuppens thank you for your help. You're right.

it'd at least fix issues where things overlap with our components.

And break things, where it does not overlap with Bootstrap components.
I really don't understand how it makes sense that:
Something

and
Something

Behave differently. It just does not make sense and if the goal was to fix styling of Bootstrap components the fix should have probably been connected to such components classes, not the global reset styles.


Allow policies to be deleted via DELETE

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1435773
@miq-bot add-label api, bug
@miq-bot assign @abellotti

Thanks @imtayadeway for fixing this. can you add tests for POST action "delete" on /api/policies/:id as well as the bulk /api/policies since those would be enabled too. Thanks !!

🎵 to my ears.  Thanks @imtayadeway for fixing this.


Cannot make Email catch-all works in the intranet

ISSUE TYPE

Bug Report

Checklist

[x] .env file is attached
[ ] docker-compose.override.yml is attached (if it exists)
[x] Custom configs from cfg/ dir are attached (if customized)
[ ] docker-compose logs and log/ output is added
[x] I've looked through the docs: https://devilbox.readthedocs.io/en/latest/
[x] I've looked through existing issues: https://github.com/cytopia/devilbox/issues

OS / ENVIRONMENT

Host operating system and version: Win 10
(Windows) Native Docker or Docker Toolbox: Native Docker
Docker version: 18.06.1-ce-win73 (19507)
Docker Compose version: 1.22.0
What git commit hash are you on?:

SUMMARY
I cannot catch any email, not even a test one from the very same Email page.
Here the debug logs from the intranet.
STEPS TO REPRODUCE
No idea
EXPECTED BEHAVIOUR
Email catch-all working again.
ACTUAL BEHAVIOUR
Complete empty table list, and debug errors list in the footer section.
OTHER INFORMATION
Start command

$ docker-compose up mysql

.env
###
###  ---------------------------------------------------
###  D E V I L B O X   R U N - T I M E   S E T T I N G S
###  ---------------------------------------------------
###
###  All the following settings are applied during
###  $ docker-compose up
###
###  No need to rebuild any dockers!
###
###  For custom variables, scroll to the bottom
###

###
### Show all executed commands in each
### docker image during docker-compose up?
###
### 1: Yes
### 0: No
DEBUG_COMPOSE_ENTRYPOINT=1

###
### Log to file or Docker logs.
###
### Logging to file means log files are available under log/
### on your host operating system.
### Logging to Docker logs means log files are streamed to
### stdout and stderr.
###
### 1: Log to Docker logs
### 0: Log to file
###
DOCKER_LOGS=0

###
### Relative or absolute path to the devilbox repository.
### (Used as a prefix for all mount paths)
### There is no need to change this.
###
### The only exception is for OSX users wanting to use NFS
### mounts instead of Filesystem mounts due to degraded performance
### on OSX.
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
DEVILBOX_PATH=.

###
### At what IP address should the docker services listen
### on the Host computer?
###
### The specified default should be fine for Linux and OSX (<IP_ADDRESS>:).
### If you are on windows, you will probably have to change
### it to the IP address of the docker machine.
###
### a.) Leave blank, to listen on all interfaces (no trailing color ':')
###    LOCAL_LISTEN_ADDR=
### b.) If an IP is specified, note the trailing colon ':'
###    LOCAL_LISTEN_ADDR=<IP_ADDRESS>:
###
LOCAL_LISTEN_ADDR=

###
### This is the domain suffix your projects will be made available
### with mass-virtual-hosting.
### It is also required for the internal DNS server to be setup.
###
### Note: Only ALPHA ([a-zA-Z]+) characters are supported.
###
### Example:
###   TLD_SUFFIX=loc
### Makes your project available under xxxx.loc
###
### Example:
###   TLD_SUFFIX=local
### Makes your project available under xxxx.local
###
TLD_SUFFIX=loc

###
### Optional DNS configuration
### Allows you to add extra DNS records (above the wildcard entry)
### Useful if your host computer run other Docker services that you want to connect to or reach
### from within the Devilbox network by a custom hostname.
###
### Format:
### -------
### Resolve any custom defined hostname to an IP address (useable inside container and host os)
###     EXTRA_HOSTS=<hostname>=<ip>[,<hostname>=<ip>]
###
### Resolve any custom defined hostname to whatever IP address a CNAME resolves to
### (Useable inside the container and host OS).
### Note: CNAME must be resolvable by Google DNS
###     EXTRA_HOSTS=<hostname>=<CNAME>[,<hostname>=<CNAME>]
###
### Examples:
### ---------
### EXTRA_HOSTS=hostname.loc=<IP_ADDRESS>
### EXTRA_HOSTS=host.loc=<IP_ADDRESS>,host.example.org=<IP_ADDRESS>
EXTRA_HOSTS=

###
### Set your user id and group id
###
### This should be changed to the value of your local
### users uid and gid
###
### Type `id` on the terminal to find out your values
###
NEW_UID=1000
NEW_GID=1000

###
### Timezone for all dockers and service config files
###
TIMEZONE=Europe/Rome

################################################################################
###
### INTRANET SETTINGS
###
################################################################################

###
### TLD_SUFFIX domains are checked if they are set in the
### host computer /etc/hosts or available via attached DNS server.
### Timeout is done on vhosts.php (intranet) via ajax calls.
### In order to keep performance, set this to a low value.
### DNS checks might not succeed in time on slow machines.
### If DNS is valid, but timeout is expired, set this to a higher value.
###
### DNS_CHECK_TIMEOUT value is how many seconds to time out
### Default is to timeout after 1 second (DNS_CHECK_TIMEOUT=1)
###
DNS_CHECK_TIMEOUT=1

###
### Devilbox UI SSL Certificate generation
###
### When using SSL each certificate requires names for which it is responsible:
### Common Name as well as alternative names.
###
### Specify comma separated hostnames below by which you want to access the Devilbox.
### Those hostnames will be included in the SSL certificate for the Devilbox intranet.
### This has nothing to do for SSL certificates for projects, it is just for the intranet
### itself.
###
DEVILBOX_UI_SSL_CN=localhost,*.localhost,devilbox,*.devilbox

###
### Devilbox UI Password protection enable/disable (1/0)
###
### Set DEVILBOX_UI_PROTECT to 1 in order to password protect the
### intranet.
###
### Example:
###   DEVILBOX_UI_PROTECT=1
###   DEVILBOX_UI_PROTECT=0
###
DEVILBOX_UI_PROTECT=0

###
### Devilbox UI Password
###
### When DEVILBOX_UI_PROTECT=1, use the following password
### to log in. The password can always be changed.
### When changing the password, make sure to restart your
### PHP container.
###
### Example:
###   DEVILBOX_UI_PASSWORD=my-very-secure-password
###   DEVILBOX_UI_PASSWORD=Some pass with spaces
###
### The default username is 'devilbox'
###
DEVILBOX_UI_PASSWORD=password

###
### Enable the Devilbox Intranet?
###
### Example:
###   DEVILBOX_UI_ENABLE=1
###   DEVILBOX_UI_ENABLE=0
###
DEVILBOX_UI_ENABLE=1

################################################################################
###
### 1. Choose Images (Version)
###
################################################################################

###
### You can choose any combination of httpd, mysql, postgresql or php.
### Each of them are fully compatible between one another.
###

###
### 1.1 Choose PHP Server Image
###
### Note: PHP 5.2 is not officially supported. Intranet won't work (due to lack of namespace support).
###       PHP 5.2 only works with Apache 2.4, Nginx stable and Nginx mainline.
###       Use at your own risk.
 Host Mounts (Your computer)
###
################################################################################

###
### Global mount options
###
### Note: When adding custom mount options, ensure to start with a
###       leading ',' (comma), as those options are prepended to already
###       existing mount options.
###
### Note: If no mount options are specified, leave this variable empty
###       and do not add a leading ',' (comman).
###
### MOUNT_OPTIONS=,cached
### MOUNT_OPTIONS=
###
### Example: Allow to share mounts accross container with SELINUX enabled
###
### MOUNT_OPTIONS=,z
###
MOUNT_OPTIONS=

###
### Local filesystem path to www projects.
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
HOST_PATH_HTTPD_DATADIR=./../development/web

###
### Local filesystem path to mysql/mariadb datadir.
###
### This can be an existing mysql data directory or empty.
### If it already is a mysql data directory with content,
### it will be mounted into the docker and used.
###
### If this directory is empty, a new mysql database will be
### created.
###
### Note: Inside this path, a subdirectory with the mysql|mariadb
###       version will be created where the actual data resides.
###       This is to protect databases from being altered by
###       newer or older mysql|mariadb server versions.
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
HOST_PATH_MYSQL_DATADIR=./../development/db/mysql

###
### Local filesystem path to postgresql datadir.
###
### This can be an existing postgresql data directory or empty.
### If it already is a postgresql data directory with content,
### it will be mounted into the docker and used.
###
### If this directory is empty, a new postgresql database will be
### created.
###
### Note: Inside this path, a subdirectory with the postgresql
###       version will be created where the actual data resides.
###       This is to protect databases from being altered by
###       newer or older postgres server versions.
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
HOST_PATH_PGSQL_DATADIR=./../development/db/pgsql

###
### Local filesystem path to mongodb datadir.
###
### This can be an existing mongodb data directory or empty.
### If it already is a mongodb data directory with content,
### it will be mounted into the docker and used.
###
### If this directory is empty, a new mongodb database will be
### created.
###
### Note: When changing this variable you must re-create the container.
###       Simply remove it, it will be auto-created during the next start:
###
### $ docker-compose rm -f
###
HOST_PATH_MONGO_DATADIR=./../development/db/mongo

################################################################################
###
### 3. PHP Docker Settings
###
################################################################################

###
### Enable certain PHP modules which are not enabled by default
###
### Currently the only module that can be enabled is 'ioncube'
###
### PHP_MODULES_ENABLE=ioncube
###
PHP_MODULES_ENABLE=

###
### Disable any PHP modules that you don't require
###
### Specify a comma separated list without spaces of modules to disable
###
### PHP_MODULES_DISABLE=xdebug,imagick,swoole
###
PHP_MODULES_DISABLE=

###
### Configure everything else about PHP in
### * cfg/php-ini-X.X/*.ini
### * cfg/php-fpm-X.X/*.conf

################################################################################
###
### 4. HTTPD Docker Settings
###
################################################################################

###
### Expose HTTPD Port to Host
###
HOST_PORT_HTTPD=80
HOST_PORT_HTTPD_SSL=443

###
### Document Root Subdirectory
###
### In your project directory, which subfolder should
### serve your files?
###
### When changing this value, restart the devilbox.
###
HTTPD_DOCROOT_DIR=htdocs

###
### Per vHost Config Subdirectory
###
### In your project directory, which subfolder should
### hold apache, nginx templates for a customized vhost?
###
### When changing this value, restart the devilbox.
###
HTTPD_TEMPLATE_DIR=.devilbox

###
### Webserver timeout (in seconds) to upstream PHP-FPM server
###
### This value should be greater than PHP's max_execution_time,
### otherwise the php script could still run and the webserver will
### simply drop the connection before getting an answer by PHP.
###
HTTPD_TIMEOUT_TO_PHP_FPM=180

################################################################################
###
### 5. MySQL Docker Settings
###
################################################################################

###
### MySQL root user password
###
### If $HOST_PATH_MYSQL_DATADIR already contains an existing
### mysql datadir, enter the password for the existing mysql database
###
### If $HOST_PATH_MYSQL_DATADIR is empty, choose a new password that
### will be applied
###
MYSQL_ROOT_PASSWORD=

###
### Custom MySQL Runtime Settings
###
MYSQL_GENERAL_LOG=1

###
### Expose MySQL Port to Host
###
HOST_PORT_MYSQL=3306

################################################################################
###
### 6. PostgreSQL Docker Settings
###
################################################################################

###
### PostgreSQL 'root' user name (usually postgres)
###
PGSQL_ROOT_USER=postgres

###
### PostgreSQL 'root' user password
###
PGSQL_ROOT_PASSWORD=

###
### Expose PostgreSQL Port to Host
###
HOST_PORT_PGSQL=5432

################################################################################
###
### 7. Redis Docker Settings
###
################################################################################

###
### Expose Redis Port to Host
###
HOST_PORT_REDIS=6379

###
### Custom startup arguments
###
### Apply custom startup arguments to redis
###
### Example: Password protection
###   Add password protection to the Redis server by specifying it should
###   require a password.
###   Note: Do not add quotes or spaces to the password
###
###   REDIS_ARGS=--requirepass my-redis-root-password
###
### Example: Verbosity
###
###   REDIS_ARGS=--loglevel verbose
###
REDIS_ARGS=
#REDIS_ARGS=--loglevel verbose --requirepass my-redis-root-password

################################################################################
###
### 8. Memcached Docker Settings
###
################################################################################

###
### Expose Memcached Port to Host
###
HOST_PORT_MEMCD=11211

################################################################################
###
### 9. MongoDB Docker Settings
###
################################################################################

###
### Expose MongoDB Port to Host
###
HOST_PORT_MONGO=27017

################################################################################
###
### 10. Bind Docker Settings
###
################################################################################

###
### Expose Bind Port to Host
###
HOST_PORT_BIND=1053

###
### Add comma separated DNS server from which you want to receive DNS
### You can also add DNS servers from your LAN (if any are available)
###
BIND_DNS_RESOLVER=<IP_ADDRESS>,<IP_ADDRESS>

###
### Validate DNSSEC
###
### Values:
###  no:    DNSSEC validation is disabled
###  yes:   DNSSEC validation is enabled, but a trust anchor must be manually configured.
###  auto:  DNSSEC validation is enabled, and a default trust anchor for root zone is used.
###
BIND_DNSSEC_VALIDATE=no

###
### Bind timing options (time in seconds)
###
### Leave empty for defaults.
### Only change when you know what you are doing.
###
BIND_TTL_TIME=
BIND_REFRESH_TIME=
BIND_RETRY_TIME=
BIND_EXPIRY_TIME=
BIND_MAX_CACHE_TIME=

###
### Show DNS Queries in Docker logs output?
###
### 1: Yes
### 0: No
BIND_LOG_DNS_QUERIES=0

################################################################################
###
### 11. Custom variables
###
################################################################################

###
### Any variable defined in this file will be available
### as environment variables to your PHP/HHV Docker container.
###
### This might be useful to set application environment and retrieve
### them via: <?php getenv('MY_APPLICATION_ENV'); ?>
###

###
### Example:
### <?php echo getenv('Foo'); ?> would produce: 'some value'
###
#Foo=some value

cfg\php-ini-7.1\custom.ini
[PHP]
; Memory
; Note: "memory_limit" should be larger than "post_max_size"
memory_limit            = 512M

; Timeouts
max_execution_time = 120
max_input_time = 120

; Uploads
; Note: "post_max_size" should be greater than "upload_max_filesize"
post_max_size = 72M
upload_max_filesize = 64M
max_file_uploads = 20

; Vars
variables_order = EGPCS
max_input_vars = 8000
max_input_nesting_level = 64

; Error reporting
; Note: error_log is dynamic and handled during start to set appropriate setting
error_reporting = E_ALL | E_NOTICE | E_STRICT | E_DEPRECATED
xmlrpc_errors = Off
report_memleaks = On
display_errors = On
display_startup_errors = On
track_errors = On
log_errors = On
html_errors = On

The only thing I could imagine for is that the mail/ directory does not exist or has the wrong permission. Can you check in the Devilbox git directory if the mail dir is there and has permissions as shown in the screenshot (writeable by the user)

If it still doesnt work, try to give it write permissions for everyone (also all files inside that directory)

Hello there, the image i linked show the errors from the debug but I just understand that those exceptions are raised when I try to send a test email without filling the fields. Otherwise the debug list is 0.
So maybe as you said the problem is related to the permissions of the mail folder, but I did not understand how to check.
I'm on Windows 10, and check with right click on the folder and properties, and the checkbox value is black square (which means undefined). If I uncheck it nothing happens, and I I check again is again black square.
The only files inside the mail folder are .keepme and an empty devilbox file with no content/extension.
I'm  kinda lost here.
Thanks in advance for any help.

As you are on Windows I would suggest to check out a different branch which should fix a lot of issues regarding mounts/Volumes. The PR for that is here: https://github.com/cytopia/devilbox/pull/383
When doing this, first try to spin it up with minimum required containers and without any custom configuration and go step by step:
docker-compose stop
docker-compose rm -f

git fetch --all --prune
git checkout docker-volumes
git pull origin docker-volumes

docker-compose up php httpd bind

If the above Windows branch still does not work, then it might be related to the Docker version.
There seems to be an issue with Docker 18.06.1-ce, also reported by others here: https://github.com/cytopia/devilbox/issues/374
I would suggest to downgrade Docker back to 18.06.0-ce
However, as you are on Windows I would recommend to stay on the docker-volumes branch until it has been merged to master.

Ok thank you very much, I'll test it and report back.

Hello there, I just tried a few things:

docker-compose down my current devilbox
cloned and docker-composed docker-volumes and unfortunately the email catch-all behave the same (no email catched)
after that I tried downgrading to docker CE 18.06.0, and the catch-all seems to work with docker-volumes.
then I tried also with my current docker (main branch) with CE 18.06.0 and the result is that it didn't work.
finally I tried to remove some of my

I'm a bit confused, it seems to be partially due to docker version and partially to my current master devilbox config.

@masiorama thanks for digging into this.
There's currently a general issue with 18.06.1-ce. This however does not seem to affect everybody. I still couldn't figure out what exactly is misbehaving with that version.
Additionally when it comes to Windows, mounts a treated very differently, that's why I am in the middle of rewriting the mounts in question to Docker volumes.
So stick with docker-volumes branch, until it hits master and stay away from the new Docker version.

@masiorama
Intranet Email catch-all now has its own CI check against all PHP vs HTTPD versions and Docker vs Compose versions (latest five). See here: https://travis-ci.org/cytopia/devilbox/builds/465971267
This ensures compatibility against latest five Docker versions against latest five Compose versions for each and every PHP-FPM version. PR for that was here: https://github.com/cytopia/devilbox/pull/430/files#diff-3fac1a644d6e83bef0eca8aba4283dbaR1
However CI only tests against Linux (should be OS independent though)

Thanks, I'm gonna test it in the next days.

@masiorama does the release branch resolve your issue?

@cytopia sorry for the huge delay, I'm gonna check it right now and keep you posted.

If I'm not wrong, the branch to test is release/v1.0.0, right?
I cloned it and tested, but the behavior is the same as on the first comment (aka no email catched).

If I'm not wrong, the branch to test is release/v1.0.0, right?

Yes, that's the one.

I cloned it and tested, but the behavior is the same as on the first comment (aka no email catched).

Hmm, that's strange. Can you paste the PHP code that sends the email please.

I'm using the test mail accessible from localhost, no custom code at all.

That should work without any hassle. I even have CI tests on the email catch-all functionality of the intranet. The only thing I could currently think of is:

Diversion divergence of the .env file
Custom *.ini or *.fpm.conf

Can you diff your .env against the provided env-example and also check that no custom configs apply to php itself or php-fpm

To be sure it is not something I did with the customization I simply cloned the branch on an empty folder, did a cp env-example .env, and started devilbox docker-compose up mysql. That's all. I'm totally lost here  ^_^'

Could you run the following and see if it resolves it:
docker-compose stop
docker-compose stop rm -f
docker-compose up php httpd bind mysql

I did
docker-compose stop
docker-compose rm -f
docker-compose up php httpd bind mysql

ERROR: Pool overlaps with other one on this address space

OK, maybe the docker-compose rm -f part was never done (?) and you still had old container states? Is this fixed for you now?

Indeed it was never done recently. I tried with my other devilbox installation (v0.15) and unfortunately the mailcatch thing is not working, but on the release/v.1.0.0 it works perfectly, so I will switch to this installation and migrate all my projects there.
I'm gonna close the issue since the problem is solved.
Thank you very much for your assistance.

Ok, glad it works for you now. I will also update the documentation to emphasize the need todocker-compose rm -f.

@masiorama thanks again for this catch. I've updated the documentation accordingly and emphasized the importance of docker-compose rm in relevant sections:
https://github.com/cytopia/devilbox/pull/513/files

Relevant documentation:

https://devilbox.readthedocs.io/en/latest/getting-started/start-the-devilbox.html#stop-and-restart
https://devilbox.readthedocs.io/en/latest/maintenance/update-the-devilbox.html#stop-container
https://devilbox.readthedocs.io/en/latest/support/troubleshooting.html#what-to-always-do-first


Add latest version of Bootstrap

The latest version of Bootstrap is added.
This PR solves issue #118

can please check this issue @vinitshahdeo


fix(deps): update terraform terraform-ibm-modules/client-to-site-vpn/ibm to v2

This PR contains the following updates:

Package
Type
Update
Change

terraform-ibm-modules/client-to-site-vpn/ibm (source)
module
major
1.7.21 -> 2.0.2

Release Notes

terraform-ibm-modules/terraform-ibm-client-to-site-vpn (terraform-ibm-modules/client-to-site-vpn/ibm)
v2.0.2
Compare Source
Bug Fixes

deps: update terraform ibm to latest for deployable architectures (#333) (d40fde6)

v2.0.1
Compare Source
Bug Fixes

deps: updated required dependencies for DA (#334) (88d8f66)

v2.0.0
Compare Source
Features

complete refactor of the client to site DA for IBM catalog (#329) (6e03867)

BREAKING CHANGES

No upgrade path for the DA (which was only privately available anyway)

v1.7.24
Compare Source
Bug Fixes

deps: update terraform ibm to latest for the landing zone da extension (#332) (76def51)

v1.7.23
Compare Source
Bug Fixes

deps: update terraform ibm to latest for the landing zone da extension (#330) (3ed38a9)

v1.7.22
Compare Source
Bug Fixes

deps: update terraform ibm to latest for the landing zone da extension (#324) (bae9ca2)

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

/run pipeline

:tada: This PR is included in version 3.0.6 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


feat(app): create better custom error message from the provided input

related discussion https://github.com/fabian-hiller/valibot/discussions/361

Please explain this PR. With the changes we recently added, you can access the issue and therefore the current value. You should have everything you need to create rich error messages.

With the latest version you should be able to write the following. Try it out in our playground. I am currently rewriting Valibot and improving the types. I expect that // @ts-ignore (or any other workaround) will not be necessary in the next version.
import * as v from 'valibot';

const Schema = v.object(
  {
    initial: v.string(),
    options: v.array(v.string())
  },
  [
    v.custom(
      (input) => input.options.includes(input.initial),
      // @ts-ignore
      (issue) => `Scope: initial_value "${issue.input.initial}" must exist in options`
    )
  ]
);

@fabian-hiller ,
thanks it worked.


Cannot build the project, likely gotestfmt

I ma having the following error:
make
go install github.com/haveyoudebuggedit/gotestfmt/v2/cmd/gotestfmt@latest
# internal/unsafeheader
compile: version "go1.17" does not match go tool version "go1.18.1"
# internal/goexperiment
compile: version "go1.17" does not match go tool version "go1.18.1"
# math/bits
compile: version "go1.17" does not match go tool version "go1.18.1"
# internal/itoa
compile: version "go1.17" does not match go tool version "go1.18.1"
# internal/race
compile: version "go1.17" does not match go tool version "go1.18.1"
# runtime/internal/sys
compile: version "go1.17" does not match go tool version "go1.18.1"
# unicode/utf8
compile: version "go1.17" does not match go tool version "go1.18.1"
# unicode/utf16
compile: version "go1.17" does not match go tool version "go1.18.1"
# unicode
compile: version "go1.17" does not match go tool version "go1.18.1"
# encoding
compile: version "go1.17" does not match go tool version "go1.18.1"
# internal/abi
compile: version "go1.17" does not match go tool version "go1.18.1"
# sync/atomic
compile: version "go1.17" does not match go tool version "go1.18.1"
# internal/cpu
compile: version "go1.17" does not match go tool version "go1.18.1"
# runtime/internal/atomic
compile: version "go1.17" does not match go tool version "go1.18.1"
make: *** [Makefile:223: gotestfmt-install] Error 2

It seems the gotestfmt requires golang version 1.18. Can you have a look @tadayosi ?

Maybe the problem is in my hand... I do have 1.18 installed. I'll try to move back to 1.17 and inform here.

Confirmed to work with 1.17, sorry for the noise.


Flip camera icon is showing on firefox

Describe the bug
Flip camera icon is showing on firefox
To Reproduce
Steps to reproduce the behavior:

Run the app on firefox

Expected behavior
Flip camera icon should not show.
Screenshots

Environment (please complete the following information):

OS: MacOS 10.14.6
Browser: Firefox 75.0 (64-bit)
App Version: 0.1.0
SDK Version: 2.3.0
Node.js version: 12.14.1

Found this issue earlier myself.  This is occurring because FireFox on a Mac, unlike Chrome and Safari, returns a facingMode of user and the FlipCamera button is checking the track's stream for that property.  I do not know if this also occurs on Windows as well or just Mac.

Fix in https://github.com/twilio/twilio-video-app-react/pull/316


More of a question!

For the blast radius, i was wonder what was the max number to make it bigger? because i wanted to make sure if someone screws up by being next to a turret and it goes off. everyone ( or most everyone) inside the building gets blow up . Lol

I don't think there is a maximum on the blast radius. I do not quite know if it could kill everyone in the building as I am calling a game function that might not allow for this. If I had to guess, the explosion probably can't kill people through walls.

ah! as i guessed. thank you for your reply! and thank you for the funny mod, too! haha have a wonderful day!  <3


feat(matautocomplete): Make matautocomplete work with contenteditable

Feature Description
Currently [matAutocomplete] is only supported with text inputs. Using it with a div with contenteditable throws below error.
Can't bind to 'matAutocomplete' since it isn't a known property of 'div'.
Use Case
It will be useful to support autocomplete with custom inputs that uses contenteditable.
Example use case:

Open https://apic.app/online
In the welcome screen under I want to start with select API testing
In the request panel you will see few options like URL params, Headers, Body etc. Select Headers
The text boxes shown here are using contenteditable divs
Typing in a shows few suggestions but typing {{a}} uses contenteditable to highlight the values with custom styling

To save others from digging down into the link above to find this example. See above.

We talked about this and we decided not to support it, because we can't guarantee good accessibility when the autocomplete trigger is a contenteditable element. That being said, you should be able to do it yourself by creating your own autocomplete trigger directive that extends the Material one:
import {MatAutocompleteTrigger} from '@angular/material/autocomplete';

@Directive({
  selector: '[contenteditable][matAutocomplete]'
})
export class CustomAutocompleteTrigget extends MatAutocompleteTrigger {};


Win Python 3.10 error mentioning Python 2.7

Noticed here, the message looks like
Mamba failed to solve:
 - matplotlib-base
 - seaborn
 - numpy
 - pyresample
 - python_abi 3.10.* *_cp310
 - pandas
 - xarray
 - cartopy
 - dask
 - pydecorate
 - python >=3.10,<3.11.0a0
 - python-stratify

with channels:

The reported errors are:
- Encountered problems while solving:
-   - nothing provides vc 9.* needed by python-2.7.12-0

full log section

Interestingly, in https://github.com/conda-forge/monet-feedstock/pull/16 with the first failure, it was a different strange "nothing provides"
- nothing provides numpy 1.10* needed by cartopy-0.13.1-np110py27_0
(cartopy v0.13.1 is from Dec 2015)
but then the second time it was the same one as in the first comment here, i.e.
- nothing provides vc 9.* needed by python-2.7.12-0


Prepare release: v0.4.2

Automated changes by create-pull-request GitHub action

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (945db9b) 60.43% compared to head (94aba6f) 60.43%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1322   +/-   ##
=======================================
  Coverage   60.43%   60.43%
=======================================
  Files         226      226
  Lines       18777    18777
=======================================
  Hits        11347    11347
  Misses       7430     7430

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


[cpr] cpr outputs ZLIB::ZLIB in its IMPORTED_LINK_INTERFACE_LIBRARIES_

Is your feature request related to a problem? Please describe.
When I go to use CPR I get an error that I'm linking to ZLIB::ZLIB but that target was not found
Proposed solution
I suspect a find_dependency call is missing in cpr's port (it appears the entire install process is added by vcpkg)
Describe alternatives you've considered
Just calling find_package(ZLIB) in my buildsystem (should not be necessary )

Hi @barcharcraz, thanks for reporting this issue.
Which triplet do you use? And please provide your OS version and Compiler version.
Thanks.

OS version is windows 10 (latest stable I think), and x64-windows-static. Tried both VS 2019 preview and int preview.

Hi @barcharcraz, I have checked cpr source code and noticed that cpr has nothing to do with zlib.  Could you help us provide the steps to reproduce this issue or tell us how to use cpr on your local?
If possible, please provide your project case.
Thanks.

I suspect that zlib becomes involved because curl is using it for http compression support.
That's why you don't necessarily see zlib mentioned. I'll look into it more at some point and provide a reproduction project

OK steps to repro with vcpkg revision 34eff46c92019fe9e107779ec4b6ec3716194ab3
vcpkg.exe install cpr:x64-windows-static
Look in installed/x64-windows-static/share/cpr/cprTargets-release.cmake (or -debug)
Observe:
set_target_properties(cpr PROPERTIES
  IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "${_IMPORT_PREFIX}/lib/libcurl.lib;winmm;ws2_32;advapi32;crypt32;advapi32;ZLIB::ZLIB"
  IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/cpr.lib"
  )

That reference to ZLIB::ZLIB needs to be resolved by find_dependency_macro in the cprConfig.cmake template (also the cprConfig.cmake in the port directory should probably be cprConfig.cmake.in and be configured with configure_package_config_file

Thanks for your instant reply. Could you please remove "1" here
In your local installed/x64-windows-static/share/curl/CURLConfig.cmake file
include(CMakeFindDependencyMacro)
if()
  find_dependency(OpenSSL )
endif()
if(ON)
  find_dependency(ZLIB 1)
endif()

and try it again. I suspect that zlib version 1 cannot be found.

Sure, but that config file is unlikely to do anything with cmake <= 3.17 because the built in find module will be used instead. (3.17 updates that module to try config mode)

I cannot found ZLIB::ZLIB in my generated cprTargets-debug.cmake/cprTargets-release.cmake, here is the details:
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Debug".
#----------------------------------------------------------------

# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)

# Import target "cpr" for configuration "Debug"
set_property(TARGET cpr APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(cpr PROPERTIES
  IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG "${_IMPORT_PREFIX}/debug/lib/libcurl-d.lib"
  IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/debug/lib/cpr.lib"
  )

list(APPEND _IMPORT_CHECK_TARGETS cpr )
list(APPEND _IMPORT_CHECK_FILES_FOR_cpr "${_IMPORT_PREFIX}/debug/lib/cpr.lib" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

Can you provide the log VCPKG_PATH/buildtrees/cpr/config-x64-windows-static-out.log ?
Thanks,

config-x64-windows-static-out.log


feat: add token command

Closes # https://issues.redhat.com/browse/MGDSTRM-8103
Verification Steps
Run the following command
##Generate current user token
rhoas token

Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation change
[ ] Other (please specify)

Checklist

[X] Documentation added for the feature
[X] CI and all relevant tests are passing
[ ] Code Review completed
[ ] Verified independently by reviewer

FYI token we return is control plane token.
We could support dataplane token as well but I think it doesnt make sense now since we migrating out of that sso instance

Changing name in separate PR. All changes will be merged


BUG:

Is there an existing issue for this?

[X] I have searched the existing issues

What happened?
HOVER EFFECT OF SOCIAL MEDIA ICONS IN FOOTER SECTION IS NOT WORKING AND NOT ALLIGNED PROPERLY
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[X] I want to work on this issue

@arghadipmanna101  Hey
assign this issue to me
i will contribute to this issue
and try to fix it

@arghadipmanna101  please assign me GSSOC24 label and level label to me


Constraint can be animated?

Hi constraint change can be made with animation?

@boardmain
Sure :)
The way to animate constraints using autolayout is by calling layoutIfNeeded() in an animation block.
Below is an example :
image.height(100)

// And later on
image.heightConstraint?.constant = 200

// Animate if we want to
UIView.animateWithDuration(2) {
    self.layoutIfNeeded()
}

Hope it helps ;)

Great! Works like a charm. Thank you @s4cha!


FIx for #980: allow BulkInsert for sub-classes

So, Should.NotThrow wasn't the case, there are still intermittent faiures of tests in can_generate_database_objects_when_tenanted.
I see the same failures in #981, so I guess the problem isn't me - @jeremydmiller, your expert eye would be much appreciated when you get a chance :)
Marten.MartenCommandException : Marten Command Failure:
select public.mt_upsert_target(doc := :arg0, docDotNetType := :arg1, docId := :arg2, docVersion := :arg3, tenantid := :arg4)

42704: constraint "mt_doc_target_pkey" for table "mt_doc_target" does not exist
---- Npgsql.PostgresException : 42704: constraint "mt_doc_target_pkey" for table "mt_doc_target" does not exist
   at Marten.Services.ManagedConnection.handleCommandException(NpgsqlCommand cmd, Exception e) in C:\Data\Projects\OSS\marten\src\Marten\Services\ManagedConnection.cs:line 196
   at Marten.Services.ManagedConnection.Execute(NpgsqlCommand cmd, Action`1 action) in C:\Data\Projects\OSS\marten\src\Marten\Services\ManagedConnection.cs:line 217
   at Marten.Services.UpdateBatch.Execute() in C:\Data\Projects\OSS\marten\src\Marten\Services\UpdateBatch.cs:line 89
   at Marten.Services.UnitOfWork.ApplyChanges(UpdateBatch batch) in C:\Data\Projects\OSS\marten\src\Marten\Services\UnitOfWork.cs:line 156
   at Marten.DocumentSession.SaveChanges() in C:\Data\Projects\OSS\marten\src\Marten\DocumentSession.cs:line 307
   at Marten.Testing.MultiTenancy.can_generate_database_objects_when_tenanted.can_add_same_primary_key_to_multiple_tenant() in C:\Data\Projects\OSS\marten\src\Marten.Testing\MultiTenancy\can_generate_database_objects_when_tenanted.cs:line 49
----- Inner Stack Trace -----
   at Npgsql.NpgsqlConnector.<DoReadMessage>d__148.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
   at Npgsql.NpgsqlConnector.<ReadMessage>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Npgsql.NpgsqlConnector.<ReadMessage>d__147.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
   at Npgsql.NpgsqlDataReader.<NextResult>d__32.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.<Execute>d__71.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
   at Npgsql.NpgsqlCommand.<ExecuteNonQuery>d__84.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Npgsql.NpgsqlCommand.ExecuteNonQuery()
   at Marten.Services.UpdateBatch.<>c__DisplayClass23_2.<Execute>b__0(NpgsqlCommand c) in C:\Data\Projects\OSS\marten\src\Marten\Services\UpdateBatch.cs:line 97
   at Marten.Services.ManagedConnection.Execute(NpgsqlCommand cmd, Action`1 action) in C:\Data\Projects\OSS\marten\src\Marten\Services\ManagedConnection.cs:line 212

@cocowalla Meh, I'll give up and look at the multi-tenancy tests today. I pulled this into a local branch w/ just a little bit of change. Did need to add a test for doing the bulk insert against the subclass type though.

Pulled it in w/ a rebase. Thanks @cocowalla!


model.fit ValueError: I/O operation on closed file

Any idea what could be causing this error? I've been trying to solve this for a week. Thanks in advance.
Train on 60816 samples, validate on 15204 samples
Epoch 1/20
60816/60816 [==============================] - 19s - loss: 0.1665 - acc: 0.9597 - val_loss: 0.1509 - val_acc: 0.9605
Epoch 2/20
31200/60816 [==============>...............] - ETA: 8s - loss: 0.1583 - acc: 0.9600
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-4-e3590f9fe5e6> in <module>()
     16
     17 my_model = model.fit(train_x, train_y, batch_size=100, nb_epoch=20,
---> 18                      show_accuracy=True, verbose=1, validation_data=(test_x, test_y))
     19 score = model.evaluate(test_x, test_y, show_accuracy=True, verbose=0)
     20 print('Test loss:', score[0])

/usr/local/lib/python2.7/dist-packages/keras/models.pyc in fit(self, X, y, batch_size, nb_epoch, verbose, callbacks, validation_split, validation_data, shuffle, show_accuracy, class_weight, sample_weight)
    644                          verbose=verbose, callbacks=callbacks,
    645                          val_f=val_f, val_ins=val_ins,
--> 646                          shuffle=shuffle, metrics=metrics)
    647
    648     def predict(self, X, batch_size=128, verbose=0):

/usr/local/lib/python2.7/dist-packages/keras/models.pyc in _fit(self, f, ins, out_labels, batch_size, nb_epoch, verbose, callbacks, val_f, val_ins, shuffle, metrics)
    284                     batch_logs[l] = o
    285
--> 286                 callbacks.on_batch_end(batch_index, batch_logs)
    287
    288                 epoch_logs = {}

/usr/local/lib/python2.7/dist-packages/keras/callbacks.pyc in on_batch_end(self, batch, logs)
     58         t_before_callbacks = time.time()
     59         for callback in self.callbacks:
---> 60             callback.on_batch_end(batch, logs)
     61         self._delta_ts_batch_end.append(time.time() - t_before_callbacks)
     62         delta_t_median = np.median(self._delta_ts_batch_end)

/usr/local/lib/python2.7/dist-packages/keras/callbacks.pyc in on_batch_end(self, batch, logs)
    168         # will be handled by on_epoch_end
    169         if self.verbose and self.seen < self.params['nb_sample']:
--> 170             self.progbar.update(self.seen, self.log_values)
    171
    172     def on_epoch_end(self, epoch, logs={}):

/usr/local/lib/python2.7/dist-packages/keras/utils/generic_utils.pyc in update(self, current, values)
     59             prev_total_width = self.total_width
     60             sys.stdout.write("\b" * prev_total_width)
---> 61             sys.stdout.write("\r")
     62
     63             numdigits = int(np.floor(np.log10(self.target))) + 1

/usr/local/lib/python2.7/dist-packages/ipykernel/iostream.pyc in write(self, string)
    315
    316             is_child = (not self._is_master_process())
--> 317             self._buffer.write(string)
    318             if is_child:
    319                 # newlines imply flush in subprocesses

ValueError: I/O operation on closed file

I had the same problem (also with IPython), and I solved it by adding a time.sleep(0.1) the line just after model.fit. It seems Python (or just IPython?) needs a time before two fitting...

This looks like an IO bug with IPython, you might want to file a bug with
the devs. It seems to be triggered by the Keras progbar's use of sys.stdout.
On 3 April 2016 at 07:35, artix41<EMAIL_ADDRESS>wrote:

I had the same problem (also with IPython), and I solved it by adding a
time.sleep(0.1) the line just after model.fit. It seems Python (or just
IPython?) needs a time before two fitting...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/fchollet/keras/issues/2110#issuecomment-204989342

@fchollet yea that's what I found as well. Thanks for looking into it.

@fchollet Right, I'm experiencing the same with Spyder. With each epoch completes at 2s, it results on I/O operation error too. verbose = 0 do the trick.

@rilut thanks for the trick!!

@artix41 - Thanks! adding the time.sleep(0.1) worked for me

Instead of writing to sys.stdout directly, could those calls be wrapped on an auxiliary function with a try/catch block to help prevent the entire learning from breaking down if/when this happens?
Although it is clear this is not the best solution, I have to say it is very depressing to find that after 50h of training your model was lost simply because some text could not be printed :disappointed:
I am glad ModelCheckpoint works very well, though!

I get ethe same error when I am trying to call Convoluted Neural Network (CNN) via  Keras library using the best estimated GridSearchCV estimator..
I cannot set the verbose parameter to false false since it is called from via GridSearchCV and cannot set the time lag as well for the same reason..
I am pasting my code snippet for reference..
TODO: Import 'GridSearchCV' and 'make_scorer'
from sklearn.grid_search import GridSearchCV
from sklearn.metrics import make_scorer
import numpy
grid search epochs, batch size and optimizer
optimizers = ['rmsprop', 'adam']
init = ['glorot_uniform', 'normal', 'uniform']
epochs = numpy.array([50, 100, 150])
batches = numpy.array([5, 10, 20])
TODO: Create the parameters list you wish to tune
parameters = dict(optimizer=optimizers, nb_epoch=epochs, batch_size=batches, init=init)
TODO: Initialize the classifier
clf = KerasClassifier(build_fn=ConvulatedNeuralNet)
TODO: Make an f1 scoring function using 'make_scorer'
f1_scorer = make_scorer(f1_score, pos_label = 1)
TODO: Perform grid search on the classifier using the f1_scorer as the scoring method
grid_obj =  GridSearchCV(estimator=clf, param_grid=parameters, verbose = 0)
Get the estimator
#clf = grid_obj.best_estimator_
#Hot encode Yes,No to 1,0 else the library would throw error..
y_encoded = pd.DataFrame(y_all).replace(['yes', 'no'], [1, 0])
TODO: Fit the grid search object to the training data and find the optimal parameters
datasets = [train_test_split(X_all, y_encoded, train_size=x, test_size=95) for x in [100, 200, 300]]
for data in datasets:
X_train, X_test, y_train, y_test = data
grid_obj =  grid_obj.fit(X_train.as_matrix(), y_train.as_matrix())
time.sleep(0.1)

Where should I post  time.sleep(0.1), please give some example. I faced the same problem...

I don't think you can set the timeout if you are using GridSerachCV since the classifier is called from within GridSearchCV and not by the user...
I tried the katest version of IPython, released two days back, and still have this issue..
You can try few alternatives..

Reduce number of epochs and batch size.. This would reduce number of iterations and hence the number of log messages...

Change the development environment-- say PyCharm-- which is bug free...

I also have the same problem on IPython but it only arises if I do something on the notebook (create , delete, or modify a cell) during the execution of the fit function. Otherwise it works fine.

I fix this problem with adding %%capture as the first line of the cell

Any update on this?  I've been seeing the same problem on Windows 64 Anaconda 2.7 Jupyter Notebook and Lab.

@Givemeyourgits you may try to update jupyter notebook, current version is 4+ and someone says that the problem was fixed, didn't help for me. So I recommend to set verbose =0

Running latest version of Notebook for 2.7.x

As the IPython link says (https://github.com/ipython/ipython/issues/9168) this seems to be fixed in ipython trunk, but not yet in a released version (will be in version 4.4).
In the meantime, I've made a quick hack simply by wrapping the update() method in the keras ProgBar class in a simple try/except block. It seems to work (I don't get ValueError anymore and processes in Jupyter notebook finish correctly, event with verbose activated). Making a patch would be simple.

4.4 is out. Indeed fixed this.
conda install ipykernel to upgrade if you are on anaconda, like me.
I think this can be closed.

I just ran into this issue with ipykernel 4.4.1. I am working from this example with a 2gb csv file. I only get around 2-3m lines in before I get ValueError: I/O operation on closed file error.

I had this problem too and setting verbose=0 in the argument of model.fit() seems to have fixed it.

I use conda install ipykernel advised by @shachar-i, my problem is fixed.
Setting verbose=0 is not a good way.

Thanks @shachar-i , my problem fixed too. One point that may be helpful to others is that you need to check if your jupyter is installed by conda or pip. You can check with:
which jupyter
For me, I used pip to install jupyter, so use pip to install ipykernel as well:
pip install -U ipykernel

conda install ipykernel solved it for me too, thank @shachar-i and @jf003320018

I experienced too this problem. As workaround I set verbose=2 in the argument of model.fit() and it has fixed it.  Moreover setting verbose =2 at least logs the epoch and accuracy of the training compared to verbose = 0 which doesn't log anything.

I can confirm that verbose=2 fixes my case.

I can confirm that verbose=2 fixes my case.

how can solve this value error???

IndexError                                Traceback (most recent call last)
 in ()
32 time.sleep(0.1)
33
---> 34 model.fit(x=x, y=y, batch_size=32, epochs = 3, validation_split=0.1)
~\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
726         max_queue_size=max_queue_size,
727         workers=workers,
--> 728         use_multiprocessing=use_multiprocessing)
729
730   def evaluate(self,
~\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in fit(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, **kwargs)
222           validation_data=validation_data,
223           validation_steps=validation_steps,
--> 224           distribution_strategy=strategy)
225
226       total_samples = _get_total_number_of_samples(training_data_adapter)
~\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in _process_training_inputs(model, x, y, batch_size, epochs, sample_weights, class_weights, steps_per_epoch, validation_split, validation_data, validation_steps, shuffle, distribution_strategy, max_queue_size, workers, use_multiprocessing)
495                      'at same time.')
496
--> 497   adapter_cls = data_adapter.select_data_adapter(x, y)
498
499   # Handle validation_split, we want to split the data and get the training
~\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py in select_data_adapter(x, y)
645 def select_data_adapter(x, y):
646   """Selects a data adapter than can handle a given x and y."""
--> 647   adapter_cls = [cls for cls in ALL_ADAPTER_CLS if cls.can_handle(x, y)]
648   if not adapter_cls:
649     # TODO(scottzhu): This should be a less implementation-specific error.
~\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py in (.0)
645 def select_data_adapter(x, y):
646   """Selects a data adapter than can handle a given x and y."""
--> 647   adapter_cls = [cls for cls in ALL_ADAPTER_CLS if cls.can_handle(x, y)]
648   if not adapter_cls:
649     # TODO(scottzhu): This should be a less implementation-specific error.
~\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py in can_handle(x, y)
454     handles_y = True
455     if y is not None:
--> 456       handles_y = ListsOfScalarsDataAdapter._is_list_of_scalars(y)
457     return handles_x and handles_y
458
~\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py in _is_list_of_scalars(inp)
462       return True
463     if isinstance(inp, (list, tuple)):
--> 464       return ListsOfScalarsDataAdapter._is_list_of_scalars(inp[0])
465     return False
466
IndexError: list index out of range
i am also getting the same ..some one please help me...

how can solve this value error?

how can solve this value error?

getting error in the model.fit part of the code. showing value error: in user code. anyone knows the solution

how can solve this value error?

Did you find solution


Stacker with multiple surfaces-based bodies does not work

🔍 Before submitting the issue

[X] I have searched among the existing issues
[X] I am using a Python virtual environment

🐞 Description of the bug
If I have 1 body the stacker works
If I have two bodies stacker does not work.
📝 Steps to reproduce
here relevant files: CAD, script and Slides that show the issue
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
2023R2
🐍 Which Python version are you using?
3.10
📦 Installed packages
PyPrimeMesh

Please check that, the topology between multiple bodies there or not. If yes, please check the stacker orientation once

@hlee0122  @waltersma @ninad-kamat
Here the files https://ansys-my.sharepoint.com/:f:/p/giovanni_pappalardi/EkXnWOom01tFkP1IJ5Hhy8MBuVQoiei6d2N9BmucGb6_UA

Hi @giovannipappalardiansys,
This looks to be due to the lateral defeaturing tolerance you are using for creating the base face.  I see it is creating several more faces than I believe you are expecting due to the small tolerance it is picking up the variation in the curved edges between the upper and lower circular edges and creating very small sliver faces that fail to mesh successfully without cleanup.
I would suggest using a value in the region of 20% of your mesh size to avoid this for this case. Arbitrarily I used a value of 0.1 and this worked for me.
Hope this helps! Thanks

@waltersma
this solved the issues I have!
Thanks a lot!


Release v1.8.0

Fixes #
This is the PR for Release v1.8.0

I think this release is in the can.
@BDisp & @tznind - any objections with me merging this and releasing v1.8.0?