Add some testing code

Add some unit tests (using testthat) and examples in function documentation.

I've written some R functions to simulate the time-to-event data required. How do I download the latest version of the package so it can be installed on a Linux server? @gravesti  The zip file does not work.

@lisu-stats The easiest way will be with devtools:
devtools::install_github("CAM-Roche/RandomisedTrialsEmulation")

Thanks. I got the following error msg. Any suggestions?

devtools::install_github("CAM-Roche/RandomisedTrialsEmulation")
Downloading GitHub repo CAM-Roche/RandomisedTrialsEmulation@HEAD
Error: Failed to install 'RandomisedTrialsEmulation' from GitHub:
'local_makevars' is not an exported object from 'namespace:withr'

This is not directly related to our package. Perhaps try updating withr? install.packages('withr')

I am testing the 'initiators' function using new simulated data. For some reason, the treatment variables were not included in the final outcome model. It looks like the following code did not work.
if(is.na(model_var)){
if(use_censor == 0){
model_var = c("dose", "dose2")
}else{
model_var = "treatment"
}
}
Also, we should set 'use_censor=0, use_weight=0' for ITT analyses. But again no treatment variable appeared in the final outcome model. @RoonakR could you please have a look? Thank you!

@RoonakR @gravesti I got new error messages after updating the package.
initiators(data_path, id='ID', period='T', treatment='A0', outcome='Y', eligible ='eligible2',            model_switchd =c( 'X1', 'X2', 'X3', 'X4s'),            cov_switchd = c( 'X1', 'X2', 'X3', 'X4s'),            outcomeCov_var=c( 'X3', 'X4s'), outcomeCov =c( 'X3', 'X4s'),#model_var = c('assigned_treatment'),            include_expansion_time_case = 0,            use_weight=0, use_censor=0, case_control = 0, data_dir ="/TrialEmulation/", numCores = 1)
[1] "Start data manipulation"
[1] "Finish data manipulation"
[1] "Processing time of data manipulation:"
user  system elapsed
0.292   0.029   0.140
[1] "----------------------------"
[1] "Start data extension"
Error in expand_func(.SD, maxperiod, minperiod) :
function 'Rcpp_precious_remove' not provided by package 'Rcpp'
Timing stopped at: 0.387 0.01 0.194

Hi @RoonakR @lisu-stats
For testthat I think it is more mundane, mechanical things to make sure
that the package is functioning properly.
We can add some tests to make sure that the expanded data is identical to
what we expect (number of rows, number of columns, min/max period, number
of patient ids etc), that the model fits and gives the expected result.
Then when we make changes, we'll see more quickly if something has broken.
I've included a small dataset in the package and some example code. Maybe
it can be useful for the testing until we have code for generating data.
https://cam-roche.github.io/RandomisedTrialsEmulation/articles/Getting-Started.html
On Fri, 8 Oct 2021 at 11:02, Li Su @.***> wrote:

@RoonakR https://github.com/RoonakR @gravesti
https://github.com/gravesti Thanks, Roonak. What input is required for
'testthat'? I think we can test the effect of 'treatment' in ITT and
per-protocol analyses, and then the joint effects of 'dose' and 'dose2' in
as-treated analyses. However, we should note that the estimates won't have
a causal interpretation, because the outcome model is parameterized by
hazard ratios. To obtain absolute risk differences/ratios between treatment
groups, we need to do some post-processing of the parameter estimates.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/CAM-Roche/RandomisedTrialsEmulation/issues/15#issuecomment-938473708,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT6IXOGIFDTIG46NFNYEOY3UF2XQLANCNFSM5E5IKEWQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--
Isaac Gravestock, PhD
Data Scientist
Real World Data, PD Data Sciences
F.Hoffmann - La Roche Ltd
Tel:      (+41) 79 158 31 85
e-mail: @.*** @.***>

@lisu-stats I just created a small set of data in the style of the data I
have from the study. It does not contain meaningful information but can be
useful for testing the data handling functions.
On Fri, 8 Oct 2021 at 13:21, Li Su @.***> wrote:

@gravesti https://github.com/gravesti Where did you find the small
dataset? I've written some code to simulate data with similar structures in
observational cohorts. It is not finalized yet, but I can share so you can
have a look.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/CAM-Roche/RandomisedTrialsEmulation/issues/15#issuecomment-938562320,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT6IXOGNT32CDCUKJKYN633UF3H3RANCNFSM5E5IKEWQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

--
Isaac Gravestock, PhD
Data Scientist
Real World Data, PD Data Sciences
F.Hoffmann - La Roche Ltd
Tel:      (+41) 79 158 31 85
e-mail: @.*** @.***>

Thanks a lot, @RoonakR  It works now.

@RoonakR @gravesti
I am trying the package with the simulated data with censoring, but not sure if censoring was taken into account in the three types of analyses. I did not find the logistic model results for censoring in the 'weights_model.rda' file.
Here is the code:
`#### ITT analysis
initiators(data_path, id='ID', period='T', treatment='A0', outcome='Y', eligible ='eligible', cense = 'C',
outcomeCov_var=c( 'X1', 'X2','X3', 'X4', 'age_s'), outcomeCov =c('X1', 'X2', 'X3', 'X4', 'age_s'), model_var = c('assigned_treatment'),
cov_censed = c( 'X1', 'X2','X3', 'X4', 'age_s'), model_censed =c( 'X1', 'X2','X3', 'X4', 'age_s'),
include_expansion_time_case = 0,
use_weight=0, use_censor=0, case_control = 0, data_dir ="/project/lupus/TrialEmulation/", numCores = 1)
per-protocol analysis
initiators(data_path, id='ID', period='T', treatment='A0', outcome='Y', eligible ='eligible', cense = 'C',
model_switchd =c( 'X1', 'X2', 'X3', 'X4', 'age_s'),
cov_switchd = c( 'X1', 'X2', 'X3', 'X4', 'age_s'),
outcomeCov_var=c( 'X1', 'X2','X3', 'X4', 'age_s'), outcomeCov =c('X1', 'X2', 'X3', 'X4', 'age_s'), #model_var = c('assigned_treatment'),
cov_censed = c( 'X1', 'X2','X3', 'X4', 'age_s'), model_censed =c( 'X1', 'X2','X3', 'X4', 'age_s'),
include_expansion_time_case = 0,
use_weight=1, use_censor=1, case_control = 0, data_dir ="/project/lupus/TrialEmulation/", numCores = 1)`

@lisu-stats Indeed, you're correct. I will quickly update to save the models for censoring.

I've adding saving models in #28. They will be saved in "cens_models.rda".
@lisu-stats Can you please update and check?

@gravesti Thanks, I can see the censoring model results now.
There is a problem for the option 'include_followup_time_case = "quadratic". Using this option, only the quadratic term of the follow-up time was added, but we do need both the linear and quadratic terms.

@gravesti The SAS macro again gave errors when performing ITT and at-treated analyses, but gave almost the same results for per-protocol analyses, except that as mentioned above, in the R package I cannot include both linear and quadratic terms of the follow-up time in the outcome model.

@lisu-stats Can you try to include_followup_time_case = c("linear","quadratic") ?

@gravesti Thanks. It works now. The per-protocol analysis results are the same up to three decimal places. I've updated the code and datasets in the Google drive https://drive.google.com/drive/folders/1FB0jPayek4iJu6_yDqsCrLQAE_cYtMp2?usp=sharing
Thanks a lot for having a look at the errors of the SAS macro.

@lisu-stats I found that I can get the macro to run if I remove any records before a patient is eligible
PROC SQL;
 CREATE TABLE simdata_elig2 AS
 SELECT *
 FROM simdata_all
 INNER JOIN (SELECT DISTINCT id, MIN(T) as TMIN FROM simdata_all where eligible =1 GROUP BY id) AS A
 ON simdata_all.T >= A.TMIN and simdata_all.id = A.id;
QUIT;

%INITIATORS(datain=simdata_elig2, id=id, period=T, treatment=A0, outcome=Y, eligible=eligible,
                    model_switchn = ,
                    cov_switchn = ,      /* covariates to be used in logistic model for switching probabilities */
                    class_switchn = ,     /* class variables used in logistic model */

                    model_switchd = X1 X2 X3 X4 age_s,
                    cov_switchd =   X1 X2 X3 X4 age_s,      /* covariates to be used in logistic model for switching probabilities */
                    class_switchd =,      /* class variables used in logistic model */
                   outcomeCov= X1 X2 X3 X4 age_s,
                   outcomeCov_var =X1 X2 X3 X4 age_s,
                   use_censor = 0, use_weights=1,
                   pool_cense   = 0,

                   cense=C,
                   model_censed = X1 X2 X3 X4 age_s,
                   cov_censed   = X1 X2 X3 X4 age_s,      /* covariates to be used in logistic model for censoring weights */

                   include_expansion_time = 0, /* include for_period and for_period2 in switch models */
 					include_expansion_time_case = 0, /* include for period in model for outcome */
 					include_followup_time = 0 , /* include follow up time in switch model (based on for_period ) */
					include_followup_time_case = 1 /* include follow up time in model for outcome */

                   );

@gravesti Yes, now the SAS macro works now. I think this is due to some limits set for the arrays used in the SAS macro.
As the R package used all available data, the results were slightly different as the data for calculating the weights were different. I think we just need to point out this problem of the SAS macro.

@lisu-stats I checked back in the PDF documentation for the SAS macro and they do state that:

The first period of each person should be eligible (however eligibility is defined by the user).

I wonder if our R code is using records that it shouldn't be. Is it using data before a patient is in a trial? Would that be correct?

@gravesti OK, got it. I defined 'eligible' as 'haven't been treated, haven't had the event and age>=18'. So the first period of each person may not be eligible. We can simply remove those records in the simulated data.

@lisu-stats With the changes to allow splines, we lost the possibility to not include follow-up time or for_period in the final model. I have made this possible again.
include_expansion_time_case = 0 should now be written include_expansion_time_case = NA.
With this change, I can get the same results as SAS, if I filter out the ineligible rows as mentioned. I still need to investigate what is going on if we don't filter those rows, as the results are slightly different.

@gravesti Thanks. I've revised the R code so the records before a patient first become eligible are removed.  The R package and SAS macro had almost identical results.
I found that when calculating the weights for treatment switching and censoring, the per-protocol analysis had different fitted models than in the ITT and as-treated analyses. So I am wondering which records were used when estimating these weights in the per-protocol analysis? I thought the weights need to be estimated before doing data expansion and artificial censoring. @RoonakR

@lisu-stats @RoonakR
I can see in that some censoring occurs before the weights are calculated. This is before the expansion, so I'm not sure exactly how it works with different initial treatments in different periods. You can see the data used in sw_data.csv.
I suppose censoring needs to be calculated first because we are calculating the probability of being censored, right?
Here we see the censoring before the weighting:
https://github.com/CAM-Roche/RandomisedTrialsEmulation/blob/baa599fb7557a318fea081e31d9e4d5f7556ac45/R/data_manipulation.R#L119-L130

@lisu-stats @gravesti As I remember I did the order of processes exactly like the SAS macro but I can have a look at it when I have time in middle of working and final revision of my thesis.

@RoonakR @gravesti  No worries, Roonak. Please only have a look when you have time. Thanks.
The R package and SAS macro generate the same results. I am just curious how the weight models were fitted across different types of analyses.

@gravesti @RoonakR  had a look at the SAS macro for generating the weights. It appears that in a per-protocol analysis,  they would artificially censor the data first and then fit the models for treatment switching weights and censoring weights.  I think this is probably fine for treatment switching models, but I am not sure about censoring models because this mixed up actual censoring (due to dropout) and artificial censoring (due to treatment switching).

@lisu-stats @RoonakR I can see in that some censoring occurs before the weights are calculated. This is before the expansion, so I'm not sure exactly how it works with different initial treatments in different periods. You can see the data used in sw_data.csv.
I suppose censoring needs to be calculated first because we are calculating the probability of being censored, right?
Here we see the censoring before the weighting:
https://github.com/CAM-Roche/RandomisedTrialsEmulation/blob/baa599fb7557a318fea081e31d9e4d5f7556ac45/R/data_manipulation.R#L119-L130

@gravesti I suspect that the function 'censor_func' is for artificially censoring follow-up in the per-protocol analysis.  For dropout-related censoring, the observed data have been censored.
I will discuss with Shaun the censoring weights problem and let you know.

@gravesti @RoonakR
I went back to check the code for the SAS macro. For estimating the treatment switching weights and censoring weights in a per-protocol analysis,  they have chosen the follow-up visits that could be the first few visits before treatment switching in a potential emulated trial as well as the first visit where the treatment was switched. However, the data for these visits are not expanded. They are used collectively to estimate the weights.
So essentially, only relevant visits for the per-protocol analysis have been used to estimate the treatment switching and censoring weights.
I have discussed this with Shaun. We agree that it is fine to discard the visits after treatment switching for estimating censoring weights in a per-protocol analysis. Numerically the censoring weight models are only slightly different across the types of analyses.
For ITT analyses with censoring weights, we still need to specify use_weight=1, but we will leave blanks in the models for numerator and denominator of the treatment switching model. So effectively the treatment weights are equal to 1. The final weights will only be the censoring weights.

@RoonakR @gravesti   I found that the R package will use observations before patients first became eligible when estimating the censoring or treatment weights in ITT or as-treated analyses.  So we could state that users need to provide data where the first record of the patient should be the visit where the patient is eligible. Or we could add some code to delete the data before the first visit of being eligible and give users a warning of that.
The per-protocol analyses will pick up the relevant visits for estimating weights, so there is no problem for the per-protocol analysis.
When trying out the option ' include_regime_length = 1', the R package gives an error message, please see below. I think this option is to add the linear and quadratic terms of the follow-up time.
> initiators(data_path, id='ID', period='T', treatment='A0', outcome='Y', eligible ='eligible', cense = 'C',
+            model_switchd =c( 'X1', 'X2', 'X3', 'X4', 'age_s'),
+            cov_switchd = c( 'X1', 'X2', 'X3', 'X4', 'age_s'),
+            outcomeCov_var=c( 'X1', 'X2','X3', 'X4', 'age_s'), outcomeCov =c('X1', 'X2', 'X3', 'X4', 'age_s'), #model_var = c('assigned_treatment'),
+            cov_censed = c( 'X1', 'X2','X3', 'X4', 'age_s'), model_censed =c( 'X1', 'X2','X3', 'X4', 'age_s'),
+            include_expansion_time_case = 0, include_followup_time_case = c("linear", "quadratic"), include_regime_length = 1,
+            use_weight=1, use_censor=1, case_control = 0, data_dir ="/project/lupus/TrialEmulation/", numCores = 1)

[1] "Start data manipulation"
[1] "P(treatment=1 | treatment=0) for denominator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-2.4604  -0.8591  -0.4458   0.9445   2.4673

Coefficients:
                 Estimate Std. Error z value Pr(>|z|)
(Intercept)     -0.130585   0.105184  -1.241    0.214
X1               0.540338   0.111514   4.845 1.26e-06 ***
X2               0.548939   0.057620   9.527  < 2e-16 ***
X3              -0.100234   0.111313  -0.900    0.368
X4               1.009818   0.069111  14.612  < 2e-16 ***
age_s           -0.342854   0.064966  -5.277 1.31e-07 ***
time_on_regime   0.043727   0.085958   0.509    0.611
time_on_regime2 -0.002146   0.012850  -0.167    0.867
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2404.5  on 1763  degrees of freedom
Residual deviance: 1923.0  on 1756  degrees of freedom
AIC: 1939

Number of Fisher Scoring iterations: 4

[1] "P(treatment=1 | treatment=0) for numerator"
Error in terms.formula(formula, data = data) :
  invalid model formula in ExtractVars
Timing stopped at: 0.723 0.181 0.533`

@lisu-stats @RoonakR I've fixed the error with include_regime_length = 1.
I'll work on the code to add filtering for times before 1st eligibility. I don't think that this should be too hard.

@RoonakR @gravesti
Thanks, Isaac. There is no error message now. But the fitted models for treatment weights are not exactly what we expect.  The linear term and quadratic terms are not added to all treatment models.
> initiators(data_path, id='ID', period='T', treatment='A0', outcome='Y', eligible ='eligible', cense = 'C',
+            model_switchd =c( 'X1', 'X2', 'X3', 'X4', 'age_s'),
+            cov_switchd = c( 'X1', 'X2', 'X3', 'X4', 'age_s'),
+            outcomeCov_var=c( 'X1', 'X2','X3', 'X4', 'age_s'), outcomeCov =c('X1', 'X2', 'X3', 'X4', 'age_s'), #model_var = c('assigned_treatment'),
+            cov_censed = c( 'X1', 'X2','X3', 'X4', 'age_s'), model_censed =c( 'X1', 'X2','X3', 'X4', 'age_s'),
+            include_expansion_time_case = 0, include_followup_time_case = c("linear", "quadratic"), include_regime_length = 1,
+            use_weight=1, use_censor=1, case_control = 0, data_dir ="/project/lupus/TrialEmulation/", numCores = 1)
[1] "Start data manipulation"
[1] "P(treatment=1 | treatment=0) for denominator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-2.4552  -0.8635  -0.4412   0.9443   2.4494

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.10909    0.09882  -1.104    0.270
X1           0.54118    0.11148   4.855 1.21e-06 ***
X2           0.54916    0.05761   9.533  < 2e-16 ***
X3          -0.09662    0.11114  -0.869    0.385
X4           0.98864    0.06350  15.568  < 2e-16 ***
age_s       -0.32272    0.05977  -5.399 6.69e-08 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2404.5  on 1763  degrees of freedom
Residual deviance: 1923.7  on 1758  degrees of freedom
AIC: 1935.7

Number of Fisher Scoring iterations: 4

[1] "P(treatment=1 | treatment=0) for numerator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-1.1674  -1.1674  -0.7709   1.1874   2.2129

Coefficients:
               Estimate Std. Error z value Pr(>|z|)
(Intercept)    -0.02356    0.05806  -0.406    0.685
time_on_regime -0.25940    0.03242  -8.001 1.24e-15 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2404.5  on 1763  degrees of freedom
Residual deviance: 2326.6  on 1762  degrees of freedom
AIC: 2330.6

Number of Fisher Scoring iterations: 3

[1] "P(treatment=1 | treatment=1) for denominator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-2.6534  -0.7672   0.5100   0.7482   1.9177

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  1.11446    0.13626   8.179 2.87e-16 ***
X1           0.31872    0.13252   2.405   0.0162 *
X2           0.51643    0.06294   8.205 2.30e-16 ***
X3          -0.27596    0.12180  -2.266   0.0235 *
X4           1.00291    0.07587  13.219  < 2e-16 ***
age_s       -0.35171    0.06933  -5.073 3.92e-07 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1959.2  on 1693  degrees of freedom
Residual deviance: 1657.4  on 1688  degrees of freedom
AIC: 1669.4

Number of Fisher Scoring iterations: 4

[1] "P(treatment=1 | treatment=1) for numerator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-1.9164  -1.5445   0.7440   0.8138   0.8503

Coefficients:
               Estimate Std. Error z value Pr(>|z|)
(Intercept)     0.72725    0.09455   7.692 1.45e-14 ***
time_on_regime  0.10392    0.02834   3.667 0.000245 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1959.2  on 1693  degrees of freedom
Residual deviance: 1945.0  on 1692  degrees of freedom
AIC: 1949

Number of Fisher Scoring iterations: 4

@lisu-stats It should be fixed now.

@gravesti Thanks, Isaac. It works now.
I know it is a bit trivial because we don't need treatment weights in an ITT analysis. But for completeness, could you please check why in the linear and quadratic terms of time_on_regime did not show up in the denomenator model for the treatment weights, but were there in the numerator model.  If these terms are both in the denomenator and numerator, then they will be cancelled out and treatment weights=1. Thanks.
> initiators(data_path, id='ID', period='T', treatment='A0', outcome='Y', eligible ='eligible', cense = 'C',
+            outcomeCov_var=c( 'X1', 'X2','X3', 'X4', 'age_s'), outcomeCov =c('X1', 'X2', 'X3', 'X4', 'age_s'), model_var = c('assigned_treatment'),
+            cov_censed = c( 'X1', 'X2','X3', 'X4', 'age_s'), model_censed =c( 'X1', 'X2','X3', 'X4', 'age_s'), pool_cense=1,
+            include_expansion_time_case = 0,  include_followup_time_case = c("linear", "quadratic"), include_regime_length = 1,
+            use_weight=1, use_censor=0, case_control = 0, data_dir ="/project/lupus/TrialEmulation/", numCores = 1)
[1] "Start data manipulation"
[1] "P(treatment=1 | treatment=0) for denominator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
   Min      1Q  Median      3Q     Max
-1.027  -1.027  -1.027   1.336   1.336

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.36457    0.03801  -9.592   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 3874  on 2861  degrees of freedom
Residual deviance: 3874  on 2861  degrees of freedom
AIC: 3876

Number of Fisher Scoring iterations: 4

[1] "P(treatment=1 | treatment=0) for numerator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-1.1886  -1.0588  -0.8535   1.1663   1.9472

Coefficients:
                 Estimate Std. Error z value Pr(>|z|)
(Intercept)      0.026299   0.059140   0.445    0.657
time_on_regime  -0.326524   0.059024  -5.532 3.17e-08 ***
time_on_regime2  0.014560   0.009852   1.478    0.139
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 3874.0  on 2861  degrees of freedom
Residual deviance: 3767.7  on 2859  degrees of freedom
AIC: 3773.7

Number of Fisher Scoring iterations: 4

[1] "P(treatment=1 | treatment=1) for denominator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-1.5834  -1.5834   0.8199   0.8199   0.8199

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  0.91751    0.04619   19.86   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2748.6  on 2297  degrees of freedom
Residual deviance: 2748.6  on 2297  degrees of freedom
AIC: 2750.6

Number of Fisher Scoring iterations: 4

[1] "P(treatment=1 | treatment=1) for numerator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-1.8144  -1.4798   0.7794   0.9026   0.9026

Coefficients:
                Estimate Std. Error z value Pr(>|z|)
(Intercept)      0.47261    0.12979   3.641 0.000271 ***
time_on_regime   0.22853    0.08906   2.566 0.010286 *
time_on_regime2 -0.01358    0.01120  -1.213 0.225307
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 2748.6  on 2297  degrees of freedom
Residual deviance: 2721.9  on 2295  degrees of freedom
AIC: 2727.9

Number of Fisher Scoring iterations: 4

[1] "Model for P(cense = 0 |  X ) for denominator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-2.9549   0.2273   0.3545   0.5178   1.4186

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  1.26362    0.07943  15.908  < 2e-16 ***
X1           0.64733    0.09281   6.975 3.06e-12 ***
X2          -0.50390    0.04702 -10.717  < 2e-16 ***
X3           0.23564    0.09261   2.544   0.0109 *
X4          -0.08721    0.04661  -1.871   0.0613 .
age_s        0.91306    0.05643  16.181  < 2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 3685.1  on 5159  degrees of freedom
Residual deviance: 3196.3  on 5154  degrees of freedom
AIC: 3208.3

Number of Fisher Scoring iterations: 6

[1] "Model for P(cense = 0 |  X ) for numerator"

Call:
glm(formula = as.formula(formula), family = binomial(link = "logit"),
    data = data, control = parglm::parglm.control(nthreads = 4,
        method = "FAST"), method = parglm::parglm.fit, singular.ok = FALSE)

Deviance Residuals:
    Min       1Q   Median       3Q      Max
-2.0793   0.4946   0.4946   0.4946   0.4946

Coefficients:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)  2.03951    0.04362   46.76   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 3685.1  on 5159  degrees of freedom
Residual deviance: 3685.1  on 5159  degrees of freedom
AIC: 3687.1

Number of Fisher Scoring iterations: 4

@lisu-stats This should be correct now. There was an inconsistency in the logic for the numerator and denominator.

@gravesti Thanks, Isaac. I've updated the Google folder for the testing code and simulated datasets. https://drive.google.com/drive/folders/1FB0jPayek4iJu6_yDqsCrLQAE_cYtMp2?usp=sharing

@gravesti Hi, Isaac. I am trying the data example in the vignette and noticed that there are some syntax changes. However, I got the following error.
 > prep_data <- data_preparation(
+     data = trial_example,
+     id = "id",
+     period = "period",
+     eligible = "eligible",
+     treatment = "treatment",
+     outcome = "outcome",
+     model_var = "assigned_treatment",
+     outcome_cov = c("catvarA", "catvarB", "catvarC", "nvarA", "nvarB", "nvarC"),
+     numCores = 1,
+     data_dir = working_dir,
+     use_censor = 1,
+     use_weight = 1,
+     chunk_size = 500,
+     separate_files = TRUE,
+     switch_n_cov = ~ nvarA + nvarB
+ )
Error in data_preparation(data = trial_example, id = "id", period = "period",  :
  unused arguments (outcome_cov = c("catvarA", "catvarB", "catvarC", "nvarA", "nvarB", "nvarC"), switch_n_cov = ~nvarA + nvarB)

@lisu-stats I'll fix that straight away

Hi @lisu-stats this error looks like you need to reinstall the latest version of the package

@lisu-stats I've made a new issue to track this: #61


docs v0.5.0 updates base vars, bumps version

Coverage decreased (-0.06%) to 80.246% when pulling d09728a024f9f3263171a8cac86939c3e975f5f5 on mparke:adjust-base-path into 68efbc27ff2a568820a20792c75056fd34fefbb6 on linode:master.

Coverage decreased (-0.06%) to 80.246% when pulling d09728a024f9f3263171a8cac86939c3e975f5f5 on mparke:adjust-base-path into 68efbc27ff2a568820a20792c75056fd34fefbb6 on linode:master.

Coverage remained the same at 80.246% when pulling c4b60e7b0e3afe675ee154c907668f28275c4f60 on mparke:adjust-base-path into 7ac1fcc8d86eaf65eb2fc9f9c05ee01fd922052c on linode:master.

Coverage remained the same at 80.246% when pulling d9b6f72be13021899ba66855f1b328351b14ece1 on mparke:adjust-base-path into 9f59dda750f1c42e4000421bc295ae8493547796 on linode:master.

Coverage increased (+0.06%) to 80.302% when pulling d9b6f72be13021899ba66855f1b328351b14ece1 on mparke:adjust-base-path into 9f59dda750f1c42e4000421bc295ae8493547796 on linode:master.


List component accessibility issues

Description of the bug
There are multiple issues with our list component

Users cant navigate the radiobuttons using the arrow-keys
No focus visible on radio buttons
Radiobuttons are not grouped. This will confuse users as screen readers will say radiobutton 1 of 1.
"rader per side" is not connected to the label.

[ ] Consider recreating this with designsystem components.

Steps To Reproduce
Go to an app with a list and run accessiblity tests
Additional Information
No response

[ ] Add screenshots showing of the bugs @Febakke
[ ] Consider fixing excisting List or build new using designsystem components

Related to; #2373

@adamhaeger I tested issue #6 after it was updated to DS, and the issue is still there. I think we should retest all the issues and cross off ones that are fixed, and fix the ones that are still there.


Can't deploy Ingestion pipeline with Azure Key Vault Secret Manager

Affected module
Ingestion Framework
Describe the bug
Can't deploy pipeline while using Azure Key Vault secret manager because  "pydantic.error_wrappers.ValidationError: 1 validation error for AzureCredentials"
To Reproduce

Add managed Key Vault Secret Manager to the OM server
Add managed Key Vault Secret Manager to Airflow with DefaultAzureCredentials
Try to deploy pipeline to Airflow

Expected behavior
Pipeline should be created
Version:

OpenMetadata version: 1.3.2
OpenMetadata Ingestion package version: 1.3.2

Additional context
I tested - the server creates secrets correctly. But when I deploy them the following error pops out in the server:
[2024-04-17T12:02:26.064+0000] {deploy.py:72} DEBUG - Traceback (most recent call last):
  File "pydantic/main.py", line 522, in pydantic.main.BaseModel.parse_obj
TypeError: 'NoneType' object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.10/site-packages/openmetadata_managed_apis/api/routes/deploy.py", line 66, in deploy_dag
    deployer = DagDeployer(ingestion_pipeline)
  File "/home/airflow/.local/lib/python3.10/site-packages/openmetadata_managed_apis/operations/deploy.py", line 61, in __init__
    SecretsManagerFactory(
  File "/home/airflow/.local/lib/python3.10/site-packages/metadata/utils/singleton.py", line 28, in __call__
    cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.10/site-packages/metadata/utils/secrets/secrets_manager_factory.py", line 52, in __init__
    self.secrets_manager = self._get_secrets_manager(
  File "/home/airflow/.local/lib/python3.10/site-packages/metadata/utils/secrets/secrets_manager_factory.py", line 95, in _get_secrets_manager
    return AzureKVSecretsManager(secrets_manager_loader)
  File "/home/airflow/.local/lib/python3.10/site-packages/metadata/utils/singleton.py", line 28, in __call__
    cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
  File "/home/airflow/.local/lib/python3.10/site-packages/metadata/utils/secrets/azure_kv_secrets_manager.py", line 108, in __init__
    self.client = AzureClient(self.credentials).create_secret_client()
  File "/home/airflow/.local/lib/python3.10/site-packages/metadata/clients/azure_client.py", line 31, in __init__
    self.credentials = AzureCredentials.parse_obj(credentials)
  File "pydantic/main.py", line 525, in pydantic.main.BaseModel.parse_obj
pydantic.error_wrappers.ValidationError: 1 validation error for AzureCredentials
__root__
  AzureCredentials expected dict not NoneType (type=type_error)

which is weird because azure_lv_secrets_manager.py contains guard against "wrong config":

But it actually goes further and fails here:

So my guess would be that the metadata.generated.schema.security.credentials.azureCredentials makes Pydantic fail that object.

hi @Nemeczek thanks for the details. I think it might make sense to follow the conversation on Slack to get more info.
From top of mind, thinking if some creds might be missing in the configuration https://docs.open-metadata.org/v1.3.x/deployment/secrets-manager/supported-implementations/azure-key-vault
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_KEY_VAULT_NAME= <Key Vault Name>
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_TENANT_ID= <Tenant / Directory ID>
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_CLIENT_ID= <App Registration ID>
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_CLIENT_SECRET= <App Registration Secret>

If the issue persists and we identify it as a bug, we can reopen this.
thanks

hi @Nemeczek thanks for the details. I think it might make sense to follow the conversation on Slack to get more info.
From top of mind, thinking if some creds might be missing in the configuration https://docs.open-metadata.org/v1.3.x/deployment/secrets-manager/supported-implementations/azure-key-vault
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_KEY_VAULT_NAME= <Key Vault Name>
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_TENANT_ID= <Tenant / Directory ID>
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_CLIENT_ID= <App Registration ID>
AIRFLOW__OPENMETADATA_SECRETS_MANAGER__AZURE_CLIENT_SECRET= <App Registration Secret>

If the issue persists and we identify it as a bug, we can reopen this.
thanks

If I specify all of the creds then it won't be using DefaultAzureCredential


How to create a new JID accounts using stanza.io

Question: Is it possible to register new accounts using this API?
For example, http://node-xmpp.github.io/doc/nodexmppclient.html has a register:true option when creating the client which does that. I've floundering trying to figure out how to do it for stanz.io. Am I missing something?

@legastero is there a way to create a new XMPP account with stanza.io? I would like to remove my dependency on node-xmpp-client and standardize my app on stanza.io.

The building blocks to do it are there, but they aren't wired up to do in-band registration at the moment. They're there currently for dealing with registering with components & other services, not creating a brand new XMPP account.
Originally I purposefully left out in-band registration because it really shouldn't be used, due to spam problems that occur in the wild due to servers leaving in-band registration open, letting spammers create large amounts of accounts on demand from 'good' domains. It's best to just always use out-of-band registration to create accounts.
Or, if you just need lots of unique, temporary accounts, using SASL anonymous auth usually works great.
All of that said, I'll add in the hook to make in-band registration handleable.

It's totally great to get that architectural perspective. Thank you.

As all the same it is realized. What functions should I use?

The building blocks to do it are there, but they aren't wired up to do in-band registration at the moment. They're there currently for dealing with registering with components & other services, not creating a brand new XMPP account.
Originally I purposefully left out in-band registration because it really shouldn't be used, due to spam problems that occur in the wild due to servers leaving in-band registration open, letting spammers create large amounts of accounts on demand from 'good' domains. It's best to just always use out-of-band registration to create accounts.
Or, if you just need lots of unique, temporary accounts, using SASL anonymous auth usually works great.
All of that said, I'll add in the hook to make in-band registration handleable.

I think the demand huge for the support and why shouldn't the app developer decide to incorporate the registration or not? The library is great but this one essential feature is missing and I don't know how to proceed.. Now I have to use another library to do the in-band registration and it's a mess. Or at least you could provide a way how to build an xml stanza which is also a mess but at least a generic way.

I think the demand huge for the support

I've now had 4 people ask me about this in 8 years, so 🤷. There just are better ways to do what people usually want in-band registration for (e.g. SASL anonymous, or custom server auth plugins).

why shouldn't the app developer decide to incorporate the registration or not?

Sure. Everything needed is already there, so here's how an app can decide to allow it (with stanza@12):
client.registerFeature('inbandRegistration', 50, async (features, done) => {
    // Using 50 ensures we run before SASL (100)

    // Really should do stuff like inspecting for form vs old fields
    // vs out-of-band, etc.
    // And those might need to get presented to the user somehow, while we
    // have stream setup paused to process this.
    //
    // Up to you how to do it, but `registration` here has the info you need.
    const registration = await client.getAccountInfo(client.config.server);
    console.log(registration);

    // !!! Blindly assuming here we're going to just need username/password,
    //     and that they've already been configured.

    // Ensure we get username, password, etc, the same way that SASL auth does
    const credentials = await client.getCredentials();

    await client.updateAccount(undefined /* Registering a new account in-band */, {
        // Old style fields
        username: credentials.username,
        password: credentials.password,

        // Form style
        form: {
            fields: [
                {
                  name: 'FORM_TYPE',
                  type: 'hidden',
                  value: Stanza.Namespaces.NS_REGISTER
                },
                { name: 'username', value: credentials.username },
                { name: 'password', value: credentials.password }
            ]
        }
    });

    // Continue stream feature processing (SASL auth using the new account)
    done();
});

I think the demand huge for the support

I've now had 4 people ask me about this in 8 years, so 🤷. There just are better ways to do what people usually want in-band registration for (e.g. SASL anonymous, or custom server auth plugins).

why shouldn't the app developer decide to incorporate the registration or not?

Sure. Everything needed is already there, so here's how an app can decide to allow it (with stanza@12):
client.registerFeature('inbandRegistration', 50, async (features, done) => {
    // Using 50 ensures we run before SASL (100)

    // Really should do stuff like inspecting for form vs old fields
    // vs out-of-band, etc.
    // And those might need to get presented to the user somehow, while we
    // have stream setup paused to process this.
    //
    // Up to you how to do it, but `registration` here has the info you need.
    const registration = await client.getAccountInfo(client.config.server);
    console.log(registration);

    // !!! Blindly assuming here we're going to just need username/password,
    //     and that they've already been configured.

    // Ensure we get username, password, etc, the same way that SASL auth does
    const credentials = await client.getCredentials();

    await client.updateAccount(undefined /* Registering a new account in-band */, {
        // Old style fields
        username: credentials.username,
        password: credentials.password,

        // Form style
        form: {
            fields: [
                {
                  name: 'FORM_TYPE',
                  type: 'hidden',
                  value: Stanza.Namespaces.NS_REGISTER
                },
                { name: 'username', value: credentials.username },
                { name: 'password', value: credentials.password }
            ]
        }
    });

    // Continue stream feature processing (SASL auth using the new account)
    done();
});

Thanks but I'm not sure if I should a client with an anonymous connection to do the registration. It never stops at debugger. What I have so far is:
`
import * as stanza from 'stanza.io';
this.client = stanza.createClient({
username: this.username,
password: this.password,
sasl: "ANONYMOUS",
transport: 'websocket',
wsURL: 'ws://server_ip:7070/ws/'
});
this.client.registerFeature('inbandRegistration', 50, async (features, done) => {
  debugger;

  await this.client.updateAccount(undefined, {
    form: {
        fields: [
            {
              name: 'FORM_TYPE',
              type: 'hidden',
              value: 'jabber:iq:register'
            },
            { name: 'username', value: this.username },
            { name: 'password', value: this.password }
        ]
    }
});

 done();
});

`
Can you help me here?


Better error text for JSON syntax errors during schema parsing

I ran into an issue where a particularly large schema was not parsing due to a simple syntax error that was introduced mistakenly while working with it.  This was difficult to track down since the behavior in schema.go:929 meant that the json.SyntaxError was never handled and ultimately ends up returning the error from schema.go:976 indicating "Unknown type name:" followed by the entire body of the provided schema.
I am unsure the intention for schema.go:929 but I noticed that it was present in the original version of this library by @elodina.  Is there a reason that given an error returned while JSON unmarshaling the schema should still be passed on to schemaByType or is it safe to go ahead and handle the json error since it is not likely (or impossible) that it is a valid avro schema?
I made #14 that may help to show what change I am proposing and as a possible fix/enhancement in cases like this one.

I'm guessing given that the tests fail for TestPrimitiveSchema that this is my answer for why the json error is disregarded in ParseSchema.  Any thoughts on how to best proceed?

I updated the PR with a possible solution.  The primitives are handled as a special case in ParseSchema before JSON unmarshaling occurs.  Let me know what you think!


Join不支持子查询吗？

SELECT a.id,a.s_names,a.e_names,b.s_num FROM user_img_cls AS a LEFT  JOIN ( SELECT pid,count(id) as s_num FROM user_gif_bg_cls where is_open=1 GROUP BY pid ) AS b ON a.id = b.pid ORDER BY a.is_sort ASC
err = MasterDB.Select("a.id,a.s_names,a.e_names,b.s_num").Table("user_img_cls").Alias("a").
Join("LEFT ", []string{"( SELECT pid,count(id) as s_num FROM user_gif_bg_cls where is_open=1 GROUP BY pid )", "b"}, "a.id = b.pid").
OrderBy("a.is_sort ASC").Find(&list)

Not supported yet

还有如果使用这样的查询，	err = MasterDB.Sql("SELECT a.id,a.s_names,a.e_names,b.s_num FROM user_img_cls a LEFT JOIN ( SELECT pid,count(id) as s_num FROM user_gif_bg_cls where is_open=1 GROUP BY pid) b ON a.id=b.pid where 1=1 ORDER BY is_sort asc ").Find(&list)
count这个函数会被转义掉~~。

@zouhuigang the second one is a bug I think. Please fire another issue to describe it.

好的，谢谢。

duplicated with #575


docs: use the latest Discord logo

Things added/changed:

Use the latest Discord logo.

It appears the previous PR I made was in the readme of the repository itself and not the profile organization. 😅

Oki.. nice! :heart:


engine->framework roller blocked on analysis errors

   info â�¢ Missing case clauses for some constants in 'scrollToOffset' â�¢ packages/flutter/test/widgets/custom_painter_test.dart:382:7 â�¢ exhaustive_cases
   info â�¢ Missing case clauses for some constants in 'scrollToOffset' â�¢ packages/flutter/test/widgets/semantics_test.dart:546:7 â�¢ exhaustive_cases

example failure: https://github.com/flutter/flutter/runs/33509768772

cc @LongCatIsLooong

resolved


Redirection toggle in popup menu

It would be handy to be able to disable/enable redirection to the gateway quickly from the popup menu, like you can with the global toggle.

@swedneck  WIP in https://github.com/ipfs-shipyard/ipfs-companion/pull/687

Proposed toggle in action (https://github.com/ipfs-shipyard/ipfs-companion/pull/687#issuecomment-467243819):

@lidel I can't provide a better glyph right now but I don't thing it looks really good between the other two. The other are kind of circular, big, heavy. On the other hand, the middle one is just a plain icon. I'd, at least, put it into a circle to match the other two.

Cannot be unseen:

I am ded 😭 🤣

For what its worth the hatboi goes away if we add another (lighter) glyph.
If it is something with similar stroke weight, things look more balanced:

Thoughts?

i miss hatboi.
[redirect] [power] [settings] order wouldmake sense to me.  But i think you should give hatboi  a chance.

[redirect] [power] [settings]

After some additional reviews it seems that the icon is causing more confusion than it should.
As a part of updates in https://github.com/ipfs-shipyard/ipfs-companion/pull/687#issuecomment-469369693 I switched the global toggle icon to a static "Gateway Redirect" menu item with an explicit switch toggle:

redirect enabled
redirect disabled

Ready for testing: v<IP_ADDRESS>8 (Beta)


Fix and improve consistency of datastore examples

Remove the autoMark option from the Data stores section of README.md since it no longer seems to be a valid option. Likewise, remove the autoReconnect: true option since it defaults to true. The user can learn about the available options from the source code where they are documented.
Improve consistency between example-rtm-client-datastore.js and README.md.

Coverage remained the same at 76.597% when pulling 5b06ff93e3f54410b282177253db53cfa42c597c on fvargas:fix-datastore-examples into 43500e86af8155b6ea73bec929713a0a27622ec0 on slackhq:master.


Can't run Zsh

"apt-get install zsh" is ok
oh-my-zsh is ok
but when run :
compaudit:105: wait failed: invalid argument
compdef:95: wait failed: invalid argument
_update_zsh_update:1: wait failed: invalid argument
/root/.oh-my-zsh/oh-my-zsh.sh:3: wait failed: invalid argument

Sorry my english!

I have the same issue. Additionally, after every command in zsh I get the following error :zsh: wait failed: invalid argument. Here's a screenshot of the issue:

Fish works<EMAIL_ADDRESS>I know its not the same but at least it's something.

Ok, I've investigated the zsh failures and I've found the culprit. It's a long read, so bucle up.

First failure: wait3() with getrusage not properly implemented
After installing it with apt install zsh, here's what running zsh outputs:
root@localhost:~# zsh    <--- bash prompt
compaudit:105: wait failed: invalid argument
compdef:95: wait failed: invalid argument
localhost#     <--- zsh prompt

Those compaudit and compdef errors are thrown because compinit is run in /etc/zsh/zshrc. If I start zsh without loading startup files the errors don't show up anymore:
root@localhost:~# zsh -f
localhost#

and tracing the execution of those startup files with zsh -x show the errors happen in:

compaudit's getent (line 107):

+compaudit:103> local GROUP GROUPMEM _i_pw _i_gid
+compaudit:104> (( UID == EUID  ))
+compaudit:105> getent group root
+compaudit:105> IFS=: +compaudit:105> read GROUP _i_pw _i_gid GROUPMEM
compaudit:105: wait failed: invalid argument

- [compdef's `bindkey | read` (line 356)](https://github.com/zsh-users/zsh/blob/zsh-5.0.2/Completion/compinit#L356):

+compdef:94> [[ -n yes ]]
+compdef:95> bindkey '\e~'
+compdef:95> IFS=' 	' +compdef:95> read -A opt
compdef:95: wait failed: invalid argument

Those two lines have in common that a `fork()` has to happen: both **external and piped commands** are not properly exited (notice the `jobs` command shows weird results):

localhost# which ls
/bin/ls
localhost# ls
zsh: wait failed: invalid argument
localhost# jobs
zsh: wait failed: invalid argument
[1]    running    ls
[12]    running
[15]    running

Other commands, like `zsh` builtins (no fork), work correctly:

localhost# which pwd
pwd: shell built-in command
localhost# pwd
/root
localhost#

That said, the culprit seems to be some wait function: looking for the `wait failed` string in the zsh codebase we easily find it:

[`signals.c (line 482)`]( https://github.com/zsh-users/zsh/blob/zsh-5.0.2/Src/signals.c#L482):

```c
/* check for WAIT error */
if (pid == -1) {
  if (errno != ECHILD)
  zerr("wait failed: %e", errno);
  /* WAIT changed errno, so restore the original */
  errno = old_errno;
  break;
}

If we look up a little bit we find the call that sets the pid variable:
#ifdef HAVE_WAIT3
# ifdef HAVE_GETRUSAGE
  struct rusage ru;
  pid = wait3((void *)&status, WAITFLAGS, &ru);
# else
  pid = wait3((void *)&status, WAITFLAGS, NULL);
# endif
#else
# ifdef HAVE_WAITPID
  pid = waitpid(-1, &status, WAITFLAGS);
# else
  pid = wait(&status);
# endif
#endif

At this point I set up a test bench with those 4 calls to see which one fails and why.
You can look up the code at the following gist.
Here are the results:
# make test
./wait3_getrusage
wait failed: Invalid argument
make: [test] Error 22 (ignored)
./wait3
./waitpid
./wait

Furthermore, an strace of each executable shows (only relevant info shown):
# strace ./wait3_getrusage
wait4(-1, 0x7ff5fffef628, WNOHANG|WSTOPPED|WCONTINUED, 0x7ff5fffef630) = -1 EINVAL (Invalid argument)

# strace ./wait3
wait4(-1, 0x7ff5fffef6c8, WNOHANG|WSTOPPED|WCONTINUED, NULL) = -1 ECHILD (No child processes)

# strace ./waitpid
wait4(-1, 0x7ff5fffef6b8, WNOHANG|WSTOPPED|WCONTINUED, NULL) = -1 ECHILD (No child processes)

# strace ./wait
wait4(-1, 0x7ff5fffef6b8, WNOHANG|WSTOPPED|WCONTINUED, NULL) = -1 ECHILD (No child processes)

So it seems all 4 functions end up running the same wait4() syscall, with the exception that the first version passes a struct rusage to it while the rest set the parameter to NULL.
So, to conclude, #BashOnUbuntuOnWindows should properly implement that syscall or ignore the rusage parameter in a safe way.
Meanwhile, we can trick the zsh compilation to use one of the above calls that work correctly. To do so, follow the instructions of this gist.
Note there are several other things that don't work yet within zsh, like subshells and pipes. I'll document this on a later post.

First off: @mcornella, excellent write-up.  Thanks!
We have this one on our radar and will look into it.

@mcornella amazing write up! your gist also let me install zsh so thanks!!

I try build zsh from master branch follow @mcornella's guide at https://gist.github.com/mcornella/ef57daa66fa9c97aa221de0ad4ec77a9, but got same issue.
root@localhost:~# zsh compaudit:105: wait failed: invalid argument compdef:95: wait failed: invalid argument _update_zsh_update:1: wait failed: invalid argument /root/.oh-my-zsh/oh-my-zsh.sh:3: wait failed: invalid argument
My SHELL Path :
root@localhost:~# echo $SHELL /usr/bin/zsh

You probably still have the Ubuntu zsh installed. Try apt purge zsh zsh-common.

@mcornella  : finally when I call this command :
checkinstall -y --pkgname=zsh --pkgversion=$ZSH_VERSION --pkglicense=MIT make install install.info
I got bellow warning :
root@localhost:/mnt/c/zsh# checkinstall -y --pkgname=zsh --pkgversion=$ZSH_VERSION --pkglicense=MIT make install install.info

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 -  Maintainer: [ root@KIETVA-LT ]
1 -  Summary: [ Package created with checkinstall 1.6.2 ]
2 -  Name:    [ zsh ]
3 -  Version: [ 5.0.2 ]
4 -  Release: [ 1 ]
5 -  License: [ MIT ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ zsh ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ zsh ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue:

Installing with make install install.info...

========================= Installation results ===========================
make[1]: Entering directory `/mnt/c/zsh/Src'
make[2]: Entering directory `/mnt/c/zsh/Src'
make[3]: Entering directory `/mnt/c/zsh/Src/Builtins'
make[3]: Leaving directory `/mnt/c/zsh/Src/Builtins'
make[3]: Entering directory `/mnt/c/zsh/Src/Modules'
make[4]: Entering directory `/mnt/c/zsh/Src/Zle'
make[4]: `complete.mdh' is up to date.
make[4]: Leaving directory `/mnt/c/zsh/Src/Zle'
make[3]: Leaving directory `/mnt/c/zsh/Src/Modules'
make[3]: Entering directory `/mnt/c/zsh/Src/Zle'
make[3]: Leaving directory `/mnt/c/zsh/Src/Zle'
make[2]: Leaving directory `/mnt/c/zsh/Src'
rm -f stamp-modobjs.tmp
make[2]: Entering directory `/mnt/c/zsh/Src'
echo '' builtin.o compat.o cond.o exec.o glob.o hashtable.o hashnameddir.o hist.o init.o input.o jobs.o lex.o linklist.o loop.o math.o mem.o module.o options.o params.o parse.o pattern.o prompt.o signals.o signames.o sort.o string.o subst.o text.o utils.o watch.o >> ../Src/stamp-modobjs.tmp
make[3]: Entering directory `/mnt/c/zsh/Src/Builtins'
make[3]: Leaving directory `/mnt/c/zsh/Src/Builtins'
make[3]: Entering directory `/mnt/c/zsh/Src/Modules'
make[3]: Leaving directory `/mnt/c/zsh/Src/Modules'
make[3]: Entering directory `/mnt/c/zsh/Src/Zle'
make[3]: Leaving directory `/mnt/c/zsh/Src/Zle'
make[2]: Leaving directory `/mnt/c/zsh/Src'
`stamp-modobjs' is up to date.
/bin/sh ../mkinstalldirs /bin
/usr/bin/install -c  zsh /bin/zsh-5.0.2
if test -f /bin/zsh; then \
            rm -f /bin/zsh.old; \
            ln /bin/zsh /bin/zsh.old; \
        else :; fi
rm -f /bin/zsh.new
ln /bin/zsh-5.0.2 /bin/zsh.new
mv /bin/zsh.new /bin/zsh
make[1]: Leaving directory `/mnt/c/zsh/Src'
make[1]: Entering directory `/mnt/c/zsh/Src'
make[2]: Entering directory `/mnt/c/zsh/Src'
make[3]: Entering directory `/mnt/c/zsh/Src/Builtins'
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  rlimits.so /usr/lib/zsh/5.0.2/zsh/rlimits.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  sched.so /usr/lib/zsh/5.0.2/zsh/sched.so
make[3]: Leaving directory `/mnt/c/zsh/Src/Builtins'
make[3]: Entering directory `/mnt/c/zsh/Src/Modules'
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  attr.so /usr/lib/zsh/5.0.2/zsh/attr.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  cap.so /usr/lib/zsh/5.0.2/zsh/cap.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  clone.so /usr/lib/zsh/5.0.2/zsh/clone.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  curses.so /usr/lib/zsh/5.0.2/zsh/curses.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  datetime.so /usr/lib/zsh/5.0.2/zsh/datetime.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  example.so /usr/lib/zsh/5.0.2/zsh/example.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  files.so /usr/lib/zsh/5.0.2/zsh/files.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  langinfo.so /usr/lib/zsh/5.0.2/zsh/langinfo.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  mapfile.so /usr/lib/zsh/5.0.2/zsh/mapfile.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  mathfunc.so /usr/lib/zsh/5.0.2/zsh/mathfunc.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  newuser.so /usr/lib/zsh/5.0.2/zsh/newuser.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  parameter.so /usr/lib/zsh/5.0.2/zsh/parameter.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  regex.so /usr/lib/zsh/5.0.2/zsh/regex.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh/net
/usr/bin/install -c  socket.so /usr/lib/zsh/5.0.2/zsh/net/socket.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  stat.so /usr/lib/zsh/5.0.2/zsh/stat.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  system.so /usr/lib/zsh/5.0.2/zsh/system.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh/net
/usr/bin/install -c  tcp.so /usr/lib/zsh/5.0.2/zsh/net/tcp.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  termcap.so /usr/lib/zsh/5.0.2/zsh/termcap.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  terminfo.so /usr/lib/zsh/5.0.2/zsh/terminfo.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  zftp.so /usr/lib/zsh/5.0.2/zsh/zftp.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  zprof.so /usr/lib/zsh/5.0.2/zsh/zprof.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  zpty.so /usr/lib/zsh/5.0.2/zsh/zpty.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  zselect.so /usr/lib/zsh/5.0.2/zsh/zselect.so
make[4]: Entering directory `/mnt/c/zsh/Src/Zle'
make[4]: `complete.mdh' is up to date.
make[4]: Leaving directory `/mnt/c/zsh/Src/Zle'
make[4]: Entering directory `/mnt/c/zsh/Src/Zle'
make[4]: `complete.export' is up to date.
make[4]: Leaving directory `/mnt/c/zsh/Src/Zle'
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  zutil.so /usr/lib/zsh/5.0.2/zsh/zutil.so
make[3]: Leaving directory `/mnt/c/zsh/Src/Modules'
make[3]: Entering directory `/mnt/c/zsh/Src/Zle'
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  compctl.so /usr/lib/zsh/5.0.2/zsh/compctl.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  complete.so /usr/lib/zsh/5.0.2/zsh/complete.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  complist.so /usr/lib/zsh/5.0.2/zsh/complist.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  computil.so /usr/lib/zsh/5.0.2/zsh/computil.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  deltochar.so /usr/lib/zsh/5.0.2/zsh/deltochar.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  zle.so /usr/lib/zsh/5.0.2/zsh/zle.so
/bin/sh ../../mkinstalldirs /usr/lib/zsh/5.0.2/zsh
/usr/bin/install -c  zleparameter.so /usr/lib/zsh/5.0.2/zsh/zleparameter.so
make[3]: Leaving directory `/mnt/c/zsh/Src/Zle'
make[2]: Leaving directory `/mnt/c/zsh/Src'
make[1]: Leaving directory `/mnt/c/zsh/Src'
if test x/usr/share/zsh/functions != x && test x/usr/share/zsh/functions != xno; then \
          test x/usr/local/share/zsh/site-functions != xno && \
            /bin/sh ./mkinstalldirs /usr/local/share/zsh/site-functions; \
          sdir_top="." fndir="/usr/share/zsh/functions" dir_top="." \
          scriptdir="/usr/share/zsh/5.0.2/scripts" \
          FUNCTIONS_SUBDIRS="yes" \
          INSTALL_DATA="/usr/bin/install -c -m 644" \
          INSTALL_PROGRAM="/usr/bin/install -c" \
          DESTDIR="" VERSION="5.0.2" \
          /bin/sh ./Config/installfns.sh || exit 1; \
        fi; \
        exit 0
make[1]: Entering directory `/mnt/c/zsh/Doc'
/bin/sh ../mkinstalldirs /usr/share/man/man1
for file in zsh.1 zshbuiltins.1 zshcalsys.1 zshcompctl.1 zshcompwid.1 zshcompsys.1 zshcontrib.1 zshexpn.1 zshmisc.1 zshmodules.1 zshoptions.1 zshparam.1 zshroadmap.1 zshtcpsys.1 zshzftpsys.1 zshzle.1 zshall.1; do \
            test -s ./$file || exit 1; \
            /usr/bin/install -c -m 644 ./$file /usr/share/man/man1/`echo $file | sed 's|zsh|zsh|'` || exit 1; \
        done
make[1]: Leaving directory `/mnt/c/zsh/Doc'
make[1]: Entering directory `/mnt/c/zsh/Doc'
/bin/sh ../mkinstalldirs /usr/share/info
rm -rf infodir
mkdir infodir
if ( \
            sed '/^@setfilename/s|zsh|zsh|' \
                < ./zsh.texi > infodir/tzsh.texi && \
            (cd infodir && makeinfo tzsh.texi) && \
            for file in infodir/zsh.info*; do \
                /usr/bin/install -c -m 644 $file /usr/share/info || exit 1; \
            done \
        ); then \
            if /bin/sh -c 'install-info --version' >/dev/null 2>&1; then \
              install-info --info-dir=/usr/share/info \
                /usr/share/info/zsh.info; \
            else true; fi; \
            rm -rf infodir; \
            exit 0; \
        else \
            rm -rf infodir; \
            exit 1; \
        fi
tzsh.texi:433: warning: @item missing argument
tzsh.texi:1083: warning: @item missing argument
tzsh.texi:1654: warning: @item missing argument
tzsh.texi:14688: warning: @item missing argument
tzsh.texi:22648: @itemx must follow @item
tzsh.texi:23263: warning: @item missing argument
tzsh.texi:23408: warning: @item missing argument
tzsh.texi:23841: warning: @item missing argument
tzsh.texi:23869: warning: @item missing argument
tzsh.texi:24984: warning: @item missing argument
tzsh.texi:24987: warning: @item missing argument
tzsh.texi:24990: warning: @item missing argument
rm: cannot remove ‘infodir’: Directory not empty
make[1]: *** [install.info] Error 1
make[1]: Leaving directory `/mnt/c/zsh/Doc'
make: *** [install.info] Error 2

****  Installation failed. Aborting package creation.

Restoring overwritten files from backup...OK

Cleaning up...OK

Bye.

Could you tell me any idea can resole this problem ?

The checkinstall command also failed in my case but zsh was installed. I didn't have the time to figure out why though.

@at-kietva This failed for me too but if you type zsh when you first open the prompt,  I think it might work. At least that's what I had to do. It doesn't work by default though.

I've updated the initial gist to reflect this: https://gist.github.com/mcornella/ef57daa66fa9c97aa221de0ad4ec77a9#file-build-zsh-txt-L51-L55

Ok, I've made room for the second part of the report. This one is much shorter, and it's just the output of the make check commands failures. This is from the 5.0.2 version of zsh, so it is actually possible that another version reports more or less failures. Here goes:
Part 2: zsh failed tests
1. Process subsitution
That is, a simple cat <(echo foo | cat) fails. If I recall correctly, it also fails on bash. That uses FIFOs, so it might just be that, and its already a known issue by the BashOnWindows team.
./A02alias.ztst: starting.
This test hangs the shell when it fails...
Test ./A02alias.ztst failed: bad status 1, expected 0 from:
  print -u $ZTST_fd 'This test hangs the shell when it fails...'
  alias cat='LC_ALL=C cat'
  cat <(echo foo | cat)
Error output:
(eval):3: doesn't look like your system supports FIFOs.
Was testing: Alias expansion works at the end of parsed strings
./A02alias.ztst: test failed.

Test D03 is also skipped because of this:
./D03procsubst.ztst: starting.
./D03procsubst.ztst: skipped (process substitution is not supported)

2. Accessed time attribute not implemented?
This is part of a bigger test that tests a bunch of conditions but I'm focused on the atime attribute one because it's the one that errors out. The others are visible in the log as warnings. I'm not sure this is a very important feature though, but since it failed I'm reporting it.
The test is simple:
touch accessed not_accessed
sleep 2 && cat accessed
# the -N option means 'unread file'
[[ -N not_accessed && ! -N accessed ]]

This should return true but doesn't because the accessed file is reported as unread as well, given that the atime attribute is not actually updated when running the cat command.
./C02cond.ztst: starting.
Warning: Not testing [[ -b blockdevice ]] (no devices found)
Warning: Not testing [[ -f blockdevice ]] (no devices found)
Warning: Not testing [[ -p pipe ]] (FIFOs not supported)
Warning: Not testing [[ ! -r file ]] (root reads anything)
This test takes two seconds...
Test ./C02cond.ztst failed: bad status 1, expected 0 from:
  print -u $ZTST_fd 'This test takes two seconds...'
  sleep 2
  cat unmodified
  touch newnewnew
  if [[ $OSTYPE == "cygwin" ]]; then
    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported on Cygwin)"
    true
  elif [[ "$(find . -prune -fstype nfs 2>/dev/null)" == "." ]]; then
    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported with NFS)"
    true
  elif test -f /etc/mtab && { grep $(df . 2>/dev/null| tail -n1 | awk '{print $1}') /etc/mtab | grep -q noatime; }; then
    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported with noatime file system)"
    true
  else
    [[ -N newnewnew && ! -N unmodified ]]
  fi
Was testing: -N cond
./C02cond.ztst: test failed.
The following may (or may not) help identifying the cause:
  This test can fail on NFS-mounted filesystems as the access and
  modification times are not updated separately.  The test will fail
  on HFS+ (Apple Mac OS X default) filesystems because access times
  are not recorded.  Also, Linux ext3 filesystems may be mounted
  with the noatime option which does not update access times.
  Failures in these cases do not indicate a problem in the shell.

3. Completion test failed
This one I cannot figure out why it fails; it's probably nothing to do with #BashOnWindows but I'm putting it out here in case someone knows why it happens. It consists on a difference between what the completion returns and what it should return.
Here's the log:
./Y01completion.ztst: starting.
*** /tmp/zsh.ztst.out.13298     Mon Apr 11 15:45:09 2016
--- /tmp/zsh.ztst.tout.13298    Mon Apr 11 15:45:09 2016
***************
*** 1,7 ****
  line: {: }{}
  DESCRIPTION:{file}
- DI:{dir1}
- DI:{dir2}
  FI:{file1}
  FI:{file2}
  line: {: dir1/}{}
--- 1,5 ----
Test ./Y01completion.ztst failed: output differs from expected as shown above for:
  comptest $': \t\t\t\t\t\t\t'
Was testing: directories and files
./Y01completion.ztst: test failed.

Full log:
# make check
cd Test ; make check
make[1]: Entering directory `/root/dev/zsh/Test'
if test -n "gcc"; then \
          cd .. && DESTDIR= \
          make MODDIR=`pwd`/Test/Modules install.modules > /dev/null; \
        fi
if ZTST_testlist="`for f in ./*.ztst; \
           do echo $f; done`" \
         ZTST_srcdir="."
This test hangs the shell when it fails...
./A01grammar.ztst: all tests successful.
./A02alias.ztst: starting.
This test hangs the shell when it fails...
Test ./A02alias.ztst failed: bad status 1, expected 0 from:
  print -u $ZTST_fd 'This test hangs the shell when it fails...'
  alias cat='LC_ALL=C cat'
  cat <(echo foo | cat)
Error output:
(eval):3: doesn't look like your system supports FIFOs.
Was testing: Alias expansion works at the end of parsed strings
./A02alias.ztst: test failed.
./A03quoting.ztst: starting.
./A03quoting.ztst: all tests successful.
./A04redirect.ztst: starting.
./A04redirect.ztst: all tests successful.
./A05execution.ztst: starting.
./A05execution.ztst: all tests successful.
./A06assign.ztst: starting.
./A06assign.ztst: all tests successful.
./A07control.ztst: starting.
./A07control.ztst: all tests successful.
./B01cd.ztst: starting.
./B01cd.ztst: all tests successful.
./B02typeset.ztst: starting.
./B02typeset.ztst: all tests successful.
./B03print.ztst: starting.
./B03print.ztst: all tests successful.
./B04read.ztst: starting.
./B04read.ztst: all tests successful.
./B05eval.ztst: starting.
./B05eval.ztst: all tests successful.
./B06fc.ztst: starting.
./B06fc.ztst: all tests successful.
./B07emulate.ztst: starting.
./B07emulate.ztst: all tests successful.
./C01arith.ztst: starting.
./C01arith.ztst: all tests successful.
./C02cond.ztst: starting.
Warning: Not testing [[ -b blockdevice ]] (no devices found)
Warning: Not testing [[ -f blockdevice ]] (no devices found)
Warning: Not testing [[ -p pipe ]] (FIFOs not supported)
Warning: Not testing [[ ! -r file ]] (root reads anything)
This test takes two seconds...
Test ./C02cond.ztst failed: bad status 1, expected 0 from:
  print -u $ZTST_fd 'This test takes two seconds...'
  sleep 2
  cat unmodified
  touch newnewnew
  if [[ $OSTYPE == "cygwin" ]]; then
    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported on Cygwin)"
    true
  elif [[ "$(find . -prune -fstype nfs 2>/dev/null)" == "." ]]; then
    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported with NFS)"
    true
  elif test -f /etc/mtab && { grep $(df . 2>/dev/null| tail -n1 | awk '{print $1}') /etc/mtab | grep -q noatime; }; then
    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported with noatime file system)"
    true
  else
    [[ -N newnewnew && ! -N unmodified ]]
  fi
Was testing: -N cond
./C02cond.ztst: test failed.
The following may (or may not) help identifying the cause:
  This test can fail on NFS-mounted filesystems as the access and
  modification times are not updated separately.  The test will fail
  on HFS+ (Apple Mac OS X default) filesystems because access times
  are not recorded.  Also, Linux ext3 filesystems may be mounted
  with the noatime option which does not update access times.
  Failures in these cases do not indicate a problem in the shell.
./C03traps.ztst: starting.
This test takes at least three seconds...
This test, too, takes at least three seconds...
Another test that takes three seconds
./C03traps.ztst: all tests successful.
./C04funcdef.ztst: starting.
./C04funcdef.ztst: all tests successful.
./C05debug.ztst: starting.
./C05debug.ztst: all tests successful.
./D01prompt.ztst: starting.
./D01prompt.ztst: all tests successful.
./D02glob.ztst: starting.
./D02glob.ztst: all tests successful.
./D03procsubst.ztst: starting.
./D03procsubst.ztst: skipped (process substitution is not supported)
./D04parameter.ztst: starting.
./D04parameter.ztst: all tests successful.
./D05array.ztst: starting.
./D05array.ztst: all tests successful.
./D06subscript.ztst: starting.
./D06subscript.ztst: all tests successful.
./D07multibyte.ztst: starting.
Testing multibyte with locale en_US.UTF-8
    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported on Cy    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported with   elif test -f /etc/mtab && { grep $(df . 2>/dev/null| tail -n1 | awk '{print    print -u$ZTST_fd "Warning: not testing [[ -N file ]] (not supported with ./D07multibyte.ztst: all tests successful.a problem in the shell.esl
./D08cmdsubst.ztst: starting.
./D08cmdsubst.ztst: all tests successful.
./D09brace.ztst: starting.
./D09brace.ztst: all tests successful.
./E01options.ztst: starting.
This test hangs the shell when it fails...
./E01options.ztst: all tests successful.
./E02xtrace.ztst: starting.
./E02xtrace.ztst: all tests successful.
./V01zmodload.ztst: starting.
./V01zmodload.ztst: all tests successful.
./V02zregexparse.ztst: starting.
./V02zregexparse.ztst: all tests successful.
./V03mathfunc.ztst: starting.
./V03mathfunc.ztst: all tests successful.
./V04features.ztst: starting.
./V04features.ztst: all tests successful.
./V05styles.ztst: starting.
./V05styles.ztst: all tests successful.
./V06parameter.ztst: starting.
./V06parameter.ztst: all tests successful.
./V07pcre.ztst: starting.
Testing PCRE multibyte with locale en_US.UTF-8
./V07pcre.ztst: all tests successful.
./Y01completion.ztst: starting.
*** /tmp/zsh.ztst.out.13298     Mon Apr 11 15:45:09 2016
--- /tmp/zsh.ztst.tout.13298    Mon Apr 11 15:45:09 2016
***************
*** 1,7 ****
  line: {: }{}
  DESCRIPTION:{file}
- DI:{dir1}
- DI:{dir2}
  FI:{file1}
  FI:{file2}
  line: {: dir1/}{}
--- 1,5 ----
Test ./Y01completion.ztst failed: output differs from expected as shown above for:
  comptest $': \t\t\t\t\t\t\t'
Was testing: directories and files
./Y01completion.ztst: test failed.
./Y02compmatch.ztst: starting.
./Y02compmatch.ztst: all tests successful.
./Y03arguments.ztst: starting.
./Y03arguments.ztst: all tests successful.
**************************************
36 successful test scripts, 3 failures, 1 skipped
**************************************
make[1]: *** [check] Error 1
make[1]: Leaving directory `/root/dev/zsh/Test'
make: *** [check] Error 2

Thanks and Godspeed!

Fixed on internal builds.  I am not a zsh person so I have note tested everything, but:
 russ@RUSSALEX-DESK:~$ zsh
 russ@RUSSALEX-DESK ~ % ls -la
 total 84
 drwxr-xr-x 2 russ russ     0 Apr 27 01:00 .
 drwxr-xr-x 2 root root     0 Jan  1  1970 ..
 -rw------- 1 russ russ    24 Apr 26 19:04 .bash_history
 -rw-r--r-- 1 russ russ   220 Apr 26 19:03 .bash_logout
 -rw-r--r-- 1 russ russ  3636 Apr 26 19:04 .bashrc
 drwxrwxrwx 2 russ russ     0 Apr 26 19:22 bin
 -rw-rw-rw- 1 russ russ    48 Apr 26 19:24 .gitconfig
 -rw-rw-rw- 1 russ russ    16 Apr 26 19:11 .node_repl_history
 -rw-r--r-- 1 russ russ   675 Apr 26 19:03 .profile
 drwxrwxrwx 2 russ russ     0 Apr 26 19:07 projects
 drwxrwxrwx 2 russ russ     0 Apr 26 19:20 tmp
 -rw------- 1 russ russ   625 Apr 26 19:04 .viminfo
 -rw-rw-rw- 1 russ russ 35211 Apr 27 00:55 .zcompdump
 -rw------- 1 russ russ    49 Apr 27 01:00 .zsh_history
 -rw-r--r-- 1 russ russ  1295 Apr 27 00:56 .zshrc
 russ@RUSSALEX-DESK ~ %

Can you try Oh My Zsh?

@russalex is there any rough estimation when this build might be coming to an Insider Build?

Hi @russalex, thank you for the update. 2 things:
First, do you know when's the soonest time end users can get the fix? If not, do you know where we can look at the deployment schedule for updates?
And second, could you run the following test to see if process substitution works on the fixed version?
cat <(echo it works | cat)

Thanks a lot!

For what it's worth, process substitution under bash is being investigated with issue #266 .  I don't know how zsh does process substitution but would assume that they're related.

Sorry for the late replies here.
@cH40z-Lord, I wish I could give more information on the schedule.  Unfortunately I can not.  Best I can say is to stick on the Insider Fast right to get things as quickly as possible.
@AngeloG, Never tried myzsh before so this will not be a fair test.  It did install with no errors but I do not believe the prompt displayed correctly:
➜  ~
For fun, I set my theme to random.  Some look to work while others fail with errors like:
russ@RUSSALEX-DESK:~$ zsh
[oh-my-zsh] Random theme '/home/russ/.oh-my-zsh/themes/trapd00r.zsh-theme' load
d...
prompt_jnrowe_precmd:3: command not found: zsh_path
russ@RUSSALEX-DESK:-> (0)
>

My suggestion on this one would be to start a new issue here (and possibly on our uservoice page) when the zsh fixes go out.
@kameleon83 mcornella , @benhillis is talking about process substitution on #266 (as @aseering points out).  Looks like we still have the same bug under zsh

@russalex that's a known issue on ohmyzsh. Some themes require loading plugins, which is not done automatically, so random doesn't really work reliably.
@AngeloG as far as I've tested, most of ohmyzsh should work ok, except where process substitution is used. Some plugins may not work as well, but that's a bigger testing effort that I can't do right know. If in the future something doesn't work you can always open an issue on the official repo and I'll do my best to help.

And is nice to remember that even in Linux/Mac, Oh My Zsh uses patched fonts for some of the themes.

+1

Hello guys,
With the new update of Windows build 14342, zsh working properly.
Oh My Zsh also works.
It's awesome.

@kameleon83 Thank you for confirming!  Please do let us know if you encounter unexpected behavior with zsh or OhMyZsh.

@benhillis Of course. I will do it ;-)

so and how to run this by default? chsh doesn't do anything. always have to run zsh as user. strange thing, as root it get's executed by default

@lama0900 Hello just write in ".bashrc"
exec zsh

thank you 👍 . is that behaviour different from "proper" ubuntu?

It is still in beta. We must send the bug to insider hub. I did not do it.
After I use archlinux Ubuntu and not usually so uncertain behavior of it
P.S.: Sorry for my english. I'm french and I translate by google

@kameleon83 thank you anyway. at least, working for me! 👍

@lama0900 @kameleon83 On native Ubuntu it's the login process that decides which shell to launch.  It queries the /etc/passwd file and invokes your default shell (which can be modified by chsh).  Currently we do not run the Ubuntu login process and launch /bin/bash directly.
This has been suggested on our user voice forum, I would encourage you to upvote that thread to help us prioritize what our team works on in the future.

@kameleon83  Not work on 10342

@falltodis 10342 or 14342?

@kameleon83  Sorry! It's 14342

Can confirm this works now on the latest build! :+1:

Has anyone figure out how to get the correct patched fonts for Oh My Zsh themes?
My looks like this -

Hello, I use oh-my-zsh with the theme "ys"

@johnkchiu I'd assume you'd likely need to install Powerline patched fonts?

@johnkchiu I got it working by installing newest release of Conemu https://github.com/Maximus5/ConEmu/releases/tag/v16.05.15 and ensuring Powerline was installed.
sudo pip install powerline-status
https://powerline.readthedocs.io/en/latest/installation/linux.html#installation-on-linux

ComEmu + Powerline fonts helped, but I'm still getting some unresolved chars.  Thanks for the tip.

Closing this issue out since zsh now works. Feel free to continue the discussion here though!

@brianjking I followed your steps and the fonts still don't render with ConEmu 160619 and sudo pip install powerline-status
# zsh --version
zsh --version
zsh 5.1.1 (x86_64-ubuntu-linux-gnu)

# lsb_release -a
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04 LTS
Release:        16.04
Codename:       xenial

Has anyone successfully rendered the agnoster theme on Xenial?

I figured it out. You have to clone https://github.com/powerline/fonts then manually double click and install one of the Powerline fonts. After configuring ConEmu, then the symbols will display.

@bootstraponline wiki config worked for me, was having the font problem as well. Cheers!


How do you request series/monies

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Maybe I’m missing something, but I’m not finding explicit instructions on using Plex/Trakt/Overseerr and how they should work together.
Adding a series in Overseerr is supposed to do what, add a watchlist item in Plex?


Feature: Send Task failed mail to app owner

Is your feature request related to a problem? Please describe.
Featurerequest. Bigger Qlik Sense environments have separated admins and Developer, therefore most of the task failed notification mails can only be forwarded to the Developer.
Describe the solution you'd like
Butler 4.2 has an amazing flexibility for failed Task notification.What we miss: the right Person (App Owner=App Developer) needs this information, not only the Qlik Sense admin.
Describe alternatives you've considered
Hope for new Qlik Sense Upgrade with this feature...
Additional context
Qlik Sense with AD Connected have this information synced.
https://help.qlik.com/en-US/sense-developer/September2020/Subsystems/ProxyServiceAPI/Content/Sense_ProxyServiceAPI/ProxyServiceAPI-Session-Module-API-User-Get.htm

Good idea, I like it.
We can get the app owner from Qlik Sense, but we won't have his/her email address.
It's just not part of what Qlik Sense stores about users.
So... I am not sure how this could be done, except by having a separate lookup table/file, where Qlik Sense userIDs are mapped against their email addresses. Would certainly work, but require some additional configuration.
Or do you have any other ideas re this?

Our active users are synced with Active Directory.(user directory connectors in qlik sense) Qlik stores this informations in the user properties.
There are 3 Types of userproperties:

Qlik Sense specific Custom Properties. (Defined in the custom properties section)
Email
Active Directory Groups

Qlik stores this information, if it is connected to ldap or AD and this information is available.

You're right - this is available in the Sense repository for user
directories synched with an Active Directory instance.
Soo.... looks like it would be possible to send emails to app owners, at
least to those app owners for which there is an email address in the Sense
repository.
Things will be different for other user sources (like Azure, Google, Okta,
Facebook, Twitter or whatever ppl out there use to authenticate with
Sense..).
Ideally a solution would cater for those alternative authentication sources
too.
Will take some thinking, this.
On Mon, 7 Dec 2020 at 08:36, ot3kcw6c<EMAIL_ADDRESS>wrote:

Our active users are synced with Active Directory.(user directory
connectors in qlik sense) Qlik stores this informations in the user
properties.
There are 3 Types of userproperties:

Qlik Sense specific Custom Properties. (Defined in the custom
properties section)
Email
Active Directory Groups

Qlik stores this information, if it is connected to ldap or AD and this
information is available.
[image: image]
https://user-images.githubusercontent.com/61137563/101322272-09139f80-3867-11eb-9b36-8c4b6243d240.png
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ptarmiganlabs/butler/issues/105#issuecomment-739731840,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAH3JDXI7JY7DXMCKH3UOCTSTSAWRANCNFSM4UNCAILQ
.

@ot3kcw6c,
I just wanted to give some heads up that I am working on this feature, with the goal of including it in a coming Butler 5.0 release.
The config file gives an idea of how the feature will work:
emailNotification:
    enable: true
    reloadTaskAborted:
      enable: true
      appOwnerAlert:
        enable: true              # Should app owner get notification email (assuming email address is available in Sense user directory)
        includeOwner:
          includeAll: true
          user:
            - directory: <Sense user directory name>
              userId: <Sense userId>
        excludeOwner:
          user:
            - directory: <Sense user directory name>
              userId: <Sense userId>
      rateLimit: 15               # Min seconds between emails for a given taskID. Defaults to 5 minutes.
      headScriptLogLines: 15
      tailScriptLogLines: 25
      priority: high              # high/normal/low
      subject: 'Qlik Sense reload aborted: "{{taskName}}"'
      bodyFileDirectory: config/email_templates
      htmlTemplateFile: aborted-reload
      fromAdress: Qlik Sense (no-reply<EMAIL_ADDRESS>      toAdress:
        -<EMAIL_ADDRESS>        -<EMAIL_ADDRESS>
So, the idea is that on the highest level you can toggle on/off sending alert emails to app owners.
This can be done independently for task failures and aborted tasks (i.e. running tasks aborted from the QMC or via APIs).
There are also include/exclude lists that deal with the fact that some app owners maybe shouldn't be notified.
Maybe system apps are owned by some service account that shouldn't get notifications.
If includeAll: true is set, all app owners will be notified, except those listed under excludeOwner.
If includeAll: false you can instead set that specific app owners should be notified. In this scenario it doesn't make much sense to also specify an exclude list, but it's still possible.
I felt this was a reasonable starting point.
As for future enhancements I am thinking along the lines of using RegEx for specifying app include/exclude app owners, and being able to specify what apps should be included/excluded.
Makes sense?

Closing this as the feature has been implemented and will be included in coming 5.0 version.
Feel free to re-open if needed.


NIFI 1.16.3 An error has occurred during metrics gathering

Hi @msiedlarek , thanks a lot for your job.
I'm upgrade nifi to 1.16.3 version, and after that the exporter stop work with this error message:
An error has occurred during metrics gathering:

4 error(s) occurred:
* error collecting metric Desc{fqName: "nifi_conn_flow_files_queued", help: "The number of FlowFiles that are currently queued in the connection", constLabels: {}, variableLabels: [node_id connection_name connection_id group_id source_name destination_name]}: Invalid JSON response from NiFi: invalid character '<' looking for beginning of value
* error collecting metric Desc{fqName: "nifi_pg_component_count", help: "The number of components in this process group.", constLabels: {}, variableLabels: [group status]}: Invalid JSON response from NiFi: invalid character '<' looking for beginning of value
* error collecting metric Desc{fqName: "nifi_counter_total", help: "The value of the counter.", constLabels: {}, variableLabels: [node_id id context name]}: Cannot retrieve metrics for node '': Invalid JSON response from NiFi: invalid character '<' looking for beginning of value
* error collecting metric Desc{fqName: "nifi_info", help: "NiFi version info.", constLabels: {}, variableLabels: [node_id version]}: Invalid JSON response from NiFi: invalid character '<' looking for beginning of value

I think something change at response from Nifi, can you please check it?

Did you resolve it?


Espionage report visibility based on espionage level

Merge Request: Espionage Report Visibility Based on Espionage Level
Overview:
This merge request introduces logic to determine the visibility of information in espionage reports based on the difference in espionage levels between the attacker and the defender:

Espionage Report Visibility Logic:
Implemented functionality to adjust the visibility of fleet, defense, buildings, and research in espionage reports according to the number of probes sent and the difference in espionage technology levels.

Testing:

Verified that the espionage report displays the correct information based on the difference in espionage levels.
Ensured that the functionality works correctly for both higher and lower espionage levels.

Next Steps:

[ ] Code review and merge upon approval.

Note:

Further tweaks might be necessary based on additional feedback or testing results.

Related Issue:

Closes #201

LGTM, merging!
PS: I didn't know of the existence for @forelse, nice to know that now 😄!

As an addition it would be nice to add a feature test for the espionage logic behaviour to help with potential refactoring later. I added a new separate issue for this which can be implemented later: #319.


implied yield with comma-separated expressions

It would be nice if implied yield worked for comma-separated expressions a la
... | {a:this},{b:this} | ...

Moved from: https://github.com/brimdata/brim/issues/2161

Still with us as of Zed commit 9c0f097.
$ zq -version
Version: v1.2.0-49-g9c0f0973

$ seq 1 | zq -z 'yield {a:this},{b:this}' -
{a:1}
{b:1}

$ seq 1 | zq -z '{a:this},{b:this}' -
zq: error parsing Zed at column 9:
{a:this},{b:this}
    === ^ ===


CPU CFS quota fails if comounted controller order from /proc/self/cgroup does not match /sys/fs/cgroup

Environmental Info:
K3s Version:
N/A
Node(s) CPU architecture, OS, and Version:
N/A
Cluster Configuration:
N/A
Describe the bug:
Copied from rancher/rke2#689:

On CentOS7 (cgroups v1) RKE2 incorrectly disables CFS, starting kubelet with --cpu-cfs-quota=false. (The message "... level=warning msg="Disabling CPU quotas due to missing cpu.cfs_period_us" is observed in the RKE2 log; issued here). As a result kubelet does not configure CPU limit enforcement. This likely also affects K3S, and other 3.10.x Kernel -based distributions, but I have only tested with RKE2 (v1.19.7+rke2r1) / CentOS7 (3.10.0-1127.19.1.el7.x86_64).
The underlying problem is likely in K3S (where it has been diagnosed once, but not yet fixed). K3S/RKE2 checkCgroups logic in the agent, responsible for determining CFS capability, expects the relevant entry in /proc/{pid}/cgroup file to have systems part with cpu (e.g. cpu,cpuacct) that matches the name of folder in /sys/fs/cgroup. This is not the case in CentOS7 (and possibly other 3.10.0 -based distros?), where /proc/{pid}/cgroup files have cpuacct,cpu entry, but /sys/fs/cgroup has cpu,cpuacct folder (order reversed).

Steps To Reproduce:

Installed K3s:

Expected behavior:
CFS quota is enabled
Actual behavior:
CFS quota is not enabled
Additional context / logs:

Not quite sure how to cause the controller order to be different between the two locations - I've never seen it myself.

In Centos7, I see the order being different on both the latest master commit (5749f66aa3c469b4c744caab1878c6967ac08041) and on v1.19.7+k3s1. In both cases I get the following:
$ grep cpu /proc/self/cgroup
8:cpuset:/
2:cpuacct,cpu:/

$ ls -lad /sys/fs/cgroup/*cpu*
lrwxrwxrwx. 1 root root 11 Feb 16 20:50 /sys/fs/cgroup/cpu -> cpu,cpuacct
lrwxrwxrwx. 1 root root 11 Feb 16 20:50 /sys/fs/cgroup/cpuacct -> cpu,cpuacct
drwxr-xr-x. 4 root root  0 Feb 16 20:50 /sys/fs/cgroup/cpu,cpuacct
drwxr-xr-x. 3 root root  0 Feb 16 20:50 /sys/fs/cgroup/cpuset

However, on v1.19.7+k3s1 I see the warning message in the logs: level=warning msg="Disabling CPU quotas due to missing cpu.cfs_period_us", whereas on the latest master commit I do not see this. Furthermore, on v1.19.7 the kubelet starts with the following (notice --cpu-cfs-quota=false), whereas this is not the case (the argument is not present at all) on latest master commit:
level=info msg="Running kubelet --address=<IP_ADDRESS> --anonymous-auth=false --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=cgroupfs --client-ca-file=/var/lib/rancher/k3s/agent/client-ca.crt --cloud-provider=external --cluster-dns=<IP_ADDRESS> --cluster-domain=cluster.local --cni-bin-dir=/var/lib/rancher/k3s/data/30740d1d67da51fe92b10367ecce4d580e552c634ad4a6c4dd13297ffd1f3edd/bin --cni-conf-dir=/var/lib/rancher/k3s/agent/etc/cni/net.d --container-runtime-endpoint=/run/k3s/containerd/containerd.sock --container-runtime=remote --containerd=/run/k3s/containerd/containerd.sock --cpu-cfs-quota=false --eviction-hard=imagefs.available<5%,nodefs.available<5% --eviction-minimum-reclaim=imagefs.available=10%,nodefs.available=10% --fail-swap-on=false --healthz-bind-address=<IP_ADDRESS> --hostname-override=[REDACTED] --kubeconfig=/var/lib/rancher/k3s/agent/kubelet.kubeconfig --node-labels= --pod-manifest-path=/var/lib/rancher/k3s/agent/pod-manifests --read-only-port=0 --resolv-conf=/etc/resolv.conf --serialize-image-pulls=false --tls-cert-file=/var/lib/rancher/k3s/agent/serving-kubelet.crt --tls-private-key-file=/var/lib/rancher/k3s/agent/serving-kubelet.key"

For the above reasons, I believe this is fixed in k3s and will be present in v1.20.3+k3s1 and later.


Update featureUpdateTime pattern regex

Update featureUpdateTime pattern regex
Regex breakdown

Regex
Element
Range

^
Start of the string
N/A

([1-9]\d{3})
Year
1000-9999

-(0[1-9]|1[0-2])
Month
01-12

-(0[1-9]|[12]\d|3[01])
Day
01-31

T([01]\d|2[0-3])
Hours
00-23

:([0-5]\d)
Minutes
00-59

:([0-5]\d|60)
Seconds
00-59 or 60 (to accomodate leap second)

(\.\d{1,3})?
Miliseconds
none or 0 to 999 (0-3 decimal precision)

(Z|[-+]([01]\d|2[0-3]):[0-5]\d)
Timezone
Z for UTC or -24:59 to +24:59

$
End of the string
N/A

Not covered with regex validation
This pattern does not validate correctness of timestamps for

Month-Day combination: 2024-04-31T12:00:00Z is accepted
Validity of date for leap year: 2023-02-29T12:00:00Z is accepted
Validity of date for leap second: 2024-01-15T12:00:60Z is accepted
Validity of timezone offset: 2024-01-01T12:00:00-14:00 is accepted

Testing

Added examples and counterexamples
Ran overture schema unit tests

# (Mac) Prerequisite install Homebrew
# Install Golang
> brew install go
# Install YAML processor CLI tool (yq)
> brew install yq
# If not already, add go bin to your path
> export PATH="$PATH":$HOME/go/bin
# Install json schema CLI tool (jv)
> go install github.com/santhosh-tekuri/jsonschema/cmd/jv@latest
# Check if jv if available
> jv --version
# Run tests
> ./test.sh

I would simplify the yq line by dropping sed. Would you mind also shifting the test.sh change into a separate commit so you can document in the commit message why you made that change, i.e. b/c yq 4 behaves differently than yq  version 3 and emits "!!map" instead of "object" when it encounters a JSON object/YAML map structure?
Make whatever choice you want to about the multiple theme/types (I'm easy on that, no strong preference).

Moved test.sh change into a separate commit to explicitly document behaviour difference between yq 4 and yq 3


Add case sensitivity on Tag name for Rails 6

I'm seeing lots of deprecations warnings in Rails 6.
This fixes the issue.

Closing this, #1009 is a better solution.


Allow authentication through environment variables

This allows the usage of standardized OS_* variables to authenticate against OpenStack. It's helpful when running the plugin in Kubernetes, because you "only" need to inject environment variables into the pod, not a full YAML file.

You anyway should provide config.toml, right? Maybe easier just to directly add all that vars to it?

Yes, but only the [[runners]] part, which is almost the same for all regions/environments. I'd prefer the environment variable credential lookup, as it's easier to handle the secret management. Putting them into the config.toml would mix up things.


Optimize OverloadShedder: Sort bundle by throughput in ascending order

Motivation
In the OverloadShedder strategy, to select a bundle on the broker, first select the one with the largest throughput for unloading, and at least unload a bundle from the broker, which may cause repeated unloads between brokers.
Modifications
In the OverloadShedder strategy, to select a bundle on the broker, first select the one with the largest throughput for unloading, and at least unload a bundle from the broker, which may cause repeated unloads between brokers：
https://github.com/apache/pulsar/blob/6b3fb4193857c324c748ea53ae5e6028137b2e35/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/OverloadShedder.java#L123-L126
Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?

[x] no-need-doc
(The modification here will not change the original semantics of the method)

/pulsarbot run-failure-checks

/pulsarbot run-failure-checks


chore(deps): update actions/checkout action to v4.2.0

This PR contains the following updates:

Package
Type
Update
Change

actions/checkout
action
minor
v4.1.6 -> v4.2.0

Release Notes

actions/checkout (actions/checkout)
v4.2.0
Compare Source

Add Ref and Commit outputs by @lucacome in https://github.com/actions/checkout/pull/1180
Dependency updates by @dependabot- https://github.com/actions/checkout/pull/1777, https://github.com/actions/checkout/pull/1872

v4.1.7
Compare Source

Bump the minor-npm-dependencies group across 1 directory with 4 updates by @dependabot in https://github.com/actions/checkout/pull/1739
Bump actions/checkout from 3 to 4 by @dependabot in https://github.com/actions/checkout/pull/1697
Check out other refs/* by commit by @orhantoy in https://github.com/actions/checkout/pull/1774
Pin actions/checkout's own workflows to a known, good, stable version. by @jww3 in https://github.com/actions/checkout/pull/1776

Configuration
📅 Schedule: Branch creation - "every weekday after 4am" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

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

This PR has been generated by Renovate Bot.

Renovate Ignore Notification
Because you closed this PR without merging, Renovate will ignore this update (v4.2.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.
If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.