Multiple sqlite database files

Hi,
Lets assume I want to use a sqlite database file per user. i.e. user1.db and user2.db files, both with the same schema.
I have created a context with the following constructor
public FootballDbContext(string dbFilePath)
            : base(new SQLiteConnection { ConnectionString = new SQLiteConnectionStringBuilder { DataSource = dbFilePath, ForeignKeys = true, DefaultTimeout = 2 }.ConnectionString }, true)
{
    Configuration.ProxyCreationEnabled = true;
    Configuration.LazyLoadingEnabled = true;
}

This will allow me to pass the filePath to the constructor of the context.
The problem I'm facing is that both contexts are referring to the same file although they use different connection strings.
What should I do? Is there a workaround or is this a limitation of EF?

Ok, I managed to find a workaround and it looks like it is working. not sure what to do with it, so here is the FootballDbContext after my changes:
If you have other suggestions/best known method - let me know.
    public class FootballDbContext : DbContext
    {
        private static DbModelBuilder dbModelBuilder = null;

        public DbSet<Team> Teams { get; set; }
        public DbSet<Stadion> Stadioms { get; set; }
        public DbSet<Player> Players { get; set; }

        public FootballDbContext(string dbFilePath)
            : base(new SQLiteConnection
            {
                ConnectionString = new SQLiteConnectionStringBuilder { DataSource = dbFilePath, ForeignKeys = true, DefaultTimeout = 2 }.ConnectionString,
            }, true)
        {
            Configuration.ProxyCreationEnabled = true;
            Configuration.LazyLoadingEnabled = true;
            if (dbModelBuilder != null)
            {
                var initializer = new SqliteCreateDatabaseIfNotExists<FootballDbContext>(Database.Connection.ConnectionString, dbModelBuilder);
                Database.SetInitializer(initializer);
                Database.Initialize(false);
            }
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
            dbModelBuilder = modelBuilder;
            var initializer = new SqliteCreateDatabaseIfNotExists<FootballDbContext>(Database.Connection.ConnectionString, modelBuilder);
            Database.SetInitializer(initializer);
        }
    }

The root of the problem is, that OnModelCreating will only be called once.
That means no new initializer will be created. So the initializer will try to delete the first database when creating a second context with a different connection string.
I was already able to fix this bug. See branch "Issue_22" for more information.
This will result in a breaking change because the initializers will no longer take connectionString as constructor parameter. But its > v1 so its okay ;)
I'll ship this bugfix with v<IP_ADDRESS>.
If you need this fix earlier you can grap the dll from the CI Build artifacts here.

I've just tested it, Thanks a lot for the quick response and fix!
Harel M.

BTW, other initializers do not require the model builder as a parameter and thus can be configured once when the application starts or in the context's static constructor.
for example when using sql server with migrations and you want the database scheme to update you would use:
Database.SetInitializer(new MigrateDatabaseToLatestVersion<SomeContext, SomeConfiguration>());
on the application startup.
Please consider. :-)
Thanks,
Harel M.

It appears I have found another scenario where your solution does not help :-(
steps to reproduce:

creata a context.
dispose of this context.
delete the database file.
create a context pointing to the same file.
tables are not generated :-( any query to the database will fail.

I'm not sure but I think my workaround still works to this scenrio as well.
Harel M.

Do you mean the workaround or the code in the Issue_22 branch?

The code in issue_22 branch does not work for the above scenario. the workaround does but looks bad...

The partial fix for this is in the master branch.
Its very complicated to support your scenario because the code does not use the same approach as the other initializers.
I'll target this issue as part of #4.


TestReconcile_CloudEvents Unit test failed in nightly job

Expected Behavior
Pipeline nightly unit test passes
Actual Behavior
Pipeline nightly unit test failed:
Taskrun : pipeline-release-nightly-hkptk-unit-tests-2h6tv
Failure:
=== RUN   TestReconcile_CloudEvents
2020-07-23T03:25:50.769Z	ERROR	TestReconcile_CloudEvents	taskrun/controller.go:58	Failed to create taskrun metrics recorder running_taskruns_count: cannot register view "running_taskruns_count"; a different view with the same name is already registered
taskruns_pod_latency: cannot register view "taskruns_pod_latency"; a different view with the same name is already registered
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.NewController.func1
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/controller.go:58
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.getTaskRunController
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:271
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.TestReconcile_CloudEvents
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:726
testing.tRunner
	/usr/local/go/src/testing/testing.go:1039
2020-07-23T03:25:50.770Z	INFO	TestReconcile_CloudEvents	taskrun/controller.go:94	Setting up event handlers
2020-07-23T03:25:50.774Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features config "config-defaults" config was added or updated: &config.Defaults{DefaultTimeoutMinutes:60, DefaultServiceAccount:"", DefaultManagedByLabelValue:"tekton-pipelines", DefaultPodTemplate:(*pod.Template)(nil), DefaultCloudEventsSink:"http://synk:8080"}
2020-07-23T03:25:50.775Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features config "feature-flags" config was added or updated: &config.FeatureFlags{DisableHomeEnvOverwrite:false, DisableWorkingDirOverwrite:false, DisableAffinityAssistant:false, RunningInEnvWithInjectedSidecars:true}
{"level":"info","ts":1595474750.9073088,"logger":"fallback","caller":"taskrun/taskrun.go:301","msg":"Cloud Events: []"}
2020-07-23T03:25:50.910Z	INFO	TestReconcile_CloudEvents	reconciler/timeout_handler.go:265	About to start timeout timer for TaskRun/0xc0007c0280. started at 2020-07-23 03:25:50.872365452 +0000 UTC m=+1.032642257, timeout is 1h0m0s, running for 38.376847ms
2020-07-23T03:25:50.911Z	DEBUG	TestReconcile_CloudEvents.github.com-tektoncd-pipeline-pkg-reconciler-taskrun.Reconciler	controller/controller.go:349	Adding to queue foo/test-taskrun-not-started (depth: 1)
{"level":"info","ts":1595474750.9117742,"logger":"fallback","caller":"taskrun/taskrun.go:392","msg":"Successfully reconciled taskrun test-taskrun-not-started/foo with status: &apis.Condition{Type:\"Succeeded\", Status:\"Unknown\", Severity:\"\", LastTransitionTime:apis.VolatileTime{Inner:v1.Time{Time:time.Time{wall:0xbfbe5eafb6563c51, ext:1071898014, loc:(*time.Location)(0x40f3640)}}}, Reason:\"Running\", Message:\"Not all Steps in the Task have finished executing\"}"}
    taskrun_test.go:775: expected event "(?s)dev.tekton.event.taskrun.started.v1.*test-taskrun-not-started" but got "Validation: valid
        Context Attributes,
          specversion: 1.0
          type: dev.tekton.event.taskrun.running.v1
          source: /test/taskrun1
          subject: test-taskrun-not-started
          id: f836bc15-11f8-4a2a-8c32-fafc40e05296
          datacontenttype: application/json
        Data,
          {
            "taskRun": {
              "metadata": {
                "name": "test-taskrun-not-started",
                "namespace": "foo",
                "selfLink": "/test/taskrun1",
                "resourceVersion": "00001",
                "creationTimestamp": null,
                "labels": {
                  "app.kubernetes.io/managed-by": "tekton-pipelines",
                  "tekton.dev/task": "test-task"
                },
                "annotations": {
                  "pipeline.tekton.dev/release": "devel"
                }
              },
              "spec": {
                "resources": {},
                "serviceAccountName": "",
                "taskRef": {
                  "name": "test-task",
                  "kind": "Task"
                },
                "timeout": "1h0m0s"
              },
              "status": {
                "conditions": [
                  {
                    "type": "Succeeded",
                    "status": "Unknown",
                    "lastTransitionTime": "2020-07-23T03:25:50Z",
                    "reason": "Running",
                    "message": "Not all Steps in the Task have finished executing"
                  }
                ],
                "podName": "test-taskrun-not-started-pod-mz4c7",
                "startTime": "2020-07-23T03:25:50Z",
                "taskSpec": {
                  "steps": [
                    {
                      "name": "simple-step",
                      "image": "foo",
                      "command": [
                        "/mycmd"
                      ],
                      "env": [
                        {
                          "name": "foo",
                          "value": "bar"
                        }
                      ],
                      "resources": {}
                    }
                  ]
                }
              }
            }
          }
        " instead for reconcile-cloud-events
--- FAIL: TestReconcile_CloudEvents (1.16s)

Additional Info
Test passed locally
Tried on minikube as well as dogfooding cluster several time
go test -race -cover -v ./...

/kind flake

@afrittoli i said I'd take a look at this this week but didn't get a chance! Happy to keep it on my TODO list but wanted to give you and update 🙇♀

@afrittoli kindly said he was happy to take this on again 🙇♀
/assign afrittoli

This one flaked again on the nightly last night

it failed again sep 17.
it passed on rerun.

@bobcatfish and I spent some time this morning debugging the test.  We were only able to reproduce the test flake "artificially" by adding a delay to the sending of certain events. We've added an extra log line that we hope will help us debug the problem when it occurs again in future (see https://github.com/tektoncd/pipeline/pull/3282)
Our hunch is that the cloud events are being sent out of order - "running" is being sent before "started/not-started" - and we guess this might be because we are emitting the events from independent go routines.
It seems like maybe we don't make any guarantees about the order of delivery of CloudEvents but the test is written to strictly require that events are delivered in-order.  I was wondering if maybe we should loosen this restriction in the unit test so that ordering of received events doesn't matter?  @afrittoli wdyt?

@bobcatfish and I spent some time this morning debugging the test. We were only able to reproduce the test flake "artificially" by adding a delay to the sending of certain events. We've added an extra log line that we hope will help us debug the problem when it occurs again in future (see #3282)
Our hunch is that the cloud events are being sent out of order - "running" is being sent before "started/not-started" - and we guess this might be because we are emitting the events from independent go routines.
It seems like maybe we don't make any guarantees about the order of delivery of CloudEvents but the test is written to strictly require that events are delivered in-order. I was wondering if maybe we should loosen this restriction in the unit test so that ordering of received events doesn't matter? @afrittoli wdyt?

It probably makes sense. We might want to call out that because of retries there is no guarantee that events will be delivered in order (even if it's likely that they will as long as retries are not used).
However before we do that change, I would like to benefit from https://github.com/tektoncd/pipeline/pull/3282 and see if we can catch the cause of this out of order.

Woo, we caught a flake 🐟 !  Dashboard link to failed PipelineRun.
Initial speculation about go routine ordering appears to be correct.  In the below log output we can see that the cloud events controller reports Sending cloudevent of type "dev.tekton.event.taskrun.running.v1" before Sending cloudevent of type "dev.tekton.event.taskrun.started.v1".
So I will plan to move ahead with the suggestion of making the test less strict about event ordering.
[unit-tests : unit-test] === RUN   TestReconcile_CloudEvents
[unit-tests : unit-test] 2020-09-28T14:58:25.304Z	ERROR	TestReconcile_CloudEvents	taskrun/controller.go:58	Failed to create taskrun metrics recorder running_taskruns_count: cannot register view "running_taskruns_count"; a different view with the same name is already registered
[unit-tests : unit-test] taskruns_pod_latency: cannot register view "taskruns_pod_latency"; a different view with the same name is already registered
[unit-tests : unit-test] github.com/tektoncd/pipeline/pkg/reconciler/taskrun.NewController.func1
[unit-tests : unit-test] 	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/controller.go:58
[unit-tests : unit-test] github.com/tektoncd/pipeline/pkg/reconciler/taskrun.getTaskRunController
[unit-tests : unit-test] 	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:288
[unit-tests : unit-test] github.com/tektoncd/pipeline/pkg/reconciler/taskrun.TestReconcile_CloudEvents
[unit-tests : unit-test] 	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:743
[unit-tests : unit-test] testing.tRunner
[unit-tests : unit-test] 	/usr/local/go/src/testing/testing.go:1127
[unit-tests : unit-test] 2020-09-28T14:58:25.306Z	INFO	TestReconcile_CloudEvents	taskrun/controller.go:93	Setting up event handlers
[unit-tests : unit-test] 2020-09-28T14:58:25.311Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-defaults" config was added or updated: &config.Defaults{DefaultTimeoutMinutes:60, DefaultServiceAccount:"default", DefaultManagedByLabelValue:"tekton-pipelines", DefaultPodTemplate:(*pod.Template)(nil), DefaultCloudEventsSink:"http://synk:8080", DefaultTaskRunWorkspaceBinding:""}
[unit-tests : unit-test] 2020-09-28T14:58:25.312Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "feature-flags" config was added or updated: &config.FeatureFlags{DisableHomeEnvOverwrite:false, DisableWorkingDirOverwrite:false, DisableAffinityAssistant:false, RunningInEnvWithInjectedSidecars:true, RequireGitSSHSecretKnownHosts:false}
[unit-tests : unit-test] 2020-09-28T14:58:25.312Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-artifact-bucket" config was added or updated: &config.ArtifactBucket{Location:"", ServiceAccountSecretName:"", ServiceAccountSecretKey:"", ServiceAccountFieldName:"GOOGLE_APPLICATION_CREDENTIALS"}
[unit-tests : unit-test] 2020-09-28T14:58:25.312Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-artifact-pvc" config was added or updated: &config.ArtifactPVC{Size:"5Gi", StorageClassName:""}
[unit-tests : unit-test] 2020-09-28T14:58:25.434Z	INFO	TestReconcile_CloudEvents	taskrun/taskrun.go:321	Cloud Events: []
[unit-tests : unit-test] 2020-09-28T14:58:25.439Z	INFO	TestReconcile_CloudEvents	timeout/handler.go:243	About to start timeout timer for foo/test-taskrun-not-started. started at 2020-09-28 14:58:25.40997067 +0000 UTC m=+0.939033930, timeout is {1h0m0s}, running for 28.981542ms
[unit-tests : unit-test] 2020-09-28T14:58:25.439Z	DEBUG	TestReconcile_CloudEvents.github.com-tektoncd-pipeline-pkg-reconciler-taskrun.Reconciler	controller/controller.go:394	Adding to queue foo/test-taskrun-not-started (depth: 1)	{"knative.dev/key": {"knative.dev/key": "foo/test-taskrun-not-started"}}
[unit-tests : unit-test] 2020-09-28T14:58:25.440Z	INFO	TestReconcile_CloudEvents	taskrun/taskrun.go:412	Successfully reconciled taskrun test-taskrun-not-started/foo with status: &apis.Condition{Type:"Succeeded", Status:"Unknown", Severity:"", LastTransitionTime:apis.VolatileTime{Inner:v1.Time{Time:time.Time{wall:0xbfd49c645a3c2032, ext:969211208, loc:(*time.Location)(0x3e9d820)}}}, Reason:"Running", Message:"Not all Steps in the Task have finished executing"}
[unit-tests : unit-test] 2020-09-28T14:58:25.453Z	DEBUG	TestReconcile_CloudEvents	cloudevent/cloud_event_controller.go:143	Sending cloudevent of type "dev.tekton.event.taskrun.running.v1"
[unit-tests : unit-test] 2020-09-28T14:58:25.455Z	DEBUG	TestReconcile_CloudEvents	taskrun/reconciler.go:322	Updating status with:   v1beta1.TaskRunStatus{
[unit-tests : unit-test]   	Status: v1beta1.Status{
[unit-tests : unit-test]   		ObservedGeneration: 0,
[unit-tests : unit-test] - 		Conditions:         nil,
[unit-tests : unit-test] + 		Conditions: v1beta1.Conditions{
[unit-tests : unit-test] + 			{
[unit-tests : unit-test] + 				Type:               "Succeeded",
[unit-tests : unit-test] + 				Status:             "Unknown",
[unit-tests : unit-test] + 				LastTransitionTime: apis.VolatileTime{Inner: s"2020-09-28 14:58:25.440148018 +0"...},
[unit-tests : unit-test] + 				Reason:             "Running",
[unit-tests : unit-test] + 				Message:            "Not all Steps in the Task have finished executing",
[unit-tests : unit-test] + 			},
[unit-tests : unit-test] + 		},
[unit-tests : unit-test]   		Annotations: nil,
[unit-tests : unit-test]   	},
[unit-tests : unit-test]   	TaskRunStatusFields: v1beta1.TaskRunStatusFields{
[unit-tests : unit-test] - 		PodName:         "",
[unit-tests : unit-test] + 		PodName:         "test-taskrun-not-started-pod-mz4c7",
[unit-tests : unit-test] - 		StartTime:       nil,
[unit-tests : unit-test] + 		StartTime:       s"2020-09-28 14:58:25.40997067 +0000 UTC m=+0.939033930",
[unit-tests : unit-test]   		CompletionTime:  nil,
[unit-tests : unit-test] - 		Steps:           nil,
[unit-tests : unit-test] + 		Steps:           []v1beta1.StepState{},
[unit-tests : unit-test]   		CloudEvents:     nil,
[unit-tests : unit-test]   		RetriesStatus:   nil,
[unit-tests : unit-test]   		ResourcesResult: nil,
[unit-tests : unit-test]   		TaskRunResults:  nil,
[unit-tests : unit-test] - 		Sidecars:        nil,
[unit-tests : unit-test] + 		Sidecars:        []v1beta1.SidecarState{},
[unit-tests : unit-test] - 		TaskSpec:        nil,
[unit-tests : unit-test] + 		TaskSpec:        &v1beta1.TaskSpec{Steps: []v1beta1.Step{{Container: v1.Container{...}}}},
[unit-tests : unit-test]   	},
[unit-tests : unit-test]   }
[unit-tests : unit-test]
[unit-tests : unit-test] 2020-09-28T14:58:25.434Z	DEBUG	TestReconcile_CloudEvents	cloudevent/cloud_event_controller.go:143	Sending cloudevent of type "dev.tekton.event.taskrun.started.v1"
[unit-tests : unit-test] 2020-09-28T14:58:25.468Z	DEBUG	TestReconcile_CloudEvents	taskrun/reconciler.go:322	Updating status with:   v1beta1.TaskRunStatus{
[unit-tests : unit-test]   	Status: v1beta1.Status{
[unit-tests : unit-test]   		ObservedGeneration: 0,
[unit-tests : unit-test] - 		Conditions:         nil,
[unit-tests : unit-test] + 		Conditions: v1beta1.Conditions{
[unit-tests : unit-test] + 			{
[unit-tests : unit-test] + 				Type:               "Succeeded",
[unit-tests : unit-test] + 				Status:             "Unknown",
[unit-tests : unit-test] + 				LastTransitionTime: apis.VolatileTime{Inner: s"2020-09-28 14:58:25.440148018 +0"...},
[unit-tests : unit-test] + 				Reason:             "Running",
[unit-tests : unit-test] + 				Message:            "Not all Steps in the Task have finished executing",
[unit-tests : unit-test] + 			},
[unit-tests : unit-test] + 		},
[unit-tests : unit-test]   		Annotations: nil,
[unit-tests : unit-test]   	},
[unit-tests : unit-test]   	TaskRunStatusFields: v1beta1.TaskRunStatusFields{
[unit-tests : unit-test] - 		PodName:         "",
[unit-tests : unit-test] + 		PodName:         "test-taskrun-not-started-pod-mz4c7",
[unit-tests : unit-test] - 		StartTime:       nil,
[unit-tests : unit-test] + 		StartTime:       s"2020-09-28 14:58:25.40997067 +0000 UTC m=+0.939033930",
[unit-tests : unit-test]   		CompletionTime:  nil,
[unit-tests : unit-test] - 		Steps:           nil,
[unit-tests : unit-test] + 		Steps:           []v1beta1.StepState{},
[unit-tests : unit-test]   		CloudEvents:     nil,
[unit-tests : unit-test]   		RetriesStatus:   nil,
[unit-tests : unit-test]   		ResourcesResult: nil,
[unit-tests : unit-test]   		TaskRunResults:  nil,
[unit-tests : unit-test] - 		Sidecars:        nil,
[unit-tests : unit-test] + 		Sidecars:        []v1beta1.SidecarState{},
[unit-tests : unit-test] - 		TaskSpec:        nil,
[unit-tests : unit-test] + 		TaskSpec:        &v1beta1.TaskSpec{Steps: []v1beta1.Step{{Container: v1.Container{...}}}},
[unit-tests : unit-test]   	},
[unit-tests : unit-test]   }
[unit-tests : unit-test]
[unit-tests : unit-test]     taskrun_test.go:792: expected event "(?s)dev.tekton.event.taskrun.started.v1.*test-taskrun-not-started" but got "Validation: valid
[unit-tests : unit-test]         Context Attributes,
[unit-tests : unit-test]           specversion: 1.0
[unit-tests : unit-test]           type: dev.tekton.event.taskrun.running.v1
[unit-tests : unit-test]           source: /test/taskrun1
[unit-tests : unit-test]           subject: test-taskrun-not-started
[unit-tests : unit-test]           id: 693e73bd-d4b5-487a-b96b-1d007a116b27
[unit-tests : unit-test]           datacontenttype: application/json
[unit-tests : unit-test]         Data,
[unit-tests : unit-test]           {
[unit-tests : unit-test]             "taskRun": {
[unit-tests : unit-test]               "metadata": {
[unit-tests : unit-test]                 "name": "test-taskrun-not-started",
[unit-tests : unit-test]                 "namespace": "foo",
[unit-tests : unit-test]                 "selfLink": "/test/taskrun1",
[unit-tests : unit-test]                 "resourceVersion": "00001",
[unit-tests : unit-test]                 "creationTimestamp": null,
[unit-tests : unit-test]                 "labels": {
[unit-tests : unit-test]                   "app.kubernetes.io/managed-by": "tekton-pipelines",
[unit-tests : unit-test]                   "tekton.dev/task": "test-task"
[unit-tests : unit-test]                 },
[unit-tests : unit-test]                 "annotations": {
[unit-tests : unit-test]                   "pipeline.tekton.dev/release": ""
[unit-tests : unit-test]                 }
[unit-tests : unit-test]               },
[unit-tests : unit-test]               "spec": {
[unit-tests : unit-test]                 "resources": {},
[unit-tests : unit-test]                 "serviceAccountName": "default",
[unit-tests : unit-test]                 "taskRef": {
[unit-tests : unit-test]                   "name": "test-task",
[unit-tests : unit-test]                   "kind": "Task"
[unit-tests : unit-test]                 },
[unit-tests : unit-test]                 "timeout": "1h0m0s"
[unit-tests : unit-test]               },
[unit-tests : unit-test]               "status": {
[unit-tests : unit-test]                 "conditions": [
[unit-tests : unit-test]                   {
[unit-tests : unit-test]                     "type": "Succeeded",
[unit-tests : unit-test]                     "status": "Unknown",
[unit-tests : unit-test]                     "lastTransitionTime": "2020-09-28T14:58:25Z",
[unit-tests : unit-test]                     "reason": "Running",
[unit-tests : unit-test]                     "message": "Not all Steps in the Task have finished executing"
[unit-tests : unit-test]                   }
[unit-tests : unit-test]                 ],
[unit-tests : unit-test]                 "podName": "test-taskrun-not-started-pod-mz4c7",
[unit-tests : unit-test]                 "startTime": "2020-09-28T14:58:25Z",
[unit-tests : unit-test]                 "taskSpec": {
[unit-tests : unit-test]                   "steps": [
[unit-tests : unit-test]                     {
[unit-tests : unit-test]                       "name": "simple-step",
[unit-tests : unit-test]                       "image": "foo",
[unit-tests : unit-test]                       "command": [
[unit-tests : unit-test]                         "/mycmd"
[unit-tests : unit-test]                       ],
[unit-tests : unit-test]                       "env": [
[unit-tests : unit-test]                         {
[unit-tests : unit-test]                           "name": "foo",
[unit-tests : unit-test]                           "value": "bar"
[unit-tests : unit-test]                         }
[unit-tests : unit-test]                       ],
[unit-tests : unit-test]                       "resources": {}
[unit-tests : unit-test]                     }
[unit-tests : unit-test]                   ]
[unit-tests : unit-test]                 }
[unit-tests : unit-test]               }
[unit-tests : unit-test]             }
[unit-tests : unit-test]           }
[unit-tests : unit-test]         " instead for reconcile-cloud-events
[unit-tests : unit-test] --- FAIL: TestReconcile_CloudEvents (1.17s)

@sbwsg
This one flaked again today
https://dashboard.dogfooding.tekton.dev/#/namespaces/default/pipelineruns/pipeline-release-nightly-fnx28?pipelineTask=unit-tests&step=unit-test
--- FAIL: TestReconcile_CloudEvents (2.03s)
=== RUN   TestReconcile
2020-10-14T02:07:50.764Z	INFO	TestReconcile_CloudEvents	timeout/handler.go:268	stopping timer for "foo/test-taskrun-not-started"
=== RUN   TestReconcile/success
2020-10-14T02:07:50.772Z	ERROR	TestReconcile/success	taskrun/controller.go:58	Failed to create taskrun metrics recorder running_taskruns_count: cannot register view "running_taskruns_count"; a different view with the same name is already registered
taskruns_pod_latency: cannot register view "taskruns_pod_latency"; a different view with the same name is already registered
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.NewController.func1
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/controller.go:58
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.getTaskRunController
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:289
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.TestReconcile.func1
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:1490
testing.tRunner
	/usr/local/go/src/testing/testing.go:1127

It appears that two events were not received: taskrun_test.go:837: timed out waiting for 2 more events: []string{"(?s)dev.tekton.event.taskrun.started.v1.*test-taskrun-not-started", "(?s)dev.tekton.event.taskrun.running.v1.*test-taskrun-not-started"}
Looks like the full error is:
=== RUN   TestReconcile_CloudEvents
2020-10-14T02:07:48.733Z	ERROR	TestReconcile_CloudEvents	taskrun/controller.go:58	Failed to create taskrun metrics recorder running_taskruns_count: cannot register view "running_taskruns_count"; a different view with the same name is already registered
taskruns_pod_latency: cannot register view "taskruns_pod_latency"; a different view with the same name is already registered
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.NewController.func1
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/controller.go:58
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.getTaskRunController
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:289
github.com/tektoncd/pipeline/pkg/reconciler/taskrun.TestReconcile_CloudEvents
	/workspace/src/github.com/tektoncd/pipeline/pkg/reconciler/taskrun/taskrun_test.go:788
testing.tRunner
	/usr/local/go/src/testing/testing.go:1127
2020-10-14T02:07:48.735Z	INFO	TestReconcile_CloudEvents	taskrun/controller.go:93	Setting up event handlers
2020-10-14T02:07:48.739Z	INFO	TestReconcile_CloudEvents	taskrun/taskrun.go:322	Cloud Events: []
2020-10-14T02:07:48.739Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-defaults" config was added or updated: &config.Defaults{DefaultTimeoutMinutes:60, DefaultServiceAccount:"default", DefaultManagedByLabelValue:"tekton-pipelines", DefaultPodTemplate:(*pod.Template)(nil), DefaultCloudEventsSink:"http://synk:8080", DefaultTaskRunWorkspaceBinding:""}
2020-10-14T02:07:48.739Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "feature-flags" config was added or updated: &config.FeatureFlags{DisableHomeEnvOverwrite:false, DisableWorkingDirOverwrite:false, DisableAffinityAssistant:false, RunningInEnvWithInjectedSidecars:true, RequireGitSSHSecretKnownHosts:false}
2020-10-14T02:07:48.739Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-artifact-bucket" config was added or updated: &config.ArtifactBucket{Location:"", ServiceAccountSecretName:"", ServiceAccountSecretKey:"", ServiceAccountFieldName:"GOOGLE_APPLICATION_CREDENTIALS"}
2020-10-14T02:07:48.740Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-artifact-pvc" config was added or updated: &config.ArtifactPVC{Size:"5Gi", StorageClassName:""}
2020-10-14T02:07:48.744Z	INFO	TestReconcile_CloudEvents	timeout/handler.go:243	About to start timeout timer for foo/test-taskrun-not-started. started at 2020-10-14 02:07:48.738839271 +0000 UTC m=+1.122525458, timeout is {1h0m0s}, running for 5.660835ms
2020-10-14T02:07:48.745Z	DEBUG	TestReconcile_CloudEvents.github.com-tektoncd-pipeline-pkg-reconciler-taskrun.Reconciler	controller/controller.go:397	Adding to queue foo/test-taskrun-not-started (depth: 1)	{"knative.dev/key": "foo/test-taskrun-not-started"}
2020-10-14T02:07:48.745Z	INFO	TestReconcile_CloudEvents	taskrun/taskrun.go:413	Successfully reconciled taskrun test-taskrun-not-started/foo with status: &apis.Condition{Type:"Succeeded", Status:"Unknown", Severity:"", LastTransitionTime:apis.VolatileTime{Inner:v1.Time{Time:time.Time{wall:0xbfd9b53d2c6c7ed5, ext:1128994074, loc:(*time.Location)(0x3f34860)}}}, Reason:"Running", Message:"Not all Steps in the Task have finished executing"}
2020-10-14T02:07:48.749Z	DEBUG	TestReconcile_CloudEvents	taskrun/reconciler.go:322	Updating status with:   v1beta1.TaskRunStatus{
  	Status: v1beta1.Status{
  		ObservedGeneration: 0,
- 		Conditions:         nil,
+ 		Conditions: v1beta1.Conditions{
+ 			{
+ 				Type:               "Succeeded",
+ 				Status:             "Unknown",
+ 				LastTransitionTime: apis.VolatileTime{Inner: s"2020-10-14 02:07:48.745307861 +0"...},
+ 				Reason:             "Running",
+ 				Message:            "Not all Steps in the Task have finished executing",
+ 			},
+ 		},
  		Annotations: nil,
  	},
  	TaskRunStatusFields: v1beta1.TaskRunStatusFields{
- 		PodName:         "",
+ 		PodName:         "test-taskrun-not-started-pod-mz4c7",
- 		StartTime:       nil,
+ 		StartTime:       s"2020-10-14 02:07:48.738839271 +0000 UTC m=+1.122525458",
  		CompletionTime:  nil,
- 		Steps:           nil,
+ 		Steps:           []v1beta1.StepState{},
  		CloudEvents:     nil,
  		RetriesStatus:   nil,
  		ResourcesResult: nil,
  		TaskRunResults:  nil,
- 		Sidecars:        nil,
+ 		Sidecars:        []v1beta1.SidecarState{},
- 		TaskSpec:        nil,
+ 		TaskSpec:        &v1beta1.TaskSpec{Steps: []v1beta1.Step{{Container: v1.Container{...}}}},
  	},
  }

2020-10-14T02:07:48.762Z	DEBUG	TestReconcile_CloudEvents	taskrun/reconciler.go:322	Updating status with:   v1beta1.TaskRunStatus{
  	Status: v1beta1.Status{
  		ObservedGeneration: 0,
- 		Conditions:         nil,
+ 		Conditions: v1beta1.Conditions{
+ 			{
+ 				Type:               "Succeeded",
+ 				Status:             "Unknown",
+ 				LastTransitionTime: apis.VolatileTime{Inner: s"2020-10-14 02:07:48.745307861 +0"...},
+ 				Reason:             "Running",
+ 				Message:            "Not all Steps in the Task have finished executing",
+ 			},
+ 		},
  		Annotations: nil,
  	},
  	TaskRunStatusFields: v1beta1.TaskRunStatusFields{
- 		PodName:         "",
+ 		PodName:         "test-taskrun-not-started-pod-mz4c7",
- 		StartTime:       nil,
+ 		StartTime:       s"2020-10-14 02:07:48.738839271 +0000 UTC m=+1.122525458",
  		CompletionTime:  nil,
- 		Steps:           nil,
+ 		Steps:           []v1beta1.StepState{},
  		CloudEvents:     nil,
  		RetriesStatus:   nil,
  		ResourcesResult: nil,
  		TaskRunResults:  nil,
- 		Sidecars:        nil,
+ 		Sidecars:        []v1beta1.SidecarState{},
- 		TaskSpec:        nil,
+ 		TaskSpec:        &v1beta1.TaskSpec{Steps: []v1beta1.Step{{Container: v1.Container{...}}}},
  	},
  }

    taskrun_test.go:837: timed out waiting for 2 more events: []string{"(?s)dev.tekton.event.taskrun.started.v1.*test-taskrun-not-started", "(?s)dev.tekton.event.taskrun.running.v1.*test-taskrun-not-started"}
--- FAIL: TestReconcile_CloudEvents (2.03s)

I'd expect to see debug messages of the format Sending cloudevent of type "dev.tekton.event.taskrun.running.v1" from the cloud event controller but don't see any here.  It looks like the test caught an actual issue (or ran sooooo sllooooowwwlly that the cloud event controller never got round to emitting those events)

seeing this same issue again in last nightly run
error is expected event "(?s)dev.tekton.event.pipelinerun.started.v1.*test-pipelinerun"
but I see Sending cloudevent of type "dev.tekton.event.pipelinerun.started.v1" 🙃
full error log:
=== RUN   TestReconcile_CloudEvents
    logger.go:130: 2021-06-25T02:16:35.107Z	ERROR	TestReconcile_CloudEvents	pipelinerun/controller.go:63	Failed to create pipelinerun metrics recorder running_pipelineruns_count: cannot register view "running_pipelineruns_count"; a different view with the same name is already registered
    logger.go:130: 2021-06-25T02:16:35.107Z	INFO	TestReconcile_CloudEvents	pipelinerun/controller.go:98	Setting up event handlers
    logger.go:130: 2021-06-25T02:16:35.107Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-artifact-bucket" config was added or updated: &config.ArtifactBucket{Location:"", ServiceAccountSecretName:"", ServiceAccountSecretKey:"", ServiceAccountFieldName:"GOOGLE_APPLICATION_CREDENTIALS"}
    logger.go:130: 2021-06-25T02:16:35.108Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-artifact-pvc" config was added or updated: &config.ArtifactPVC{Size:"5Gi", StorageClassName:""}
    logger.go:130: 2021-06-25T02:16:35.108Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "config-defaults" config was added or updated: &config.Defaults{DefaultTimeoutMinutes:60, DefaultServiceAccount:"default", DefaultManagedByLabelValue:"tekton-pipelines", DefaultPodTemplate:(*pod.Template)(nil), DefaultCloudEventsSink:"http://synk:8080", DefaultTaskRunWorkspaceBinding:""}
    logger.go:130: 2021-06-25T02:16:35.108Z	INFO	TestReconcile_CloudEvents.config-store	configmap/store.go:154	defaults/features/artifacts config "feature-flags" config was added or updated: &config.FeatureFlags{DisableHomeEnvOverwrite:true, DisableWorkingDirOverwrite:true, DisableAffinityAssistant:false, DisableCredsInit:false, RunningInEnvWithInjectedSidecars:true, RequireGitSSHSecretKnownHosts:false, EnableTektonOCIBundles:false, EnableCustomTasks:false, EnableAPIFields:"stable"}
    logger.go:130: 2021-06-25T02:16:35.209Z	DEBUG	TestReconcile_CloudEvents	cloudevent/cloud_event_controller.go:143	Sending cloudevent of type "dev.tekton.event.pipelinerun.started.v1"
    logger.go:130: 2021-06-25T02:16:35.209Z	DEBUG	TestReconcile_CloudEvents	controller/controller.go:409	Adding to queue foo/test-pipelinerun (depth: 1)	{"knative.dev/controller": "github.com.tektoncd.pipeline.pkg.reconciler.pipelinerun.Reconciler", "knative.dev/kind": "tekton.dev.PipelineRun", "knative.dev/key": "foo/test-pipelinerun"}
    logger.go:130: 2021-06-25T02:16:35.210Z	INFO	TestReconcile_CloudEvents	pipelinerun/pipelinerun.go:769	Creating a new TaskRun object test-pipelinerun-test-1-9l9zj for pipeline task test-1
    logger.go:130: 2021-06-25T02:16:35.210Z	INFO	TestReconcile_CloudEvents	pipelinerun/pipelinerun.go:599	PipelineRun test-pipelinerun status is being set to &{Succeeded Unknown  {2021-06-25 02:16:35.210119146 +0000 UTC m=+7.759743522} Running Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0}
    logger.go:130: 2021-06-25T02:16:35.210Z	DEBUG	TestReconcile_CloudEvents	cloudevent/cloud_event_controller.go:143	Sending cloudevent of type "dev.tekton.event.pipelinerun.running.v1"
    logger.go:130: 2021-06-25T02:16:35.210Z	DEBUG	TestReconcile_CloudEvents	controller/controller.go:428	Adding to queue foo/test-pipelinerun (delay: -2562046h47m16.854775807s, depth: 1)	{"knative.dev/controller": "github.com.tektoncd.pipeline.pkg.reconciler.pipelinerun.Reconciler", "knative.dev/kind": "tekton.dev.PipelineRun", "knative.dev/key": "foo/test-pipelinerun"}
    logger.go:130: 2021-06-25T02:16:35.210Z	DEBUG	TestReconcile_CloudEvents	pipelinerun/reconciler.go:322	Updating status with:   v1beta1.PipelineRunStatus{
          	Status: v1beta1.Status{
          		ObservedGeneration: 0,
        - 		Conditions:         nil,
        + 		Conditions: v1beta1.Conditions{
        + 			{
        + 				Type:               "Succeeded",
        + 				Status:             "Unknown",
        + 				LastTransitionTime: apis.VolatileTime{Inner: s"2021-06-25 02:16:35.210119146 +0"...},
        + 				Reason:             "Running",
        + 				Message:            "Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skip"...,
        + 			},
        + 		},
          		Annotations: nil,
          	},
          	PipelineRunStatusFields: v1beta1.PipelineRunStatusFields{
        - 		StartTime:      nil,
        + 		StartTime:      s"0001-01-01 00:00:00 +0000 UTC",
          		CompletionTime: nil,
        - 		TaskRuns:       nil,
        + 		TaskRuns: map[string]*v1beta1.PipelineRunTaskRunStatus{
        + 			"test-pipelinerun-test-1-9l9zj": &{PipelineTaskName: "test-1", Status: &v1beta1.TaskRunStatus{}},
        + 		},
        - 		Runs:            nil,
        + 		Runs:            map[string]*v1beta1.PipelineRunRunStatus{},
          		PipelineResults: nil,
        - 		PipelineSpec:    nil,
        + 		PipelineSpec:    &v1beta1.PipelineSpec{Tasks: []v1beta1.PipelineTask{{Name: "test-1", TaskRef: &v1beta1.TaskRef{...}}}},
          		SkippedTasks:    nil,
          	},
          }
    logger.go:130: 2021-06-25T02:16:35.223Z	DEBUG	TestReconcile_CloudEvents	pipelinerun/reconciler.go:322	Updating status with:   v1beta1.PipelineRunStatus{
          	Status: v1beta1.Status{
          		ObservedGeneration: 0,
        - 		Conditions:         nil,
        + 		Conditions: v1beta1.Conditions{
        + 			{
        + 				Type:               "Succeeded",
        + 				Status:             "Unknown",
        + 				LastTransitionTime: apis.VolatileTime{Inner: s"2021-06-25 02:16:35.210119146 +0"...},
        + 				Reason:             "Running",
        + 				Message:            "Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skip"...,
        + 			},
        + 		},
          		Annotations: nil,
          	},
          	PipelineRunStatusFields: v1beta1.PipelineRunStatusFields{
        - 		StartTime:      nil,
        + 		StartTime:      s"0001-01-01 00:00:00 +0000 UTC",
          		CompletionTime: nil,
        - 		TaskRuns:       nil,
        + 		TaskRuns: map[string]*v1beta1.PipelineRunTaskRunStatus{
        + 			"test-pipelinerun-test-1-9l9zj": &{PipelineTaskName: "test-1", Status: &v1beta1.TaskRunStatus{}},
        + 		},
        - 		Runs:            nil,
        + 		Runs:            map[string]*v1beta1.PipelineRunRunStatus{},
          		PipelineResults: nil,
        - 		PipelineSpec:    nil,
        + 		PipelineSpec:    &v1beta1.PipelineSpec{Tasks: []v1beta1.PipelineTask{{Name: "test-1", TaskRef: &v1beta1.TaskRef{...}}}},
          		SkippedTasks:    nil,
          	},
          }
    pipelinerun_test.go:5284: expected event "(?s)dev.tekton.event.pipelinerun.started.v1.*test-pipelinerun" but got "Validation: valid
        Context Attributes,
          specversion: 1.0
          type: dev.tekton.event.pipelinerun.running.v1
          source: /pipeline/1234
          subject: test-pipelinerun
          id: 44a2e9a7-e8f4-4aec-8050-3327eda04a4c
          datacontenttype: application/json
        Data,
          {
            "pipelineRun": {
              "metadata": {
                "name": "test-pipelinerun",
                "namespace": "foo",
                "selfLink": "/pipeline/1234",
                "resourceVersion": "00001",
                "creationTimestamp": null,
                "labels": {
                  "tekton.dev/pipeline": "test-pipeline"
                }
              },
              "spec": {
                "pipelineRef": {
                  "name": "test-pipeline"
                },
                "serviceAccountName": "default",
                "timeout": "1h0m0s"
              },
              "status": {
                "conditions": [
                  {
                    "type": "Succeeded",
                    "status": "Unknown",
                    "lastTransitionTime": "2021-06-25T02:16:35Z",
                    "reason": "Running",
                    "message": "Tasks Completed: 0 (Failed: 0, Cancelled 0), Incomplete: 1, Skipped: 0"
                  }
                ],
                "startTime": null,
                "taskRuns": {
                  "test-pipelinerun-test-1-9l9zj": {
                    "pipelineTaskName": "test-1",
                    "status": {
                      "podName": ""
                    }
                  }
                },
                "pipelineSpec": {
                  "tasks": [
                    {
                      "name": "test-1",
                      "taskRef": {
                        "name": "test-task"
                      }
                    }
                  ]
                }
              }
            }
          }
        " instead for reconcile-cloud-events
--- FAIL: TestReconcile_CloudEvents (0.13s)

This error also appeared in pkg/reconciler/events TestEmit (while it's a different test case, it's a similar error and also related to reconciling cloud events so the underlying cause may be the same). This was on the documentation PR #4379.
This test logged
=== RUN   TestEmit
    logger.go:130: 2021-11-17T15:45:58.344Z	DEBUG	cloudevent/cloud_event_controller.go:143	Sending cloudevent of type "dev.tekton.event.pipelinerun.started.v1"
    event_test.go:243: received no events for with sink but (?s)dev.tekton.event.pipelinerun.started.v1.*test1 expected
--- FAIL: TestEmit (0.07s)

@sbwsg and I looked into this and discovered that both the pipelinerun reconciler tests and the event tests are using functions that verify events from channels are received in a particular order. These tests should be updated to use the eventFromChannelUnordered helper that is currently being used for the TaskRun reconciler tests. However, this won't address the flakes in https://github.com/tektoncd/pipeline/issues/2992#issuecomment-971821511 and https://github.com/tektoncd/pipeline/issues/2992#issuecomment-708376671.

/reopen
=== RUN   TestSendCloudEventWithRetries/test-send-cloud-event-taskrun
    logger.go:130: 2022-02-25T21:27:31.599Z	DEBUG	cloudevent/cloud_event_controller.go:144	Sending cloudevent of type "dev.tekton.event.taskrun.successful.v1"
    cloud_event_controller_test.go:608: error in test test-send-cloud-event-taskrun: timed out waiting for 1 more events: []string{"Context Attributes,"}
=== RUN   TestSendCloudEventWithRetries/test-send-cloud-event-pipelinerun
    logger.go:130: 2022-02-25T21:27:31.619Z	DEBUG	cloudevent/cloud_event_controller.go:144	Sending cloudevent of type "dev.tekton.event.pipelinerun.successful.v1"
=== RUN   TestSendCloudEventWithRetries/test-send-cloud-event-failed
    logger.go:130: 2022-02-25T21:27:31.644Z	DEBUG	cloudevent/cloud_event_controller.go:144	Sending cloudevent of type "dev.tekton.event.pipelinerun.successful.v1"
    logger.go:130: 2022-02-25T21:27:31.645Z	WARN	cloudevent/cloud_event_controller.go:146	Failed to send cloudevent: Had to fail. Event ID: faa24ba0-6b5e-4729-aae9-e6c257fbcef3


Add ability to force nginx to re-read configs

hi Philipp, thank you for this repo and article !
Is it possible to force nginx to re-read configs?
Before I added
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
to docker-compose nginx, I was able to force nginx to re-read configs using this command line
docker kill -s HUP nginx
But now it doesn't work. I have to restart the container.

Ok, the second I've asked this question I realized that I can do it by issuing this command:
docker exec nginx nginx -s reload


can it be used with linux ?

Hi
I want to ask if this project be used as an alternatif for GNOME or KDE alternatif ?

Yes, you can use OS.js as your primary desktop environment on top of X11 or Wayland.
So far only streaming GTK3 applications is provided, but I am looking into ways to be able to stream anything cross-platform.
So it is currently a bit limited to what applications you can use and such, but this is something that will improve over time!

Cool :+1:  I find it very interesting


"parseNumbers: true" incorrect behaviour

(related to https://github.com/sindresorhus/query-string/issues/201)
Consider 2 examples:
const search1 = '?phoneNumber=%2B380951234567&subtopicId=2&topicId=1';
const result1 = queryString.parse(search, {
  parseBooleans: true,
  parseNumbers: true,
});

const search2 = '?phoneNumber=a%2B380951234567&subtopicId=2&topicId=1';
const result2 = queryString.parse(search, {
  parseBooleans: true,
  parseNumbers: true,
});

console.log('result1', result1);
// {
//   phoneNumber:<PHONE_NUMBER>67,
//   subtopicId: 2,
//   topicId: 1,
// };
console.log('result2', result2);
// {
//   phoneNumber: 'a+380951234567',
//   subtopicId: 2,
//   topicId: 1,
// };

In the 1st example, "+" sign (%2B escaped) is ignored thus reducing to the number parsing, which is not what it supposed to be.
The main goal is to keep parsing numbers for parameters which values starts on the number and parse as plain string otherwise.
Does it look feasible to make a PR on this or should I not use parseNumbers option in that case?

+380951234567 is a valid number though. You would expect '-380951234567' to be parsed as a number, right? That being said, I agree it's not a optimal behavior.
// @yaodingyd

What should be the optimal behavior? Here it's using Number() function to convert to number.

I meant if I store the number "+123" in the URL and then I parse it with "parseNumbers" option I get lost the plus sign (+) and the parsed value will be just "123".
Meanwhile I want to store some number-like parameters in URL so removing the "parseNumbers" option is not the right solution for me.

So when I prepend the value with the prefix "a" it's just a workaround not to lost the plus sign :)
"a+123" get parsed as is and then I just skip the "a" letter

Hi, I would like to help you to solve this issue, I was thinking about you said about schema.
What do you think about something like this
const search2 = '?phoneNumber=a%2B380951234567&subtopicId=2&topicId=1';
const result2 = queryString.parse(search, {
    parseBooleans: true,
    parseNumbers: true,
    schema: {
        phoneNumber: String, // StringConstructor
    }
});

and when you are trying to parse always check the schema and see if have a property with the same name of the URL param, with this you will be able to parse correctly any primitive type

I would prefer something like this:
const search2 = '?phoneNumber=a%2B380951234567&subtopicId=2&topicId=1';
const result2 = queryString.parse(search, {
    parseBooleans: true,
    parseNumbers: true,
    types: {
        phoneNumber: 'string',
        subtopicId: value => Number(value)
    }
});

The type could also be a function to let the user handle the converting it from a string to a custom type. Don't forget that it also needs to be able to handle arrays.

If anyone wants to work on this, see the feedback given in https://github.com/sindresorhus/query-string/pull/249.


Error while deserialization of graph inside nodes

Current development in MDF supports serialization of 'Graph' object inside nodes(ordered dictionary of 'Node' objects inside Graph). However, it does not support deserialization of the same.
Reason for failure: Parser considers Graph inside nodes as Node, hence failing
Test cases of failure are available at: https://github.com/ModECI/MDF/blob/feature/metadata/tests/test_model.py
def test_graph_in_graphs(tmpdir):
.....
One hack to fix it is while loading JSON file back using load_mdf, apply a check for objects(Graph/Node) inside Nodes to differentiate between Node and Graph, by looking if 'nodes' present in that object.

As per the discussion, there should be a "reference" attribute in the allowed fields for the "Node" object which should point towards the "Graph" object.
e.g. there is a nested graph mdf_graph2=Graph(id="mdf2") if this Graph is inside a Node_A, Node_A =Node(id='A',reference='mdf2')
The 'Graph' object should be present inside the graphs of the model.
Next steps to update the execution engine to handle the input and output of the Graph object inside the Node.

Current development in MDF supports serialization of 'Graph' object inside nodes(ordered dictionary of 'Node' objects inside Graph). However, it does not support deserialization of the same.
Reason for failure: Parser considers Graph inside nodes as Node, hence failing
Test cases of failure are available at: https://github.com/ModECI/MDF/blob/feature/metadata/tests/test_model.py
def test_graph_in_graphs(tmpdir): .....
One hack to fix it is while loading JSON file back using load_mdf, apply a check for objects(Graph/Node) inside Nodes to differentiate between Node and Graph, by looking if 'nodes' present in that object.

Hi! This issue seems interesting to me and I have got what it is asking for. Can you please guide me on what to learn to write, (like json or something else) the code. I know python and javascript. @pgleeson @sanjayankur31

Thanks for your interest in this @29riyasaxena. Unfortunately resolving this issue will require a major extension to the core specification of MDF (at the moment subgraphs aren't really supported at all), followed by tests on the implentation in the various target environments. It's more of a potential activity for during the internship rather than beforehand.

I did modified the utils file and tested it. I got no error. I made a commit, can you please check that.

hi @pgleeson, I was working on this issue as well, what I inferred was during _parsing_element this issue arises in which it cannot deserialize the nested graph object. So what I was trying was, to first make a reference node inside and then de-reference it during the load_json process which works fine and now I am trying to do the same for graphs.
I know this is a big task and can be taken during the internship but if this task can be divided into smaller tasks like
firstly we need to decide how are we going to implement this

saving the JSON particularly the graph ones in such a way that during the reading process they can be expanded.

or

only during the reading process a step can be added to check the type (simple or nested) and then the (extra)deserialization step for the nested ones.

and then according to the most suited approach, we can further divide

read/write in a referenced manner
Autodetect nested graphs

.
.
.

@parikshit14 I appreciate your efforts on this, but the wider issue we're trying to solve (how do we enable subgraphs in MDF) has been discussed in more detail in our weekly developer meetings after this issue was opened, and the problem is not well described currently in this issue.
It's not simply a case of what can/can't currently be serialised, we need to decide on the implications for all the target simulators before we change the core specification, and then prototype/test various options. For that reason it's probably best to close this issue and open more specific ones when we start to work on this.


due date

hi,
i'm using kanboard in wampserver 2.5,
is this normal there is no way to plan a task after 23years? (we are in 2015, no way to put a
deadline after 2038...)
thx!
s
( ! ) Notice: A non well formed numeric value encountered in C:\wamp\www\app\Model\DateParser.php on line 216
Call Stack
Time	Memory	Function	Location
1	0.0000	251856	{main}( )	..\index.php:0
2	0.0170	2072504	Core\Router->dispatch( )	..\index.php:5
3	0.0170	2073040	Core\Router->load( )	..\Router.php:226
4	0.0240	2822608	Controller\Taskmodification->update( )	..\Router.php:254
5	0.0290	3146144	Controller\Taskmodification->edit( )	..\Taskmodification.php:165
6	0.0300	3155336	Model\DateParser->format( )	..\Taskmodification.php:114
7	0.0300	3155672	date ( )	..\DateParser.php:216

Could it be related to the 2038 timestamp bug ?

is this a kanboard issue or a wamp issue ? or something else ?

it's an issue related to the unix timestamp it could be quite global you can have more info on wikipedia
I'm not sure it's the case here, that's why i'm just popping the idea.
On my setup (Windows, IIS) the limit date I can use is 01/01/2038 using the 2nd of january 2038 causes the same error you have.

so i will plan my retirement for 2038 lol ! the last deadline ! after apocalyse, all in the desert with dogs and guns ! does fguillot know the pb? is will there be an update ?

This issue come from the year 2038 timestamp bug: https://en.wikipedia.org/wiki/Year_2038_problem

If you run php compiled in 32 bits that will fail, you must use the 64 bits version
If you use Mysql or Postgres, I increased the size of the columns in the development branch so you can store 64bits timestamps (date > 2038)

With the last dev version, you can use Kanboard for another century :)

hi,
i've changed the php version of wamp to a 64bit one, but the issue still exists...

hi, i'm trying too with ovh, i have set-up htaccess for 5_4 php
always the same pb...maybe can you help me....
thx!
s
here the link
http://braoffice.com/kanboard/

it's a test demo with admin/admin

i'm creating log / pwd: test / test2038
keep in touch!
s

hi, i have installed in wamp all these versions:
httpd-2.4.16-x64-vc11 (apache)
mysql-5.6.27-winx64
php-5.6.14-Win32-VC11-x64 (thread version)
and still the issue...
i'm so now trying to build my own server, no choice....
maybe a vps, i don't know, i'm a newbie in this field...
PS: what configuration do you have in demo.kanboard.net ?
thx
s

ok, wampserver must have php7 so i must wait, i will see that on linux,
do you know some good practices ?

ok...ubuntu install version is easier....thx! nice tool!
have fun developers!
s


CI testing for ECL

We need some sort of CI testing for PRs going into ECL in order to prevent introduction of bugs such as https://github.com/PX4/ecl/issues/557 and https://github.com/PX4/ecl/issues/554
As a start maybe we can add some (optional)printfs in functions which does not run continuously. Then for every PR we replay some logfiles and compare the output to what is should be.
@dagar Might have more ideas here

Hey @dagar I’d like to learn how PX4Buildbot configures a test branch for ecl — where can I look for more info?

Hey @dagar I’d like to learn how PX4Buildbot configures a test branch for ecl — where can I look for more info?

It's initiated by Jenkins on the PX4/ecl side creating a PX4/Firmware branch with the ecl submodule changed to the corresponding repo and commit. https://github.com/PX4/ecl/blob/a85d3a43edc4ac4b85ae21159510b9c26f7359e6/Jenkinsfile#L166-L190
Example: http://ci.px4.io:8080/blue/organizations/jenkins/PX4%2Fecl/detail/master/39/pipeline/113
Then PX4/Firmware side Jenkins automatically builds and tests the new ecl branch as if it were any other PX4/Firmware change.

We now have a change indicator that replays part of a log and compare the output to allow confident refactoring and we start to have quite a few unit tests to avoid regressions. This is not optimal, but is already much better than before and I think we can close this issue for now.


Adjust which methods are public in .simulation module

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

14 of 14 (100.0%)  changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 95.177%

Totals

Change from base Build<PHONE_NUMBER>9:
0.0%

Covered Lines:
592

Relevant Lines:
622

💛  - Coveralls


Bugfix/google login returns to donations first step

Google login returning to step 1 of the donation flow is fixed. Also the donation flow data is now stored in local storage and
lives there until the donation is completed or the user chooses to donate to another campaign. This way the users input will be
saved and he won't have to input everything again if he makes a mistake, like reloading the page etc...
PS: My main goal was to change as little as possible from the donation flow's implementation.
Closes #1260
Steps to test
Test the bugfix:
1.Initiate a donation without being logged in
2.Login via Google
Test where the donation flow data lives:

play around with the donation flow.

Affected urls
The whole donation flow
Environment
Local

@momchiii I think that we should think of a more elegant way to solve this. Nice work on making it work, but we can maybe think of some kind of more elegant adapter from local/session storage to the formik context.
Or even more generally, the context of the donation-flow itself (that would require creating a context or extending the StepsContext).

@dimitrur2204 Firstly I extended the StepsContext to take the donation data not only the step, but then I started thinking that we don't need another state for the data because we already have it inside the formikContext. Why would we want to store the data one more time? Now the local storage is updated on every submit(next step click) and the formikContext sync with localStorage is done on every first render of each step based on some checks. This is done like that because the validation is done on the formikContext, meaning that even if we have another storage for the donation data we'll still have to update the formikContext because the next button won't be clickable. I tried doing this task in many ways, but every time there was some edge case which breaks the flow. I'm not sure that I'll be able change the implementation because I have been transferred to another project.
PS: The stepsContext is handled like you said, but the whole stepper is handled with formik and I don't think that there is an elegant way of handling it, one reason is that the initial state when you go from step 1 to step 2 will be only the data from step 1, which will trigger typescript to throw type mismatch error (I'm not sure about that).

@dimitur2204 Firstly I extended the StepsContext to take the donation data not only the step, but then I started thinking that we don't need another state for the data because we already have it inside the formikContext. Why would we want to store the data one more time? Now the local storage is updated on every submit(next step click) and the formikContext sync with localStorage is done on every first render of each step based on some checks. This is done like that because the validation is done on the formikContext, meaning that even if we have another storage for the donation data we'll still have to update the formikContext because the next button won't be clickable. I tried doing this task in many ways, but every time there was some edge case which breaks the flow. I'm not sure that I'll be able change the implementation because I have been transferred to another project.
PS: The stepsContext is handled like you said, but the whole stepper is handled with formik and I don't think that there is an elegant way of handling it, one reason is that the initial state when you go from step 1 to step 2 will be only the data from step 1, which will trigger typescript to throw type mismatch error (I'm not sure about that).

I see what you mean. I was more thinking some way to abstract that local storage saving logic in some way. I am unsure actually how exactly. Considering also the new flow will be very much different than this current implementation if we want to reuse anything it would have to be very abstracted.
What I am thinking is to somehow wrap around Formik itself and save to local storage based upon some event that Formik exposes

What I am thinking is to somehow wrap around Formik itself and save to local storage based upon some event that Formik exposes

@momchiii About that take a look at https://github.com/podkrepi-bg/frontend/issues/1260#issuecomment-1398328084

closing in favor of https://github.com/podkrepi-bg/frontend/pull/1533


Null-ref error when using Batch Delete with .Net 6 RC1

Here is what to include in your request to make sure we implement a solution as quickly as possible.
I've got code that calls IQueryable<T>.Delete(), and it works fine with .Net 6 up to preview 7. I upgraded to RC1, and it crashes with a null-ref exception somewhere inside the Delete method.
Is this a known issue, and will you be releasing an RC1 version sometime soon? :)

Hello @Webreaper ,
Are you using the latest version of our library: https://www.nuget.org/packages/Z.EntityFramework.Plus.EFCore/6.0.0-rc.1.21452.10-1?
We released our RC1 compatible with them yesterday ;)
The latest EF Core RC1 had many breaking changes in their internal API, so if you were using a preview version of our library, it will sure throw an error like this one.
Best Regards,
Jon

Sponsorship
Help us improve this library
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Bulk Operations •  Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function

Heh. I did a check for any fixes and updated sometime on Tuesday night or Wednesday morning..... I'm guessing I must have missed the new build by a matter of a few hours!
Thanks, will give it a shot! :)

Confirmed fixed.

Awesome @Webreaper
Don't hesitate to contact us with any questions.
Best Regards,
Jon


Adds ability to quickly deploy server to Heroku with limitations

Limitations are SQLite and no websockets.

@stubailo @tmeasday - Just wanted to get this on your radar. These are the changes required to get one click deployments working on Heroku.


[Feature] context.environment

Is your feature request related to a problem? Please describe.
I'd like to use environment name to automatically set NODE_ENV variable
Describe the solution you'd like
context.environment object with name field in the component definition context
Describe alternatives you've considered
Using namespace name can be a workaround, however, they're often not equal to env name

I think ENV is not a model of vela-core and OAM.  it is defined by vela-api-server. So you can not find it in the definition of Application.
If you need some customized infos, you could set them into labels, and the you can use it by context.appLabels["foo"]

That's unfortunate, but thanks, labels is ok as workaround.
I hope oam will address this in future

Btw it's a bit strange that envbinding is present as entity in core.oam.dev/v1alpha1, but env itself is not

Btw it's a bit strange that envbinding is present as entity in core.oam.dev/v1alpha1, but env itself is not

envbinding is deprecated for about one year and will be removed soon. The name of envbinding is confusing and does not mean the same thing with ENV.

Thx, if there are no plans for envs in oam, the issue can be closed


Handle international characters

(I am not quite sure what part of the regular expression is problematic for greenery, so please change the title accordingly.)
I can compile the following pattern with re:
import re
re.compile(
    '^([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+([ \t]*;[ \t]*([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+|"(([\t !#-\\[\\]-~]|[\\x80-\\xff])|\\\\([\t !-~]|[\\x80-\\xff]))*"))*$'
)

... but greenery fails:
import greenery

greenery.parse(
    '^([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+([ \t]*;[ \t]*([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+|"(([\t !#-\\[\\]-~]|[\\x80-\\xff])|\\\\([\t !-~]|[\\x80-\\xff]))*"))*$'
)

with the exception:
greenery.parse.NoMatch: Could not parse '^([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+([ \t]*;[ \t]*([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+|"(([\t !#-\\[\\]-~]|[\\x80-\\xff])|\\\\([\t !-~]|[\\x80-\\xff]))*"))*$' beyond index 1

This might be related to #100 -- though the error message is a bit confusing here (index 1 is (, I suppose).

When I undo the special characters (to circumvent #100), I still get an exception:
greenery.parse(
    '^([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+([ \t]*;[ \t]*([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+|"(([\t !#-\\[\\]-~]|[\x80-ÿ])|\\\\([\t !-~]|[\x80-ÿ]))*"))*$'
)

The exception:
greenery.parse.NoMatch: Could not parse '^([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+/([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+([ \t]*;[ \t]*([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+=(([!#$%&\'*+\\-.^_`|~0-9a-zA-Z])+|"(([\t !#-\\[\\]-~]|[\x80-ÿ])|\\\\([\t !-~]|[\x80-ÿ]))*"))*$' beyond index 1

(Mind that characters \x80 are not escaped in the pattern.)

I narrowed this down to:
greenery.parse("[!#$%&'*+\\-.^]")

which fails. Escaping ^ fixes the issue:
greenery.parse("[!#$%&'*+\\-.\\^]")

This is probably by design, if I understood the readme correctly?

Correct, the parser is intentionally very simple and if you want a literal caret in a character class you need to backslash-escape it. There are lot of sophisticated bits of syntax for character classes, like [^-] and [^^] and []], which are technically unambiguous but in practice (1) I consider confusing to read and (2) are a total headache to implement when parsing. I will consider enhancing the parser to handle this but for now the workaround is backslashes.

Note that my project interegular tries quite a bit harder to match stdlib's re syntax and I am currently reworking it to use greenery.fsm in the background, so that might be a better fit for your usecase.


What is the purpose of the Assert.IsTrue and Assert.IsNull methods?

Description
We have these methods with the same meaning:
// null
Assert.AreEqual(null, foo);
Assert.IsNull(foo);

// true
Assert.AreEqual(true, foo);
Assert.IsTrue(foo);

So what is the purpose of the two concrete methods in the case that we have an Assert.AreEqual for replacement.
Why I want to ask this question here?
My team writes unit tests using MSTest v1.4, but we can't determine to use which one for team conventions.

@walterlv it's flexibility and simplicity. Please choose whatever you prefer and both achieves the same.


Update bundle generator to work in a docker container (jenkins)

Parameterized build-engine to allow use of other container build tools (buildah, podman)
Parameterized image-tag, to allow a bundle to reference image tags.

Modified opm index index add to be done in 2 parts.
First generate the index dockerfile.  Second build the index image.
This makes it possible to use buildah for the image build.
Signed-off-by: Vanessa Busch<EMAIL_ADDRESS>

Similar changes are in #275 along with adjustments to use the new bundle generator in kas-fleetshard. Closing this in favor of that PR.


Make detrending polynomial

IMPORTANT: Please do not create a Pull Request without creating an issue first.
Before submitting (must do checklist)

[x] Did you read the contribution guide?
[x] Did you update the docs? We use Numpy format for all the methods and classes.
[x] Did you write any new necessary tests?
[x] Did you update the CHANGELOG?

Type of Change

[ ] Examples / docs / tutorials / contributors update
[ ] Bug fix (non-breaking change which fixes an issue)
[x] Improvement (non-breaking change which improves an existing feature)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Proposed Changes
Look #547.
Related Issue
#547.
Closing issues
Closes #547.

Codecov Report

Merging #566 (7dec128) into master (1e1b6e3) will decrease coverage by 32.79%.
The diff coverage is 43.33%.

:exclamation: Current head 7dec128 differs from pull request most recent head 5f09fbf. Consider uploading reports for the commit 5f09fbf to get more accurate results

@@             Coverage Diff             @@
##           master     #566       +/-   ##
===========================================
- Coverage   87.28%   54.48%   -32.80%
===========================================
  Files         118      118
  Lines        5692     5701        +9
===========================================
- Hits         4968     3106     -1862
- Misses        724     2595     +1871

Impacted Files
Coverage Δ

etna/transforms/decomposition/detrend.py
49.27% <43.33%> (-49.06%)
:arrow_down:

etna/commands/__init__.py
0.00% <0.00%> (-100.00%)
:arrow_down:

etna/commands/backtest_command.py
0.00% <0.00%> (-96.43%)
:arrow_down:

etna/commands/forecast_command.py
0.00% <0.00%> (-92.00%)
:arrow_down:

etna/commands/__main__.py
0.00% <0.00%> (-87.50%)
:arrow_down:

etna/commands/resolvers.py
0.00% <0.00%> (-80.00%)
:arrow_down:

etna/analysis/outliers/density_outliers.py
22.44% <0.00%> (-75.52%)
:arrow_down:

etna/datasets/datasets_generation.py
26.47% <0.00%> (-73.53%)
:arrow_down:

etna/transforms/timestamp/time_flags.py
27.02% <0.00%> (-72.98%)
:arrow_down:

etna/transforms/timestamp/fourier.py
28.57% <0.00%> (-71.43%)
:arrow_down:

... and 68 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e1b6e3...5f09fbf. Read the comment docs.


capture POST request body in Application Insights

Is it possible to capture POST request body in Application Insights as a custom dimension similar to C# code given in solution for https://stackoverflow.com/questions/42686363/view-post-request-body-in-application-insights ?
If so, can anyone help with similar code for dart as I am unable to find ITelemetryInitializer in flutter / dart?

Not really in the scope of this project since it would be potentially costly to do so, but basically I think you'd just want to use TelemetryHttpClient as a reference and in the send method you can check whether request is of type Request to get access to the body


Db2 and Oracle instances

Relevant information
Add synth definitions for DB2 and Oracle instances.
Checklist

[ ] I've read the guidelines and understand the acceptance criteria.
[ ] The value of the attribute marked as identifier will be unique and valid.
[ ] I've confirmed that my entity type wasn't already defined. If it is I'm providing an
explanation above.

relates #249
@sri-shetty this is a proposal based on the data you provided to get the ball rolling.
It still requires dashboards and golden-metrics and summary-metrics. I understand you will provide those.
For our side: We will need to create the JS widgets + I think the alertable field still requires manual update on unify?
Finally this should be under "On host" ui category.

closing @sri-shetty is working in a PR with GM & dashboards + the defs.


Replace JSONP with XHR where possible

This addresses #5040 by replacing JSONP with XHR where we can, namely:

Bing imagery metadata access
Esri imagery metadata access
Wikipedia API access
Wikidata API access

The only thing still using JSONP after this is Streetside because that doesn't currently have CORS support as far as I know.

Thanks @tomhughes for this!  Just tried it out and it works great 👍


Window matches? method return nil? when passing absolute url

Meta -
Watir Version: 6.16.5
Selenium Version:  3.142.3
Browser Version: Version 76.0.3809.132
Browser Driver Version: ChromeDriver 76.0.3809.126
OS Version: MacOs 10.14.6
Expected Behavior
window matches? method must return true
Actual Behavior
https://github.com/watir/watir/blob/9e63367b9f35a65e629fd98ab39fec022b8d3603/lib/watir/window.rb#L232
@browser.url =~ /#{@selector[:url]}/
return nil even url string same.
Steps to reproduce
Assume:
@browser.url = "http://localhost:3001/app?email=test.com#"
@selector[:url] = "http://localhost:3001/app?email=test.com#"

NOTE: I am trying upgrade Watir gem from v.6.11.0 to 6.16.5.
Found below difference:
v.6.11.0
https://github.com/watir/watir/blob/49bd10f87d3f6470bcdc3b0c35d4a45d436b8d4d/lib/watir/window.rb#L238
v6.16.5
https://github.com/watir/watir/blob/9e63367b9f35a65e629fd98ab39fec022b8d3603/lib/watir/window.rb#L232

I would appreciate if anyone please help me with this issue? or let me know if we have any workaround so that i can unblock myself with gem upgrade.
Thanks

@ypatel-reflektive I think the match is failing because of the way the :url is escaped by #{}:
irb(main):053:0> a = "http://localhost:3001/app?email=test.com#"
=> "http://localhost:3001/app?email=test.com#"
irb(main):054:0> b = /#{"http://localhost:3001/app?email=test.com#"}/
=> /http:\/\/localhost:3001\/app?email=test.com#/
irb(main):055:0> a.match? b
=> false

Using Regexp.escape fixes this:
irb(main):046:0> a = "http://localhost:3001/app?email=test.com#"
=> "http://localhost:3001/app?email=test.com#"
irb(main):047:0> b = Regexp.escape "http://localhost:3001/app?email=test.com#"
=> "http://localhost:3001/app\\?email=test\\.com\\#"
irb(main):048:0> a.match? b
=> true

So what exactly are you doing that is blocked by this?

@ypatel-reflektive I think the match is failing because of the way the :url is escaped by #{}:
irb(main):053:0> a = "http://localhost:3001/app?email=test.com#"
=> "http://localhost:3001/app?email=test.com#"
irb(main):054:0> b = /#{"http://localhost:3001/app?email=test.com#"}/
=> /http:\/\/localhost:3001\/app?email=test.com#/
irb(main):055:0> a.match? b
=> false

Using Regexp.escape fixes this:
irb(main):046:0> a = "http://localhost:3001/app?email=test.com#"
=> "http://localhost:3001/app?email=test.com#"
irb(main):047:0> b = Regexp.escape "http://localhost:3001/app?email=test.com#"
=> "http://localhost:3001/app\\?email=test\\.com\\#"
irb(main):048:0> a.match? b
=> true

So what exactly are you doing that is blocked by this?

Thanks @kapoorlakshya

Using Regexp.escape i am able to unblock myself, hence closing this issue.


packer-rocm: configurable packages w/ 'amdgpu_install'

Realizing I overdid it a bit, assuming both amdgpu-dkms and rocm will want to be installed. The packages included in the image is now configurable with amdgpu_install.
One may now opt to build an image only with amdgpu-dkms, just amdgpu-install, or as many extra packages are desired.
Up next: ga (or equivalent); if repo.radeon.com is used or Artifactory/another URL for amdgpu-install

Sparing users from the build setup/command, I've written a playbook that reproduces the manual steps. It clones packer-maas under ADA so that it can then copy the ADA assets into the proper sub-directory for building.
To rebuild... the artifact ubuntu-rocm.dd.gz must be deleted once built; I've used the creates keyword on the build command so it won't overwrite.


WIP installation: explicitly specify versions for jquery plugins

Explicitly specify versions for jquery plugins:

jquery.form.js
jquery.MultiFile.js
jquery.dataTables.min.js
Add -O parameters for all wget commands within jquery installations to avoid piling up files.
Dump jquery.min.js to the proper name right away.
Add -u to unzip calls to avoid queries in case file exists

TODO: json2.js does not provide any version tags on github. This is the only one that still comes in the latest version.
This addresses issue #11 for maint-1.1

@tiborsimko I added the -O to address the point mentioned by @kaplun as well as your comment in the original issue (piling up foo.1, foo.2, foo.3) which happens in case of subsequent install calls without intermediary cleanup. We actually observed a problem here during install where people installed a new version using the install-call, but cause it was named zip.1 while the old .zip it didn't get unpacked. So they believed to be on the correct version but weren't. (Not easy to find without access to the shell.)
However, of course I see you point with the version number in two places. I could go into the code a bit more to do something like wget -O jquery.bookmark.package.zip http://invenio-software.org/download/jquery/jquery.bookmark.package-1.4.0.zip and then unpack the unversioned zip. Otherwise have to fix version numbering in at least two places anyway as the unzip calls also run against versioned packages. Would that be "best of two worlds"?
One could even go so far as to refactor the code into something along the lines of
export jquery_bookmark_package='jquery.bookmark.package-1.4.0.zip'
wget -O $jquery_bookmark_package http://invenio-software.org/download/jquery/$jquery_bookmark_package
unzip -u $jquery_bookmark_package
which would allow to move all version informations to one block in front of the fetch/unpack routines. This is something I usually find handy in other scripts I do for similar issues. I just didn't want to change to much in the code. That's why I left this out.
Anyway, if I go into this, I admit, that I'd also move the unpacking routines either at the end of the queue after all downloads where done or at directly after the download as such. Right now they are a bit scattered around and in some cases it's not yet clear when a zip get's unpacked as ther're several wget in between. I could do this as well if you like the idea.The diff would, however, then get a bit larger, basically with all proposed the whole block would be new.
BTW: please note that I've the fixes ready for master as well, just didn't make the PR yet. I'll keep that here till you drop me a note how you like it best.

[...] which happens in case of subsequent install calls without intermediary cleanup

Ah, I see, yes, if people do not call "uninstall" explicitly, then bad things would happen.

I could go into the code a bit more to do something like [...]

A simpler option would be to use wget -N http://example.org/foo.zip. This switches on the timestamp checking, and if the remote file is newer, it will download and override any local file there may be.
It is probably not worth the trouble to make any more advanced changes; we can keep your branch as is, and eventually change some of the statements to use -N where appropriate (e.g. when we keep versions.)
(In Invenio 2 this is solved by other means anyway.)

BTW: please note that I've the fixes ready for master as well, just didn't make the PR yet. I'll keep that here till you drop me a note how you like it best.

Perfect; please make a PR in the same form as you have.

Reviewed-by: Tibor Simko<EMAIL_ADDRESS>Thanks, rebased against maint-1.1, squashed, amended commit log message, and merged as bdf145891b5f44044bcbe44f7c7013aeb4af805f.


sdk内部报错引起服务异常重启

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007ff50b218d11, pid=1, tid=0x00007ff4d7c87700

JRE version: OpenJDK Runtime Environment (8.0_292-b10) (build 1.8.0_292-b10)
Java VM: OpenJDK 64-Bit Server VM (25.292-b10 mixed mode linux-amd64 compressed oops)
Problematic frame:
C  [libc.so.6+0x21d11]  abort+0x203

Core dump written. Default location: /home/xpmotors/local/core or core.1

An error report file with more information is saved as:
/home/xpmotors/local/hs_err_pid1.log
terminate called after throwing an instance of 'Microsoft::CognitiveServices::Speech::Impl::ExceptionWithCallStack'
what():  Exception with an error code: 0x2 (SPXERR_ALREADY_INITIALIZED)

If you would like to submit a bug report, please visit:
https://bugzilla.redhat.com/enter_bug.cgi?product=Red Hat Enterprise Linux 8&component=java-1.8.0-openjdk

Hi there,
Thanks for reaching out. Can you give me some more detail on what your code looks like that causes this error? Is there a particular scenario that causes it or is it every time? What OS and architecture are you running?

Closed since no update received in 3 weeks. Please open a new issue if more support is needed.


Vertical scroll is not working for Android when nesting in a ScrollView

Firstly thanks for making this package - it's been working great for my project requirements! 🙌
I have an issue where the scroll of the PanPinchView is disabled on Android in certain conditions:
I have a screen component:
<SafeAreaView flex={1} paddingTop={50}>
			<ScrollView gap={8}>
				{/* Other content here */}
				{/* `Board` is the PanPinchView component... */}
				<Board />
			</ScrollView>
		</SafeAreaView>

For the Board component I have:
		<View justifyContent='center' alignItems='center' alignSelf='center' borderWidth={1} marginVertical={50}>
			<PanPinchView
				ref={panPinchViewRef}
				minScale={1}
				initialScale={2}
				containerDimensions={CANVAS_DIMENSIONS}
				contentDimensions={CONTENT_DIMENSIONS}
			>
				<BoardContent />
			</PanPinchView>
		</View>

When the content in the screen is less than the screen height (so the scroll for the screen ScrollView isn't needed), then the PanPinchView interactions work fine.
When the content is larger than the screen height (so the ScrollView scroll is enabled), then the PanPinchView will not scroll the inner view vertically. Scrolling horizontally seems to work fine.
This is also only an issue for Android - on iOS it seems to scroll fine.
I have added nestedScrollEnabled (Android-only prop) to the outer screen ScrollView, but this has not had an effect (I guess this is not really relevant for functionality of the package's underlying gesture handler views).
Is there a way I can enable the PanPinchView scroll to work correctly when nested inside an outer ScrollView?

Hm, this is an interesting case.
Usually, it's advised to avoid nested scroll views with same orientation in react native. That's why vertical scroll doesn't work as you mentioned.
Can you create demo content for <BoardContent />, so I can help better?

Thanks for the quick reply. Attached is the component and some test data that will populate the content.
The View you'll be able to see where we're using Gluestack doesn't do anything interesting, it's just a regular View with a backgroundColor:
import { createStyle } from "@gluestack-style/react";

export const View = createStyle({
	backgroundColor: "$backgroundBottom"
});

PanPinchView-content.zip

Hi @fakeheal - thanks again for getting back to me yesterday and apologies for following up so soon. Is this something you've been able to replicate and do you have any suggestions on how to fix it?
Hopefully the content I provided is enough to replicate, and I also guess this is something that can be replicated with more minimal content. If there's any more info you need, please let me know.
Thanks again for building and supporting this great product!

Hey, @DanStevensonDev, unfortunately I am quite busy this week and I will not able to spend the time needed to look at your case in depth with the provided two files.
If you can spare few more minutes, would it be possible to provide a complete repository I can checkout and replicate the problem?

@DanStevensonDev, Awesome! 🙌
I was able to run the repository and reproduce the problem in an Android emulator. I will take a look tonight.
One last question, are you, also, using an emulator or a real device? What are their specs - android version, model, etc?

@fakeheal - great, thanks! 🙌
These are the devices I've tested with...
The emulator is: Pixel_3a_API_34_extension_level_7_arm64-v8a
The real device is: Moto e6s Android version 9

@DanStevensonDev
The issue comes from the react-native-gesture-handler. The PanPinchView doesn't implement any ScrollViews, so my initial assumption that nested ScrollViews were causing problems was wrong.
After spending several hours trying to figure out a way to make this library work if it's put inside a scroll view for almost all use cases, I came to the conclusion that implementing such "feature" is kind of out of scope of the library right now. :(
Here's a great write-up of someone who has faced this issue fairly recently and proposed solutions:
It's hard to understand how to compose gestures with ScrollView@react-naitve-gesture-handler.
Possible workarounds (depending on how flexible your specifications are):

Move out the PanPinchView out of the ScrollView
Replace the ScrollView with FlatList and add the PanPinchView as its Header (?, this might produce weird results, tho :D)

@fakeheal - thanks very much for looking into this and for the explanation. Totally understand - scrolls within scrolls can be complicated/weird 😄
We might be able to keep using the package by moving it out of the ScrollView - I hope so because it's a great package!
Thanks again!


ONNX mask_rcnn_qdq failed with AssertionError

Type of Change
bug fix
Description
Defect/regression:
File "/home/tensorflow/miniconda3/envs/onnxrt-1.13.1-3.8-clx8280/lib/python3.8/site-packages/neural_compressor/model/onnx_model.py", line 406, in topological_sort assert len(nodes) == len(self.model.graph.node) AssertionError
Profile: log:
https://inteltf-jenk.sh.intel.com/blue/rest/organizations/jenkins/pipelines/intel-lpot-validation/runs/216404/nodes/114/log/?start=0
report: https://inteltf-jenk.sh.intel.com/job/intel-lpot-validation-top-mr-extension/3406/artifact/report.html
commit id ：
0b7134309ed1ded5fde9905e5686b70edef4b9ad failed
71b056b53015e05b7ab9289d31edaf4200dca628 pass
Framework: onnxrt
Framework version: 1.13.1
JIRA ticket: ILITV-2434
How has this PR been tested?
extension test: mask-rcnn-qdq
Dependency Change?
no

extension test on mask_rcnn_qdq:
https://inteltf-jenk.sh.intel.com/job/intel-lpot-validation-top-mr-extension/3412/artifact/report.html


mgmt, incremental version manually

There seems to be some problem on the release pipeline. "Publish to Java Dev Feed" steps fails with
##[error]Unable to resolve version of external dependency 'org.apache.maven.plugins:maven-gpg-plugin'

Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:

[ ] The pull request does not introduce [breaking changes]
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[ ] I have read the contribution guidelines.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

/azp run java - relay

API change check
API changes are not detected in this pull request.

API change check
API changes are not detected in this pull request.


Stuck on awaiting scripts

Hi!
I just installed vRP on my localhost, and I don't experience any issues - either in the server console or F8.
When I'm joining I'm stuck on awaiting scripts.
I don't know what I can do to fix this.

Hi have you fixed this? I have the same problem

Is this resolved? Thank you

Hey, I'm having the same issue, and I have no idea how to fix it, please, if anyone has even the slightest clue how to fix it, it would be appreciated if they posted it here.

For those still having this issue, make sure you are running the latest versions of FXServer and ensure that your database is configured correctly.


Feature Request: support for Flex v2

Issue Summary
Now that Flex v2 is officially in GA, it would be awesome to have support for this new production version + the conversation API

Hi @maurice-ttp, I believe this is a work in progress on the product API side. In order to properly track this feature request, please file a support ticket


Add intermediate export stage

Description
When a long running export job is run there is no intermediate states recorded. This means that if the job is stopped and restarted it has to start from the beginning. This PR adds saving of intermediate stages to long running jobs by having the heartbeat record results every 10 minutes.
Related issues
Addresses Bug 99078: Single threaded export does not save intermediate states
Testing
Manual testing and new unit test.
FHIR Team Checklist

[ ] Update the title of the PR to be succinct and less than 50 characters
[ ] Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
[ ] Tag the PR with the type of update: Bug, Dependencies, Enhancement, or New-Feature
[ ] Tag the PR with Azure API for FHIR if this will release to the Azure API for FHIR managed service (CosmosDB or common code related to service)
[ ] Tag the PR with Azure Healthcare APIs if this will release to the Azure Healthcare APIs managed service (Sql server or common code related to service)
[ ] CI is green before merge
Review squash-merge requirements

Semver Change (docs)
Patch

Heavy heartbeats is a leftover of wrong design used by $import. It leads to "N-square" problem, where N is number of saves, in case when each save includes results of previous saves.
Good example is maintaining full list of file urls written by $export. Assume 10K files, 10 new files are added every 10 minutes, 1000 saves. Average number of file urls per save is 5K. Total data written 5K * 1K = 5M file urls, instead of just 10K.
I missed adding deprecated attribute on heavy heartbeats method. I will add it.
Please change logic to save incremental states (10 new file urls in the above example) as separate completed jobs using group id of the main parent job.


[WIP] Python code for generating and writing test architecture

This is a very WIP code that in the end should allow to easily define a test FPGA architecture with timings. Currently it generates and writes site types and tile types, no alternative site types supported.

Testarch generated right now can be combined with gen_device_config.yaml in nextpnr_emit to emit testarch database, but when trying to run wire test, nextpnr fails on assertion in line 150 in arch_pack_io.cc

So far this works, testarch capnp is generated and is valid, I'm able to compile it to chip database, and with custom yosys techmaps and flow testarch can pass wire test, but const_wire is still not working.
I'm removing WIP tag, as technically code produces some testarch and correct capnp.

This requires a rebase, and I think we can go ahead and merge once CI is green


HystrixTimer should be a plugin and Lazy load

The HystrixTimer is currently a singleton that loads eagerly. In an effort to make all initial bootstrapping and a single entry point of Hystrix I recommend that the HystrixPlugins do the loading of the HystrixTimer and ideally make this another SPI for the behavior this class provides.
I can bang out a PR later for this.
See #1101

Sure, that sounds like another step in the right direction.  Thanks for jumping on it - happy to review whenever I see it submitted


Support custom input views

Hi David,
to support own custom input views please move the setUpConstriantsForViews() method from viewDidLoad() to viewWillAppear(animated: Bool).
After that change we are able to create our own input views in our NMessengerViewController by doing the following:
    override func viewDidLoad() {
        super.viewDidLoad()

        self.inputBarView.removeFromSuperview()
        self.inputBarView = NuukInputBarView(controller: self)
        self.view.addSubview(self.inputBarView)
    }

Best Alex

Made pr #13

@alibasta Are you using the code on master or the latest cocoapod?

Latest cocoa pod. The changes worked for me.

Why var inputBarView: InputBarViewProtocol! is IBOutlet anyways it is loaded using loadInputView. Maybe best way would be make this method public that it could be overrided by custom of the NMessengerViewController subclass. What do you think?

Thats what I recommended as cleanest way to @DavidSchechter at Slack (making the method public). He wanted this solution.

We're working on refactoring this right now

I'm thinking also about this to give only needed control:
    private func loadInputView() {
        self.inputBarView = provideInputBarView()

        if let inputBarView = self.inputBarView as? UIView {
            self.view.addSubview(inputBarView)
        }
    }

...

   public func provideInputBarView() -> InputBarView {
       return InputBarView(controller: self)
   }

Yes. Looks good to me.

The inputBar protocol will be implemented by a base inputBarView class which can be subclassed. Our inputBarView will subclass this base class. We're still debating how a custom inputBar should be added in the NMessengerViewController subclass.

#14 Added
     {
         return NMessengerBarView(controller: self)
      }```

`InputBarView` Is now a base class that can used to create your own InputBar.

Great 👍  For me only name of the method should be changed to fit swift naming conventions. Func should do something. Or it could be changed to computed property like:
public var customInputBar: InputBarView {
    return return NMessengerBarView(controller: self)
}

👍

@nonameplum We don't want to use a computed property because the inputBar will most likely only need to be created during viewDidLoad. However, we could update the view when this property is set. I would need to think about the repercussions of refactoring before we start implementing it.
In regard to the function naming -- I think that we should name it something similar to getBubble() in BubbleConfigurationProtocol for consistency. Perhaps getInputBar().

yeah, I agree with you. I still fell as you that method is better choice in this case.
If you started with get convection it sounds correct.
I can only link here swift api naming guidelines:
https://swift.org/documentation/api-design-guidelines/#strive-for-fluent-usage
This method is like factory method so it may have makeInputBar() but as I said, your proposition is still great :)

👍 I'm going to update the documentation later today, so I'll include it in that PR.


EDM-656: agent/device improve systemd status reporting

This PR improves systemd status reporting. Although in the future it will have its own status this improves the interim reporting.
  status:
    applications:
    - name: oci-demo-app
      ready: 3/3
      restarts: 0
      status: Running
    - name: chronyd.service
      ready: 1/1
      restarts: 0
      status: Running

cc @celdrake

LGTM.
Not a blocker for this PR, but I will discuss with Nir regarding the systemd units, as we never had a proper UX review for them. ATM the UI only supports operations for systemd units of fleetless devices.

Yeah its an interim state but better than what it is. We will look at prioritizing the systemd status changes. But we should merge this for now.


Question : using traefik, allow more ports

Good Day
I would like to request your help regarding the additional ports on the IIS site using traefik.
I am currently multiple containers on a single host , along with the standard NAV ports, I would also like to add few more ports to be exposed on the container ,how do I add them to traefik file ,which labels do I need to edit
Thank you in advance.

If you look in New-NavContainer around line 956 - it specifies a number of parameters to the container specifying which ports should be redirected.
I would assume you could add more in -additionalParameters - but I have not tried/had the need.

Thanks much freddy
I will give a try on this.
Have a nice Day


有openwrt编译make文件吗？

希望参与测试

https://suikastar.com/posts/56623/
rust支持交叉编译，参考上面文章试试

不理想
Compiling cfg-if v0.1.10
Compiling lazy_static v1.4.0
Compiling slab v0.4.2
Compiling getrandom v0.1.14
error[E0463]: can't find crate for core
|
= note: the x86_64-unknown-linux-musl target may not be installed
error[E0463]: can't find crate for core
|
= note: the x86_64-unknown-linux-musl target may not be installed
error: aborting due to previous error
error: aborting due to previous error
For more information about this error, try rustc --explain E0463.
For more information about this error, try rustc --explain E0463.
error: could not compile cfg-if.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: could not compile lazy_static.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for std
|
= note: the x86_64-unknown-linux-musl target may not be installed
error: aborting due to previous error
For more information about this error, try rustc --explain E0463.
error: could not compile slab.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

你上面这个报错的意思是你缺少x86_64-unknown-linux-musl目标，rustup target add x86_64-unknown-linux-musl 试一下

试了一下，目前应该没办法编译出来mips版本，ring组件就不支持mips，我看了一下17年就有人提了，到现在还没解决，这个问题我先关闭了

我用的是x86-64的cpu


Add horizontal pod autoscaler support

PR for adding Smith support for the built-in K8s HorizontalPodAutoscaler objects.
Adds:

Readiness checking function for HPAs
Adds informer for HPAs to the Bundle Controller

👍