text:
Should charm library use stored state ?

The Prometheus charm library currently uses stored state to save it's list of scape targets. This was motivated by the need to allow use of the library independent of whether a Prometheus relation was instantiated at the time when add_endpoint was invoked. However stored state is a per unit state and hence this may be problematic.

If it is something that is being tracked as application data, then I would
put it into a peer relation so that it is preserved for all peers to see.
StoredState is for a charm to track where it is at relative to its
application, but overall application (eg, password for a remote app) would
belong in relation data.
On Fri, May 21, 2021 at 9:01 AM Balbir Thomas @.***>
wrote:

The Prometheus charm library currently uses stored state to save it's list
of scape targets. This was motivated by the need to allow use of the
library independent of whether a Prometheus relation was instantiated at
the time when add_endpoint was invoked. However stored state is a per
unit state and hence this may be problematic.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/canonical/prometheus-operator/issues/32, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABRQ7O7S2TEGDJ7VR43WT3TOZKT3ANCNFSM45JDRGBQ
.

Thank you @jameinel .  Permit me to provide a bit more context. It is my endeavour to imbue the two methods add_endpoint() and remove_endpoint() with the following properties

They can be invoked at any time in the client charm's lifecycle. Perhaps even if the system administrator has not created a relation between the client charm and the Prometheus charm.
They do not depend on the point of invocation being guarded by a is_leader() check. It should only be a simple matter for any client charm unit to know its own host address and call add_endpoint() or remove_endpoint() using just that information.
They impose very little (if any) constraint on the client charm (for example requiring the client charm must define a peer relation in its metadata).
They do not impose complex code flows on the client charm (for example making the client charm responsible for aggregating and passing a list of its peer IPs to the Prometheus charm).
They allow multiple relations between Prometheus and the client charm.

If am successful in meeting these conditions then the usage of these two methods by the client charm becomes very simple. Both these methods have one argument the client charm's unit IP address that must be added or removed from the list of Prometheus' scrape targets. Perhaps I am misguided in my efforts but I am trying to push the boundaries of my knowledge here and explore what is possible.

So this is not about the Prometheus charm, but the Prometheus client lib, correct?
With the intent that the local application (say postgresql) can define information about how it would be scraped if it had a prometheus relation.
I'm not sure that you need the ability to think about what you would pass, if you aren't related. It seems useful to be able to only do that work in response to a relation-created/joined/changed.
What is the use for multiple Prometheus relations? To support multiple aggregators? Seems interesting.
If I do understand that this is the client library I can see where some of the other functionality (stored state vs relation data, vs peer relation data) changes a bit.

Yes.Indeed the properties are relevant for the Prometheus client lib not the Prometheus charm.
The property that a client  charm is able to use the Prometheus charm library to add a scrape endpoint (invoking add_endpoint()) even if the system administrator has not created a Prometheus relation simplifies the use of the charm library. For example the client charm does not need to check that a relation actually exists before calling add_endpoint(). Instead add_endpoint() can be invoked at any time in the client charm's lifecycle. For example it could be invoked in the StartEvent.  I am not sure if this is feasible, if not I will drop the idea. I am trying to explore how far I can simplify the usage of such a charm library.
Having discussed the five properties with @jlounder I stand corrected and the charm library does not need to support multiple relations between the same two applications. As far as Prometheus is concerned there does not seem to be a use case for this.
Also an additional configuration option is being considered. This option will allow the client charm to select if all its peer units must be scraped or just one single unit (say the leader) must be scraped.

This ticket is quite old. Perhaps a few integration tests can check if the behaviour is as desired. Hence marking this ticket is marked as testing.

authors: balbirthomas jameinel

repo: canonical/prometheus-operator


text:
test-branch/execute-job/wrong-commit-sha-on-pr/f782b433-1550-4abe-8df6-29331896c0a6

PR for testing 05d9acb156b443a8d899209959d0a95503d2e483

/canonical/self-hosted-runners/run-workflows 931ad21dd9ace68aaa0a7d341e94de96ad93fa6b

source: gharchive/pull-request

repo: canonical/repo-policy-compliance-tests

license_type: permissive

license_source: github-api


text:
test-branch/execute-job/comment-from-wrong-user-on-pr/3c2996d1-6edd-4cfc-afda-752a0adfce5e

PR for testing b44a21d5c2eeae2838deb73c2518e73f6b73ebee

/canonical/self-hosted-runners/run-workflows b44a21d5c2eeae2838deb73c2518e73f6b73ebee


text:
test-branch/execute-job/wrong-comment-on-pr/c7a58757-4ecb-4a1e-b95c-f6139214e8f1

PR for testing 26351b088d798bc4ce86fbfa25f17475c2eb67a5

comment 1

repo: canonical/repo-policy-compliance


text:
https traffic to tempo is silently broken if traefik is not related to a certificates provider

Bug Description
if tempo is related to a certificates provider and an ingress, but the ingress doesn't have a certificate relation, tempo should set blocked so the user knows something is wrong. This helps address issues such as this one.
To Reproduce
see https://github.com/canonical/tempo-k8s-operator/issues/153
Environment
any
Relevant log output
n/a

Additional context
possible ways to address this issue:
try to ping traefik with https and, on failure, we know the ingress isn't ready tot talk https and therefore all tracing relations are bork

Add a pebble service to fire a notice to check if the endpoint is up (can be part of the lib)

source: gharchive/issue

authors: PietroPasotti michaeldmitry


text:
🛑 Ubuntu.com CVE list is down

In e083b13, Ubuntu.com CVE list (https://ubuntu.com/security/cve) was down:

HTTP code: 503
Response time: 5084 ms

Resolved: Ubuntu.com CVE list is back up in e15b264.

repo: canonical/upptime

license: MIT


text:
Replace FxmlLoadException with DolphinRuntimeException and remove dep…

…recated FxmlException class.
In response to issue #630.

This change is

@h93xV2 cool :) THX

@hendrikebbers Anytime :D

repo: canoo/dolphin-platform

license_source: bigquery


text:
Feat: Update/Add New Icons

Added/Updated the NerdFont icons for:

Svelte
Nuxt
Gatsby
Eslint
Prisma
Tailwind
Prettier
Commitlint
Rollup
i18n
Godot
Firebase
Stylint
Zig
Sublime
Jest
Pug
Jinja
Powershell
Gradle
Arduino
Tex
Graphql
Kotlin
Ocaml
Haxe
Puppet
Purescript
Terraform
Babel
Vala
H
HPP
Fortran

As well as added/updated file patterns for:

Commitlint
Svelte
Gatsby
Rollup
Eslint
TailwindCSS
i18n
Prisma
TSConfig

Added addt'l Patterns for following file extensions:

Fortran (.for)

Bonus:

Fix Indentations

Thank you!


text:
Exception of type 'System.OutOfMemoryException' was thrown.

I don't know what was happening when it crashed. I stepped away from my PC and came back to find not one but two of the "Oops! Something went terribly wrong" (or however it's worded). Once I copied the contents to the clipboard and pasted it on this issue, clicking Close caused both of the "Oops!" windows to disappear so I didn't get a chance to compare the details below with the other "Oops!" window.
Version: 1.1.28.0; Variant: Installed; Arch: Amd64
Path: C:\Program Files\SyncTrayzor\SyncTrayzor.exe
System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at SyncTrayzor.Bootstrapper.OnUnhandledException(DispatcherUnhandledExceptionEventArgs e)
at System.Windows.Threading.Dispatcher.CatchException(Exception e)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

It looks like your genuinely ran out of memory I'm afraid. The error you posted occurred when it ran out of memory trying to show a previous error by the looks of it -- so the out-of-memory presumably happened twice in quick succession.

license: mit


text:
Class CSS dinamic

I am following the Guide steps to generate a form with Boostrap and need to append a class to form-group  line:
return '
' + label + widget + error + '
';

Is there any way insert a class in the customCss var?
here is my form.create method (note the css string col-sm-12 and col-sm-6):
var reg_form = forms.create({
  email: fields.email({
    required: true,
    widget: widgets.email({ classes: ['col-sm-12'] }),
    errorAfterField: true,
    cssClasses: {
      label: ['control-label']
    }
  }),
  name: fields.string({
    required: true,
    widget: widgets.password({ classes: ['col-sm-6'] }),
    errorAfterField: true,
    cssClasses: {
      label: ['control-label']
    }
  }),
}, {validatePastFirstError: true});

In that case, that's just an example in the README that you have to implement yourself. You certainly can add anything you like to your own code.

I made a couple of changes, if you want to add it to README:

var reg_form = forms.create({
  email: fields.email({
    required: true,
    widget: widgets.email({ classes: ['col-sm-12'] }),
    errorAfterField: true,
    cssClasses: {
      label: ['control-label'],
      parentDiv: ['col-sm-12']
    }
  }),
  name: fields.string({
    required: true,
    widget: widgets.password({ classes: ['col-sm-6'] }),
    errorAfterField: true,
    cssClasses: {
      label: ['control-label'],
      parentDiv: ['col-sm-6']
    }
  }),
}, {validatePastFirstError: true});

var bootstrapField = function (name, object) {
  var parentCss = 'form-group';

  if (!Array.isArray(object.widget.classes)) { object.widget.classes = []; }
  if (object.widget.classes.indexOf('form-control') === -1) {
    object.widget.classes.push('form-control');
  }

  if (Array.isArray(object.cssClasses.parentDiv)) {
    object.cssClasses.parentDiv.filter (function (str, index) {
      parentCss += ' ' + str;
    });
  }

  var label = object.labelHTML(name);
  var error = object.error ? '' + object.error + '' : '';

  var validationclass = object.value && !object.error ? 'has-success' : '';
  validationclass = object.error ? 'has-error' : validationclass;

  var widget = object.widget.toHTML(name, object);
  return '
' + label + widget + error + '
';
};

Thanks, but I don't think that's really necessary - people can figure out how to customize their own HTML for their purposes.

Thanks to you

authors: ljharb pollardino

repo: caolan/forms


text:
Customer Portal

As a customer, I want portal, so that I can configure my ZITADEL instance and manage my subscriptions.

[ ] UX design for portal
[ ] Setup a new ZITADEL instance
[ ] Change an existing instance
[ ] Manage my subscriptions

Portal should allow to handle referral codes.
This can be related to handling promotional codes, but also includes enabling the referring user to share the info (eg, a code) with the referred user.

Discussion with @fforootd
Do we really need a separate customer portal?
Shouldn't we integrate as much as possible into the console? So our customers have everything at one point.
In this case only the setup process has to be integrated in the marketing page.
--> Console should be enabled to pull the license key from the subscription service, additionally the license key can be entered directly.

Can you outline what will be part of the customer portal? Abstract yes/no is not helpful IMO.
Something like choosing deployment location, payment and subscription info, etc. might be not relevant in a self-hosted instance.

Scenarios
I think we have the following scenarios here, each of those does have a slightly different need:

Open Source - oss does not have something special to it, but maybe customers want to change on the fly to "support services"
Support Service - customers might want to contract a support agreement and in doing so unlock certain enterprise features
Public Cloud - customers want to change their tier, Domain Name and Data Location
Dedicated Instance -  customers want to define/change their provider, data location, scaling, ...

SaaS Special Requirements

Customers need the ability to change  (up and downgrade) "tiers" which allow for certain features and usage limits depending on the tier

Common Features across all scenarios

Select Tier / Scenario
Billing / Payment
Subscription management (ZITADEL should be able to fetch its licensing state from an API)
Depending on the subscription features should be enabled or disabled

related:
#2695
#151
Customer portal should also provide info for support requests

Some kind of system ID
Basic information / debug info to attach to support requests

authors: fforootd fgerschwiler mffap

repo: caos/zitadel


text:
Update fr.json

Modification : traductions plus naturelles pour un utilisateur non technique.

merci

authors: AlexMartinFR caouecs

repo: caouecs/Laravel-lang


text:
Change tracking not working in Multi-tenant CAP Nodejs Project

I am trying to add the plugin @cap-js/change-tracking to store change logs for an Entity in my CAP Nodejs multi tenant Project.
I have followed the guide to implement this Change Tracking Plugin for SAP Cloud Application Programming Model (CAP).
I have added the @changelog annotations to an entity for which I am trying to track changes. This brings the facet in the fiori elements object page. And when I trying to edit a record and save it from the app I am getting below error:
no such table: sap_changelog_ChangeLog in: INSERT INTO sap_changelog_ChangeLog
Below is how I have added the annotation to my service entity in file app/managebooks/annotations.cds :
annotate service.Books with {
title @changelog;
};
It needs the table sap_changelog_ChangeLog to persist the change log entries but just by adding the module in package.json and adding annotation to properties is not generating the table while doing local testing with sqlite. Please let me know if there are some steps missed here.
Thanks & Regards,
Vishal Sharma

Please find the Git repo for the sample app below:
https://github.tools.sap/I583347/change-tracking.git

@vishalsharma190596
did you also redeploy/build the database after installing the change log plugin?
Best,
Nick

@nkaputnik Yes I have done the cds build and redeployement multiple times. Still no issues. Request you to please get the sample project from the git repo I have mentioned above and let me know if there are any issues you could recognize. Also would appreciate it if you could try to replicate the change tracking in the same multi-tenant project from the git repo.
Thanks & Regards,
Vishal Sharma

Hello @vishalsharma190596
can you give me you SAP User ID, I'll set up a meeting next week to jointly go through the use case, the repo you gave me doesn't have any noticable issues for me.
Best,
Nick

repo: cap-js/change-tracking


text:
Firebase is not initialized when using on mobile

Describe the bug
I get it working on Web and can see information on GAnalytics site, but on Android and iOS I only get in console Firebase analytics is not initialized. Make sure initializeFirebase() is called once
I have the setup like this.
  async setup () {
    if (this.platform.is('desktop')) {
     // ionic serve log this
      try {
        console.log('analytics for web')
        const result = await FirebaseAnalytics.initializeFirebase({
          apiKey: 'asdfg',
          authDomain: 'asdf.firebaseapp.com',
          projectId: 'asdf',
          storageBucket: 'asdf.appspot.com',
          messagingSenderId: 'asdf',
          appId: 'asdfg',
          measurementId: 'G-asdf'
        })
        console.log('analytics configured', result)
        await this.setCollectionsEnabled(true)
        this._isConfigured = true
      } catch (err) {
        console.log('analytics configured err', err)
        this._isConfigured = false
      }
    } else if (this.platform.is('mobile')) {
      // Android and iOS log this
      await this.setCollectionsEnabled(true) // I thought this was going to do the initialize, but it doesn't
      console.log('analytics for mobile')
      this._isConfigured = true
    }
    this.setDefaults()
  }

The  setup function is called on app.module.ts
But when I try to log something i get the error multiple times, example like this
    FirebaseAnalytics.logEvent({ name, params })
Expected behavior
To work on Android and iOS
Screenshots
Mobile log is called

A few logs later the error appears.

Desktop (please complete the following information):
ionic 6.16.3
capacitor  2.4.6
macbook pro m1
mac osx 11.3.1
xcode 12.5.1
android studio 4.2.1
"@angular/common": "^10.2.4",
  "@angular/core": "^10.2.4",
  "@angular/forms": "^10.2.4",
  "@angular/platform-browser": "^10.2.4",
  "@angular/platform-browser-dynamic": "^10.2.4",
  "@angular/router": "^10.2.4",
  "@apollo/client": "^3.0.0",
  "@byteowls/capacitor-oauth2": "^2.1.0",
  "@capacitor-community/firebase-analytics": "^0.3.3",
  "@capacitor/android": "^2.4.6",
  "@capacitor/core": "2.4.6",
  "@capacitor/ios": "^2.4.6",
  "@fortawesome/angular-fontawesome": "^0.8.1",
  "@fortawesome/fontawesome-svg-core": "^1.2.34",
  "@fortawesome/free-brands-svg-icons": "^5.15.2",
  "@fortawesome/free-regular-svg-icons": "^5.15.2",
  "@fortawesome/free-solid-svg-icons": "^5.15.2",
  "@ionic-native/core": "^5.0.0",
  "@ionic-native/in-app-browser": "^5.33.1",
  "@ionic-super-tabs/angular": "^7.0.8",
  "@ionic-super-tabs/core": "^7.0.8",
  "@ionic/angular": "^5.0.0",
  "@ngx-translate/core": "^13.0.0",
  "@ngx-translate/http-loader": "^6.0.0",
  "@sentry/capacitor": "^0.1.0",
  "apollo-angular": "^2.2.0",
  "conekta-capacitor": "0.0.22",
  "cordova-plugin-inappbrowser": "^5.0.0",
  "graphql": "^15.0.0",
  "jetifier": "^1.6.6",
  "js-base64": "^3.6.1",
  "leaflet": "^1.7.1",
  "lodash": "^4.17.20",
  "marked": "^2.0.3",
  "moment": "^2.29.1",
  "rxjs": "^6.6.3",
  "tslib": "^2.0.0",
  "zone.js": "~0.10.3"
},
"devDependencies": {
  "@angular-devkit/build-angular": "^0.1000.8",
  "@angular/cli": "^10.2.1",
  "@angular/compiler": "^10.2.4",
  "@angular/compiler-cli": "^10.2.4",
  "@angular/language-service": "^10.2.4",
  "@capacitor/cli": "^2.4.6",
  "@compodoc/compodoc": "^1.1.11",
  "@ionic/angular-toolkit": "^2.3.0",
  "@types/jasmine": "~3.5.0",
  "@types/jasminewd2": "~2.0.3",
  "@types/leaflet": "^1.5.21",
  "@types/lodash": "^4.14.168",
  "@types/node": "^12.11.1",
  "@typescript-eslint/eslint-plugin": "^4.10.0",
  "@typescript-eslint/parser": "^4.10.0",
  "codelyzer": "^6.0.0",
  "ionic-version": "^1.0.3",
  "jasmine-core": "~3.5.0",
  "jasmine-spec-reporter": "~5.0.0",
  "karma": "~5.0.0",
  "karma-chrome-launcher": "~3.1.0",
  "karma-coverage-istanbul-reporter": "~3.0.2",
  "karma-jasmine": "~3.3.0",
  "karma-jasmine-html-reporter": "^1.5.0",
  "nconf": "^0.11.2",
  "netlify": "^6.1.29",
  "protractor": "~7.0.0",
  "snazzy": "^9.0.0",
  "standard": "^16.0.3",
  "ts-node": "~8.3.0",
  "tslint": "~6.1.0",
  "typescript": "~3.9.5"
},

Smartphone (please complete the following information):
android 9 (samsung s8+)
iOS 14.6 (iphone xr)
Or is it that i have to use the web configuration for mobile too?

Also, I got this on Android Studio, despite this it does compile, but may be related

I tested the example app, and I see a difference, the library is not being loaded correctly into the project.

Just found my issue, I was looking the README for capacitor 3, which is in branch master and it says
import { FirebaseAnalytics } from "@capacitor-community/firebase-analytics";

And this was different for capacitor 2, which I found looking at the README inside node_modules/@capacitor-community/firebase-analytics/README.md.
import "@capacitor-community/firebase-analytics";
import { Plugins } from "@capacitor/core";
const { FirebaseAnalytics } = Plugins;

this does not fix the issue with Android Studio, but at least it is now working and recognizing the user, events, logs and page views.

I faced the exact same issue than @carlosen14 for some time , I just read the documentation using directly
import { FirebaseAnalytics } from "@capacitor-community/firebase-analytics";

whereas I should have used native access
const { FirebaseAnalytics } = Plugins;

Maybe the doc' should be improved for this? I guess in most case people will use this plugin for native apps.
cc @brownoxford

same issue but the answers here are outdated...

I am also facing the same issue even after calling the function in my app.component.ts file  for my ionic app.

repo: capacitor-community/firebase-analytics


text:
executeSet return capSQLiteChanges Changes.changes not equal to the statement in array

Hi,
I'm using executeSet to execute a set of "insert on conflict update" statement.
My statement are 57 butwhen I execute the executeSet statement:

the first execution return Changes.changes 60
the second one return Changes.changes 114
I expected Changes.changes return the number of statement I pass in.
So, what does Changes.changes mean in executeSet?
The Changes.changes number what is referring to?

Thanks
Monica

@MonicaExplan it is difficult to answer without having more details on the state of the database and the executeSet statement. The changes number is not tje number of statements executed but it is the number of changes in the database made by the set of statements.

@jepiqueau I'm not sure I understand your explanation. Let's say I  this is my Database:
Database scheme
user(userId, name, email, country)
Already in the database
user(1, Peter, peter@email.com, france)
Then I'm running this:
REPLACE INTO user (userId, name, email, country) VALUES(1, 'Maria', marina@email.com, 'france');
Will this return the count of changed column values (in this example 2), or will it return the number of changed rows (which would be 1 in this example).

@jepiqueau
You have write:
"The changes number is not tje number of statements executed but it is the number of changes in the database made by the set of statements."
Briefly:

there are already 3 records in table sites
I prepare an array named "executionSet" with the statement below foreach of my sites (number 57)
INSERT INTO sites (syncId, code, name, address, city, province, country, zip, email,telephone, lat, lng ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT(syncId) DO UPDATE SET code=excluded.code,name=excluded.name,address=excluded.address,city=excluded.city,province=excluded.province,country=excluded.country,zip=excluded.zip,email=excluded.email,telephone=excluded.telephone,lat=excluded.lat,lng=excluded.lng;
i set transaction to false
I execurte this statment
executeSet(executionSet, transaction)
and I obtain 60 that is 3+57

So I suppose:

it execute the 3 insert, then conflict so execute 3 update on this record.
The other inserts 54 (57-3) work because the records don't exist.
At the end:
3+ 3 +54 = 60, the executeSet() return Changes.changes 60 (but 60 are the SQL statement of the executeSet)
After execution of executeSet() I have 57 records in my table (that' right)...I think that "_the number of changes in the database made by the set of statements" are the record changed succesfully, so 57 not 60

Thanks a lot
Monica

@tobiasmuecksch a REPLACE will return changes.changes = 1

@MonicaExplan I am looking at it this type of statement which was never test so i cannot anticipate the behavior of the plugin. I assume excluded.code, excluded.name ...  are some default values. Are these values the same for all your sites. I do not see the values given for the ?,?,...
Can you provide the detailed complete code of that executeSet

@jepiqueau
I'm using this SQLite statement
https://www.sqlite.org/lang_UPSERT.html
1. About "excluded"
In the link above you can read this explanationa about excluded
"Column names in the expressions of a DO UPDATE refer to the original unchanged value of the column, before the attempted INSERT. To use the value that would have been inserted had the constraint not failed, add the special "excluded." table qualifier to the column name. "
To test in DB Browser is:
INSERT INTO sites (syncId, code, name, address, city, province, country, zip, email,telephone, lat, lng )
VALUES ("01FA1B4AB79B6D43C1257FD90056219C", "ANT012","PORTA DI ROMA","Contrada Mandria","ENNA","EN", "IT","20831","myname@domain.it","0935594117","37,5676737","14,2798519")
ON CONFLICT(syncId) DO UPDATE
SET code=excluded.code
,name=excluded.name
,address=excluded.address
,city=excluded.city
,province=excluded.province
,country=excluded.country
,zip=excluded.zip
,email=excluded.email
,telephone=excluded.telephone
,lat=excluded.lat
,lng=excluded.lng
*2. About executeSet
I'm using the code below to sync Sites data from a Rest Service. The Rest Service response is an Arrary of Object like this:
[
{"siteId":"01FA1B4AB79B6D43C1257FD90056219C","code":"ANT012","officeCode":"ANT012","name":"PORTA DI ROMA","address":"Via Alberto Lionello, 201, Località Bufalotta","city":"ROMA","province":"RM","country":"","zip":"","email":"prolocofossaltina@gmail.com","telephone":"0690233474","lat":"41,9716623","lng":"12,5401904","last_modified":"2021-09-08T10:05:13Z"}
,...
]
I get the response and then my code is very simple:
// a. upsert statement
const statement = INSERT INTO sites (syncId,code,name,address,city,province,country,zip,email,telephone,lat,lng) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) ON CONFLICT(syncId) DO UPDATE SET code=excluded.code,name=excluded.name,address=excluded.address,city=excluded.city,province=excluded.province,country=excluded.country,zip=excluded.zip,email=excluded.email,telephone=excluded.telephone,lat=excluded.lat,lng=excluded.lng;
// b. prepare array of [statement, values] using foreach on the response.data of a Rest Service returning a list of sites
const executionSet = []
response.data.forEach( site => {
const values = [
site.siteId
,site.code
,site.name
,site.address
,site.city
,site.province
,site.country
,site.zip
,site.email
,site.telephone
,site.lat
,site.lng
]
      executionSet.push({
        statement,
        values,
      })

})
// c. execute the set of statement
mydb.executeSet(executionSet, false)
That's all, do you need something else to work on this issue?
Thanks a lot
Monica
P.S: I use this code to sync master data (very numerous) in my APP local DB. If you have others suggestions....it's a pleasure :-)

@MonicaExplan
I made the following example
i start with 6 users in my deb
id: 5, email: "Addington@example.com",name: "Addington", age: 22, sql_deleted: 0, last_modified: 1590388335
id: 6, email: "Bannister@example.com",name: "Bannister", age: 59, sql_deleted: 0, last_modified: 1590393015
id: 7, email: "Jackson@example.com",name: "Jackson", age: 18, sql_deleted: 0, last_modified: 1651648773
id: 8, email: "Bush@example.com",name: "Bush", age: 25, sql_deleted: 0, last_modified: 1651648773
id: 9, email: "Kennedy@example.com",name: "Kennedy", age: 45, sql_deleted: 0, last_modified: 1651648773
id: 10, email: "Jeep@example.com",name: "Jeep", age: 65, sql_deleted: 0, last_modified: 1651648773

the code is:
        try {
            const stuffSet: Array<capSQLiteSet>  = [
                { statement:`INSERT INTO users (name,email,age) VALUES (?,?,?)
                 ON CONFLICT (email)
                 DO UPDATE SET email = "testconflict@example.com", name="TestConflict", last_modified=(strftime('%s', 'now'));`,
                  values:["Addington","Addington@example.com",22]
                },
                { statement:`INSERT INTO users (name,email,age) VALUES (?,?,?)
                 ON CONFLICT (email)
                 DO UPDATE SET email = "testconflict1@example.com", name="TestConflict1", last_modified=(strftime('%s', 'now'));`,
                  values:["Jeep","Jeep@example.com",65]
                },
                { statement:`INSERT INTO users (name,email,age) VALUES (?,?,?)
                 ON CONFLICT (email)
                 DO UPDATE SET email = "testconflict2@example.com", name="TestConflict2", last_modified=(strftime('%s', 'now'));`,
                  values:["Test1","Test1@example.com",45]
                },
                { statement:`INSERT INTO users (name,email,age) VALUES (?,?,?)
                 ON CONFLICT (email)
                 DO UPDATE SET email = "testconflict3@example.com", name="TestConflict3", last_modified=(strftime('%s', 'now'));`,
                  values:["Test2","Test2@example.com",60]
                },
                { statement:`INSERT INTO users (name,email,age) VALUES (?,?,?)
                 ON CONFLICT (email)
                 DO UPDATE SET email = "testconflict4@example.com", name="TestConflict4", last_modified=(strftime('%s', 'now'));`,
                  values:["Test3","Test3@example.com",15]
                },
            ];
            let res: any = await db.executeSet(stuffSet);
            if(res.changes.changes != 5 || res.changes.lastId != 13) {
                const msg = 'changes !=5 or lastId != 13';
                console.log(`${msg}`)
            }

        } catch (err:any) {
            let msg: string = err.message ? err.message : err;
            console.log(`${msg}`)
        }

so the changes is 5:  2 update and 3 insert  and the lastId = 13 : 10 prior the executeSet + 3 new in executeSet
the result in the database is
id: 5, email: "testconflict@example.com",name: "TestConflict", age: 22, sql_deleted: 0, last_modified: 1651651648
id: 6, email: "Bannister@example.com",name: "Bannister", age: 59, sql_deleted: 0, last_modified: 1590393015
id: 7, email: "Jackson@example.com",name: "Jackson", age: 18, sql_deleted: 0, last_modified: 1651648773
id: 8, email: "Bush@example.com",name: "Bush", age: 25, sql_deleted: 0, last_modified: 1651648773
id: 9, email: "Kennedy@example.com",name: "Kennedy", age: 45, sql_deleted: 0, last_modified: 1651648773
id: 10, email: "testconflict1@example.com",name: "TestConflict1", age: 65, sql_deleted: 0, last_modified: 1651651648
id: 11, email: "Test1@example.com",name: "Test1", age: 45, sql_deleted: 0, last_modified: 1651651648
id: 12, email: "Test2@example.com",name: "Test2", age: 60, sql_deleted: 0, last_modified: 1651651648
id: 13, email: "Test3@example.com",name: "Test3", age: 15, sql_deleted: 0, last_modified: 1651651648

i got the same result if transaction is false
So for me there is no issue

@MonicaExplan Thanks for your explanation, i will make a new test

@jepiqueau
I've tried your test and seems ok...maybe something wrong in my version or package.json?!
furthermore sqlite_sequence table increase seq value
I don't have experience if the table sqlite_sequence is managed by SQLite Manager or is about this capacitor sqlite plugin.
If so, the seq value increase even if NO insert are made.
If I run executeSet more then one time on the same resul set (no insert are made, only update!), the seq value in sqlite_sequence table increase even only update and 0 insert.
Thanks a lot
Monica

@MonicaExplan
i did the following test:
export const sitesData: any[] = [
    {"siteId":"01FA1B4AB79B6D43C1257FD90056219C","code":"ANT012","officeCode":"ANT012","name":"PORTA DI ROMA","address":"Via Alberto Lionello, 201, Località Bufalotta","city":"ROMA","province":"RM","country":"","zip":"","email":"prolocofossaltina@gmail.com","telephone":"0690233474","lat":"41,9716623","lng":"12,5401904","sql_deleted":0,"last_modified":1651201887},
    {"siteId":"01FA1B4AB79B6D43C1257FD90056220C","code":"ANT013","officeCode":"ANT013","name":"TEST1","address":"Via Test1 , 180","city":"Test1City1","province":"BK","country":"","zip":"","email":"protest1@gmail.com","telephone":"0690233475","lat":"40,9716623","lng":"11,5401904","sql_deleted":0,"last_modified":1651201888},
    {"siteId":"01FA1B4AB79B6D43C1257FD90056221C","code":"ANT014","officeCode":"ANT014","name":"TEST2","address":"Via Test2, 200","city":"Test1City2","province":"CD","country":"","zip":"","email":"protest2@gmail.com","telephone":"0690233476","lat":"39,9716623","lng":"13,5401904","sql_deleted":0,"last_modified":1651201889},
    {"siteId":"02FA1B4AB79B6D43C1257FD90056220C","code":"ANT015","officeCode":"ANT015","name":"TEST3","address":"Via Test3 , 120","city":"Test1City3","province":"TORINO","country":"","zip":"","email":"protest3@gmail.com","telephone":"0790233475","lat":"42,9716623","lng":"14,5401904","sql_deleted":0,"last_modified":1651202000},
    {"siteId":"02FA1B4AB79B6D43C1257FD90056221C","code":"ANT016","officeCode":"ANT016","name":"TEST4","address":"Via Test4, 210","city":"Test1City4","province":"AV","country":"","zip":"","email":"protest4@gmail.com","telephone":"0790233476","lat":"38,9716623","lng":"20,5401904","sql_deleted":0,"last_modified":1651202002},
    {"siteId":"03FA1B4AB79B6D43C1257FD90056220C","code":"ANT017","officeCode":"ANT017","name":"TEST5","address":"Via Test5 , 140","city":"Test1City5","province":"BW","country":"","zip":"","email":"protest5@gmail.com","telephone":"0690233585","lat":"37,9716623","lng":"19,5401904","sql_deleted":0,"last_modified":1651202004},
    {"siteId":"03FA1B4AB79B6D43C1257FD90056221C","code":"ANT018","officeCode":"ANT018","name":"TEST6","address":"Via Test6, 250","city":"Test1City6","province":"CT","country":"","zip":"","email":"protest6@gmail.com","telephone":"0690233586","lat":"36,9716623","lng":"18,5401904","sql_deleted":0,"last_modified":1651202006},
];

        try {
            // test Json object validity
            let res: any = await sqlite.isJsonValid(JSON.stringify(dataToImport265));
            if(!res.result) {
                const msg = `Error: Json Object dataToImport265 not valid"\n`;
                setErrMsg((errMsg) => errMsg.concat(msg));
                return Promise.reject();
            }
            setLog((log) => log.concat(`> isJsonValid dataToImport265 successful\n`));

            // test import from Json Object
            res = await sqlite.importFromJson(JSON.stringify(dataToImport265));
            if(res.changes.changes === -1 ) {
                const msg = `Error: ImportFromJson dataToImport265 changes < 0"\n`;
                setErrMsg((errMsg) => errMsg.concat(msg));
                return Promise.reject();
            }
            setLog((log) => log.concat(`> importFromJson dataToImport265 successful\n`));

            db = await openConnection('db-issue265', false,
                                      'no-encryption', 1, false);
            setLog((log) => log.concat("> Open connection 'db-issue265' successful\n"));
            const twoSitesSet:Array<capSQLiteSet>  = [
                {   statement:`INSERT INTO sites (siteId,code,officeCode,name,address,city,province,country,zip,email,telephone,lat,lng) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)`,
                    values: [
                        ["01FA1B4AB79B6D43C1257FD90056219C","ANT012","ANT012","PORTA DI ROMA","Via Alberto Lionello, 201, Località Bufalotta","ROMA","RM","","","prolocofossaltina@gmail.com","0690233474","41,9716623","12,5401904"],
                        ["01FA1B4AB79B6D43C1257FD90056220C","ANT013","ANT013","TEST1","Via Test1 , 180","Test1City1","BK","","","protest1@gmail.com","0690233475","40,9716623","11,5401904"]
                    ]
                },
            ]
            res = await db.executeSet(twoSitesSet);
            if(res.changes.changes != 2 || res.changes.lastId != 2) {
                const msg = `Error: twoSitesSet changes != 2 || lastId != 2"\n`;
                setErrMsg((errMsg) => errMsg.concat(msg));
                return Promise.reject();

            }

            const statement = `
            INSERT INTO sites (siteId,code,officeCode,name,address,city,province,country,zip,email,telephone,lat,lng)
            VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
            ON CONFLICT(siteId) DO UPDATE
            SET code=excluded.code,officeCode=excluded.officeCode,name=excluded.name,address=excluded.address,city=excluded.city,province=excluded.province,country=excluded.country,zip=excluded.zip,email=excluded.email,telephone=excluded.telephone,lat=excluded.lat,lng=excluded.lng;
            `
            const fullSitesSet: capSQLiteSet[] = [];
            sitesData.forEach(site => {
                const values = [
                    site.siteId
                    ,site.code
                    ,site.officeCode
                    ,site.name
                    ,site.address
                    ,site.city
                    ,site.province
                    ,site.country
                    ,site.zip
                    ,site.email
                    ,site.telephone
                    ,site.lat
                    ,site.lng
                  ]
                  fullSitesSet.push({
                    statement,
                    values,
                  })
            });
            res = await db.executeSet(fullSitesSet);

            console.log(`fullSiteSet res ${JSON.stringify(res)}`)
            let retQuery = await db.query("SELECT total_changes();", []);
            console.log(`>>> retQuery total_changes(): ${JSON.stringify(retQuery)}`)
            retQuery = await db.query("SELECT last_insert_rowid();", []);
            console.log(`>>> retQuery last_insert_rowid(): ${JSON.stringify(retQuery)}`)

            // Close Connection db-from-json
            res = (await sqlite.isConnection('db-issue265')).result;
            if(res) {
                await sqlite.closeConnection('db-issue265');
            }

which is similar to what you do
the first executeSet with two sites returns
changes.change = 2 & changes.lastId = 2
the second execSet with seven sites including the two of the first executeSet returns
changes.changes = 7 & changes.lastId = 9
if i look at the database
the id 3 & 4 does not exist.
so what i understand is that SQLite (not the plugin) is using the number of rows in the set ie 7  and the lastId is increase also by the number of rows in the set ( 2 + 7 = 9 ) but  2 rows are deleted this why the id 3 & 4 do not exist at the end
the sqlite_sequence is managed by SQLite not the plugin
So if you use this a lot you are creating a lot of gaps in your database so you will need to run the VACUUM statement

authors: MonicaExplan jepiqueau tobiasmuecksch

repo: capacitor-community/sqlite


text:
Deploy widget grouping is incorrect

I set up three deployment jobs from my "TestJenkins" for three different apps: "MyTestApp", "MySecondApp", "AnotherTestApp". On the deploy widget config they show up as just one entry:

@MarkRx I think this logic in UI/src/components/widgets/deploy/config.js is not quite correct
link to the diff: https://github.com/capitalone/Hygieia/pull/891/files?diff=split

Do the created collector items have unique options.applicationId's? Can you post them? The assumption would be that "MyTestApp", "MySecondApp", and "AnotherTestApp" would each have their own unique applicationId. If not then they will be treated as the same application if they all have the same instanceUrl.
var dataGrouped = dataGrouped = _(data)
                	.groupBy(function(d) { return (!multiServerEquality ? d.options.instanceUrl + "#" : "" ) + d.options.applicationId; })
                	.map(function(d) { return d; });

Ah. Got it. In my case (testing jenkins plugin) I had the same instanceUrl. And no applicationId in the collector item option. May be the workaround is to put Job url in the "instanceUrl". Not sure yet. But manually editing the json document to make the instance url the job url did work.
Noticed that if I turn the grouping off, it still groups.

@MarkRx the following code should work both ways:
var dataGrouped =  _(data)
                	.groupBy(function(d) { return (!multiServerEquality || d.options.applicationId == null ? d.options.instanceUrl + "#"+d.options.applicationName : "" ) + d.options.applicationId; })
                	.map(function(d) { return d; });

Can you test this change locally?

I think the proper solution should be to have the jenkins plugin assign each application an applicationId. That field really shouldn't be nullable as it is meant to be an identifier. The identifier could be something arbitrary like the md5sum of the instanceUrl + applicationName. It's possible there are other parts of the code that will choke if it is null.
Since a.applicationId == b.applicationId implies a.applicationName == b.applicationName you can use this:
var dataGrouped = dataGrouped = _(data)
                	.groupBy(function(d) { return (!multiServerEquality ? d.options.instanceUrl + "#" : "" ) + d.options.applicationName + "#" + d.options.applicationId; })
                	.map(function(d) { return d; });

The origin of applicationID was from uDeploy that had some kind of of UUID for each applicationID. I am sure this ID will change if the same App was setup in another "Prod" uDeploy server. May be we should create another ID (some kind of CMDB identifier)? In your case, how are you keeping this ID same across multiple deployment server?

I kind of "cheated". XLD uses composite path keys based on the names of items in the path. Since this is the case the applicationId remains the same so long as they have the same path.
For example:
Server1:
Id: Applications/Foo/Bar
Name: Bar
Server2:
Id: Applications/Foo/Bar
Name: Bar

@MarkRx @amitmawkin @satishc1 @mrpudn please review these following change proposal before I submit it in a PR form:
With PR https://github.com/capitalone/Hygieia/pull/891 there was a change in how deployed Apps were grouped together by "deploying server"s. Nice change. This allows to visualize an App deployment where different deployment servers (such as QA Jenkins, Prod Jenkins or whatever) are deploying the same app.
There are two major changes in that PR:

New API for to return a boolean attribute (systemConfig.multipleDeploymentServers) to the API properties file that determines if servers need to be grouped.
UI changes to group the servers in https://github.com/capitalone/Hygieia/blob/master/UI/src/components/widgets/deploy/config.js and https://github.com/capitalone/Hygieia/blob/master/UI/src/components/widgets/deploy/config.html

I am proposing a refactor of #1 and slight change to #2.
Slight Change to #2: Instead of relying on non-null applicationId, I am proposing a non-null applicationName + applicationId check in grouping of elements:
Old code (https://github.com/capitalone/Hygieia/blob/master/UI/src/components/widgets/deploy/config.js)
                var dataGrouped = _(data)
                    .groupBy(function(d) { return (!multiServerEquality ? d.options.instanceUrl + "#" : "" ) + d.options.applicationId; })
                    .map(function(d) { return d; });

Proposed change
                var dataGrouped = _(data)
                    .groupBy(function(d) { return (!multiServerEquality ? d.options.instanceUrl + "#" : "" ) + d.options.applicationName + d.options.applicationId; })
                    .map(function(d) { return d; });

Refactoring of #1
Instead of capturing/configuring the "multipleDeploymentServers" property via API, I am proposing that we do that in the UI and store each individual dashboard's choice in the "dashboard" document in dashboard -> widgets -> options section of the json document:
        {
            "_id" : ObjectId("5863ed079220ab16e6a1c3c8"),
            "name" : "deploy",
            "componentId" : ObjectId("583394884969c83f6715b588"),
            "options" : {
                "id" : "deploy0",
                "aggregateServers" : true
            }
        },

Corresponding UI changes are pretty simple.
Add a check box in deploy widget config:
        <div class="form-group checkbox">
            <label>
                <input type="checkbox" name="aggregateServers" ng-model="deployConfig.aggregateServers" ng-change="reload()">
                Aggregate Servers
            </label>
        </div>

Add a new variables in the corresponding controller (config.js) and add a function that looks like this:
        $scope.reload = function() {
            processResponse(ctrl.currentData);
        };

And store the currentData in a global variable after the data is obtained from the API calls.
With these changes, there will be no API needed to save/retrieve the config and the config is set for each individual dashboard.
Thoughts?
Screen shots:

After reading the thread, I think I follow...
Would it make more sense for the collector to record the deployment server as a compound key?
i.e.
[
  {
    "applicationId": "MyTestApp",
    "deployServer": "TestJenkins"
  },
  {
    "applicationId": "MySecondApp",
    "deployServer": "TestJenkins"
  },
  {
    "applicationId": "AnotherTestApp",
    "deployServer": "TestJenkins"
  }
]

I'm not sure exactly what the data looks like that the widget is displaying or if I completely understand the problem, but this data model would make it possible to group/aggregate by deploy server, as proposed.

@mrpudn changing the collectors / collector_items around would be a big undertaking and would most certainly not be backwards compatible.
@tabladrum Looks fine so long as the same guid implies the same name (meaning we don't care about renaming). Just note I don't see the api endpoint I made going away as there are more uses for it. For example: Configurable Pipeline Stage Names #1020

@MarkRx The "System Config" API should evolve. For this particular instance we will rely on the UI config ability.

Sounds good.

https://github.com/capitalone/Hygieia/pull/1055

authors: MarkRx mrpudn tabladrum

repo: capitalone/Hygieia


text:
Can I check If Object logging is enabled on s3 buckets ?

I am trying to write a policy that checks if
1.Encryption is enabled on S3 buckets
2.Bucket is publicly accessible and
3.Object level logging is enabled
I've done the 1st and 2nd conditions using "no-encryption-statement" and "global-grants" filters respectively, But I could not find a way to achieve the 3rd one.
Can some expert help me with this?

object level logging can mean either s3 access Logs, which is added to the bucket under Logging key (try a resource policy with no filters to see all the keys that can be filtered), or it can mean data events (cloudtrail object logging) for which we have a dedicated filter data-events, although I'll note that right after we added that cloud trail s3 data-events grew an ability to log all buckets.

authors: akshayyeluru kapilt

repo: capitalone/cloud-custodian


text:
[spike] investigate existing Scikit-learn integration

Is your feature request related to a problem? Please describe
the rubicon-ml pipeline extension was built to extend the Scikit-learn pipeline's fit method and integrate automatic rubicon-ml logging. there are many other commonly used pipeline methods that could benefit from rubicon-ml integration
Describe the solution you'd like
we should investigate each of the methods available on a Scikit-learn pipeline other than fit to see if they could benefit from rubicon-ml integration

https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html

if there are methods that should be implemented on the rubicon-ml pipeline, open tickets for the work to implement them
we should also attempt to run all of Scikit-learn's pipeline examples with our rubicon pipeline and see if they behave as expected

https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.Pipeline.html#examples-using-sklearn-pipeline-pipeline

if there are inconsistencies or bugs noted, open tickets for the work to fix them

Done. Issues and findings addressed in #176, #177, #178, #179, and #182

authors: ryanSoley shania-m

repo: capitalone/rubicon-ml


text:
How to authenticate to federated identity pools?

Hi,
How to authenticate to Federated identity pool(login with amazon or google)?

This isn't supported yet.

hi @bjinwright
Can you tell me which methods of boto3 have to use for that social identity logins ?
Thanks

repo: capless/warrant


text:
Creating a PBXGroup

Is it possible to create a new PBXGroup and append it to the Xcode project?
I've tried this:
let project = try! XcodeProj(path: "MyProject.xcodeproj")
let pbxproj = project.pbxproj
let group = PBXGroup(reference: "CustomPBXGroup", children: [], sourceTree: sourceTree)
pbxproj.objects.groups.append(group)

but groups is read only property.
Is there a way to do this?

@Daltron you need to change pbxprj.objects:

@filletofish Thanks for replying. That adds it to the objects group but it doesn't show up in the actual xcodeproj when I write it back to the disk.
Here is how I am creating my group:
let project = try! XcodeProj(path: "testing.xcodeproj")
var pbxproj = project.pbxproj
var group = PBXGroup(reference: pbxproj.generateUUID(for: PBXGroup.self), // This doesn't seem right?
                     children: [],
                     sourceTree: pbxproj.objects.groups[2].sourceTree)
group.name = "CustomPBXGroup"

pbxproj.objects.append(.pbxGroup(group))
try! project.write(path: "testing.xcodeproj", override: true)

Am I doing something wrong here?

@Daltron I have never tried it so. @pepibumur should now :)

Hey @Daltron
Can you try this?
let project = try! XcodeProj(path: "testing.xcodeproj")
var group = PBXGroup(reference: pbxproj.generateUUID(for: PBXGroup.self), // This doesn't seem right?
                     children: [],
                     sourceTree: pbxproj.objects.groups[2].sourceTree)
group.name = "CustomPBXGroup"
project.pbxproj.objects.append(.pbxGroup(group))
try! project.write(path: "testing.xcodeproj", override: true)

Notice that I don't create a new variable pbxproj from project.pbxproj. Since models are not classes, when you assign the value to a new variable, you are creating a copy of the value. When you add a new element, you add it to the copy, and not the value contained in the project.

Yeah, there's a rational for changing at least some of the top level structs to classes, to make things easier to update

@pepibumur That seems to add it to my xcodeproj when I look at the raw text, but what if I am wanting to add that group to a group that already exists in my xcodeproj?
I've tried
project.pbxproj.objects.groups[2].children.append(group.reference)

but since groups is a read only property, this won't work.

Good point @Daltron. What do you think about building an interface method like this one?
var myObject = project.pbxproj.objects.groups[2]
myObject.children.append(group.reference)
project.pbxproj.update(object: myObject)

Since objects include a reference we can find the object in the array and update it. What do you think? cc @yonaskolb

I think all the different object types should be mutable arrays on the project, instead of having them be getters on the objects array. objects could still be a way to initialise the project.
This would also speed up the writing of a project a lot as those object type getters (for example object.fileReferences) get looked up a lot

Good point, thinking about it, I think makes sense since we need to filter them later on when we export the project. Is there any advantage in having them as a single array?

The only advantage I can see is that the project properties used to be immutable so the only way to edit these was to use the initialiser which would have been crazy with a dozen different array. But now that things are mutable, they can be changed after the fact. The init param could be left as an optional though.
The object property could also still be used as a getter. I know its used for checking all the references for the reference generator, but this could be typed to a project element array.
Hope that makes sense :)

Having said that, it makes it easier to add objects but doesn't really solve the problem of editing them. The fact is that Structs in an array are hard to edit as you have to pull them out, edit them and then update the array.
Your update function above would work (I'm guessing it would check against the type and reference to know which struct to update), but is still harder to use.
This would all be easier if they were classes. Would would be the biggest downside of having the project elements be classes?

The more I think about it the more I think it'd make sense to move everything into classes. Thinking about the project as a tree of immutable elements I think it'd be much easier if those elements were just classes and you could modify the tree at any point that you want. We'd simplify the APIs a lot.

What do you think @yonaskolb ?

Agreed 👍

I've created an issue to tackle the migration to classes. You can follow it up here https://github.com/carambalabs/xcodeproj/issues/45

@Daltron, now with release 0.1.0 you can add your group as follows:
let project = try! XcodeProj(path: "testing.xcodeproj")
var newGroup = PBXGroup(reference: pbxproj.generateUUID(for: PBXGroup.self),
                        sourceTree: .group,
                        name: "CustomPBXGroup")

// find your existing group
let existingGroup = project.pbxproj.groups.first { $0.name == "ExistingGroup" }!

// append the new group to the existing groups children
existingGroup.children.append(newGroup.reference)

//add the new group to the the list of groups
project.pbxproj.groups.append(group)

try! project.write(path: "testing.xcodeproj", override: true)

@yonaskolb Thanks for the prompt response! Looking forward to trying this out!

authors: Daltron filletofish pepibumur yonaskolb

repo: carambalabs/xcodeproj


text:
[StatefulTable] Ability to expand single ONE row at a time (one expanded, all other rows get collapsed)

What package is this for?

[x] React
[ ] Angular

Summary
Once I click additional row to expand, the previously expanded row should get collapsed automatically. This option should be configurable through some sort of a flag in the StatefulTable Component.
Specific timeline issues / requests
Do you want this work within a specific time period? Is it related to an
upcoming release?
NB: The core contributors will try to work with your timeline, but it's not
guaranteed. The earlier you make a request in advance of a desired delivery
date, the better!
Available extra resources
What resources do you have to assist this effort?
Carbon add-ons for Watson IoT is a collaborative system. We encourage teams to
build components and submit them for integration.

@aovdiien What product is this for, and how often do expanding rows appear in your application? Do you have a design?

@JordanWSmith15 it is for Outage Prediction product. here are mockups:
table:

table with expanded row:

cc: @aovdiien

authors: JordanWSmith15 aovdiien apugach


text:
[Styles] Create print-friendly styles for identified components

The problem
Details are in the epic #6607 .
The solution
Should make use of the print media query and apply print friendly styles per recommendations in #6607.
Additional information

The downstream test applications would need to be updated first before this can be properly tested: #6732
Can apply these styles in the styles package so that this can be applied to both React and Web Components
Testing can happen in the deploy previews of NextJS Test app and Web Components HTML App once all relevant components are added to those downstream applications

@RobertaJHahn dev issue created and ready for planning poker.


text:
[Content section]: aligning children to content-section heading

Description
Expected children items to align correctly with the content-section-heading

Component(s) impacted
Content Section with children (content block, content item, content group) need all to align to top properly when using content-section
Browser
Chrome
Carbon for IBM.com version
v1.12.0
Severity
Severity 3 = The problem is visible or noticeable to users but does not impede the usability or functionality. Affects minor functionality, has a workaround.
Application/website
Carbon for IBM.com WC Tutorial and broken in storybook
Package
@carbon/ibmdotcom-web-components
CodeSandbox example
https://github.com/carbon-design-system/carbon-for-ibm-dotcom-tutorial/tree/web-components-step-3
Steps to reproduce the issue (if applicable)
go to https://carbon-design-system.github.io/carbon-for-ibm-dotcom-tutorial/step-3/ to see issue. Code can be found here: https://github.com/carbon-design-system/carbon-for-ibm-dotcom-tutorial/tree/web-components-step-3. Also in storybook here: http://ibmdotcom-web-components-canary.mybluemix.net/?path=/story/components-content-section--default
Release date (if applicable)
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate issues

@ariellalgilmore Can this not be achieved with CSS?

authors: ariellalgilmore kennylam


text:
fix(tabs-extended): allow VO to access tab panel content

Related Ticket(s)
[Tabs extended media]: React wrapper – not able to access other tabs with VO instructions
Description
The problems described in the ticket appeared to apply to not just the React wrapper but the original web components as well, so I addressed them as a whole.
Test the following in both the original web components and in the React wrapper:

Tabs extended

Vertical
Horizontal

Tabs extended - with media

Original issue in quotes:

I am not able to select the second, third or fourth tab in Tabs extended or Tabs extended – with media using the keyboard and voice over on Desktop
VO instructs the user to press control + option + space to select a tab and it doesn't work, I see no changes in the selected state (all tabs content are the same).

To aid in testing, I updated the stories to have different images in each of the tabs, so now when you click on or select a tab you can visually tell when it has changed.
Previously, when a tab was clicked, the keyboard/VO focus would remain on the tab. I changed the focus to go to the tab panel contents instead of the tab when the tab is clicked or selected by keyboard or in VO. This allows the user to access the tab panel content.
However, unfortunately, I was not able to find a way to get Chrome (or Firefox) to respect the VO control + option + space. There are differences between these browsers and Safari in how they interpret VO commands and keyboard presses. The VO commands all work as expected in Safari.
A workaround for Chrome and Firefox is to switch from using pure VO keyboard commands and just use the plain navigation arrows, which have already been mostly set up for use. Doing so, when you are on a tab and press enter or space or (if on the horizontal variation) the down arrow, you will be taken to the tab panel content.

VO is also reading out the tabs as first tab: "1 of 8"; second tab "3 of 8", which seems a bit strange? Is that the expected behavior and it's indicating a tab has two sections, the heading and the content?

This does not appear to be an issue anymore, at least when in the Storybook previews. It is possible that when on a page with multiple tab sections that the screen reader might get confused, but I haven't tested that.
Followup
I think the VO and keyboard navigation might need some more followup and discussion to further refine the experience. For example:

When reaching the end of the tabs list, should it re-cycle through the tabs or continue into the selected content?
When reaching the end of the tab panel content, should it go back up to the tabs list or continue down the page?
If it goes up to the tabs list, should it go to its own tab first?
How should the keyboard navigation adjust to a vertical versus horizontal alignment (for tabs-extended)?

Recommend closing this PR as the issue fixed isn't really an issue. See more information on this comment on the issue

@kennylam I'm going to close out this PR in the meantime, but feel free to reopen this if you see fit.

authors: andy-blum mwanberg proeung


text:
Not Found - GET https://registry.npmjs.org/icons-motion - Not found

The NPM install not fund the package.
Not Found - GET https://registry.npmjs.org/icons-motion - Not found

Hi @biapar, thanks for filing this issue, I'm looking into it right now!  Could you give me a bit more info on the steps you took before you saw this error so I can replicate?  Was this following npm i as you were trying to install the package in your own project, or was this when you tried npm i while trying to run and work on (a fork or clone of) this repo?
We actually have not yet published this to npm registry- that is a next step for us.  So if you are trying to install the package in your own project, it makes sense that you see that error at the moment.  I can give you an update as soon as we publish to the registry and that should resolve the issue 😄
cc: @tay1orjones

authors: biapar kristastarr

repo: carbon-design-system/icons-motion


text:
Allow line height to be set by spacing?

// stylelint-disable-next-line carbon/type-token-use
line-height: $spacing-06;

This would not seem unreasonable as it is necessary to change line-height for layout purposes in some scenarios.


text:
Minor corrections to deployment.md

fixed link to fake-crypto-material.zip
adjusted MD for emphasis

Signed-off-by: Christian Zimmermann christian.zimmermann3@de.bosch.com

Thank you @chris-zimm for making your first contribution to Carbyne Stack!

authors: chris-zimm strieflin


text:
Getting error when running fab build:outdir=~

First of all thanks for this wonderful library!
I did some changes in the source code so I tried to build the code by following the steps you mentioned in the Github page. After installing python and fabric I just i ran the fab build:outdir=~ comment. It started to build but suddenly it aborted. Can you please guide me what is the mistake I did here? and also it would be really good if you provide some detailed steps for unofficial card.io-iOS-SDK release. It may help us people like me those who has only objective-c knowledge.
Below is the output i got when ran fab build:outdir=~ comment
thavasi-2473:card.io-iOS-source thavasi-2473$ fab build:outdir=~
Setup
All .strings files appear to be correct.
Will save release sdk to /Users/thavasi-2473
[localhost] local: git describe --match='iOS_[0-9].[0-9]*' --tags --always --dirty
Preparing dmz
Building
Using temp dir /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/
Using extra Xcode flags:
(Release) Building armv7
(Release) Building armv7s
(Release) Building arm64
(Release) Building i386
(Release) Building x86_64
(Release) Lipoing
Fatal error: local() encountered an error (return code 127) while executing 'xcode-select -print-path/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo            /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7/libCardIO.a           -arch armv7s /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7s/libCardIO.a           -arch arm64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/arm64/libCardIO.a           -arch i386 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/i386/libCardIO.a           -arch x86_64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/x86_64/libCardIO.a           -create           -output /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/universal/libCardIO.a'
Aborting.
local() encountered an error (return code 127) while executing 'xcode-select -print-path/Platforms/iPhoneOS.platform/Developer/usr/bin/lipo            /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7/libCardIO.a           -arch armv7s /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/armv7s/libCardIO.a           -arch arm64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/arm64/libCardIO.a           -arch i386 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/i386/libCardIO.a           -arch x86_64 /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/x86_64/libCardIO.a           -create           -output /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmp2efPDO/Release/universal/libCardIO.a'
thavasi-2473:card.io-iOS-source thavasi-2473$

If you run xcode-select -print-path in your terminal, what does it say?

if I run xcode-select -print-path in my terminal then it says /Applications/Xcode 3.app/Contents/Developer

@Thavasidurai if you're really still running Xcode 3, then the first thing I'd suggest is that you update to the current version, Xcode 6.2.
(Perhaps you can get that done, and report back on whether that has changed your results, prior to @josharian waking up and resuming the conversation. :smiley_cat:)

No, I am running Xcode 6.1

In that case, it looks like either you have renamed the Xcode app to Xcode 3, or (rather more likely) you still have a copy of Xcode 3 somewhere on your computer.
Back in the days of Xcode 3, Apple placed utility programs such as lipo in a different place than they do now. I think that your error message was caused by the script failing to find lipo where it expects it to be; namely, inside the Xcode app package. But it was looking inside your old Xcode 3, rather than inside Xcode 6.1.
So if you delete from your computer all old copies of Xcode, I think that things will improve.

Thank you so much :-) I follow your comments and come back here if i face any issue.

I didn't have any old xcode version in my computer. Actually my xcode 6.1 was named as xcode 3. Now I renamed it to xcode but it seems still some issues are there. Below is the issue which terminal says
thavasi-2473:~ thavasi-2473$ cd /Users/thavasi-2473/card.io-iOS-source
thavasi-2473:card.io-iOS-source thavasi-2473$ fab build:outdir=~
Setup
All .strings files appear to be correct.
Will save release sdk to /Users/thavasi-2473
[localhost] local: git describe --match='iOS_[0-9].[0-9]*' --tags --always --dirty
Preparing dmz
Building
Using temp dir /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmpW36QFj/
Using extra Xcode flags:
(Release) Building armv7
Fatal error: local() encountered an error (return code 1) while executing 'xcrun xcodebuild -target CardIO -arch armv7 -sdk iphoneos -configuration Release clean'
Aborting.
local() encountered an error (return code 1) while executing 'xcrun xcodebuild -target CardIO -arch armv7 -sdk iphoneos -configuration Release clean'
thavasi-2473:card.io-iOS-source thavasi-2473$
Can you please help me out on this?

Rather than running fab build:outdir=~, try fab verbose build:outdir=~
This will result in a much larger output. It will include the specific Xcode compiler or linker errors that are causing the build to fail.

Thank you so much for your quick response!
Below is the response for fab verbose build:outdir=~
thavasi-2473:card.io-iOS-source thavasi-2473$ fab verbose build:outdir=~
Setup
All .strings files appear to be correct.
Will save release sdk to /Users/thavasi-2473
[localhost] local: git describe --match='iOS_[0-9].[0-9]*' --tags --always --dirty
[localhost] local: git rev-parse --show-toplevel
Preparing dmz
[localhost] local: fab concat
Done.
Building
Using temp dir /var/folders/qc/chpg1l0x09l2fphydw9rjw88xjk2sw/T/tmprWu6A8/
Using extra Xcode flags:
(Release) Building armv7
[localhost] local: xcrun xcodebuild -target CardIO -arch armv7 -sdk iphoneos -configuration Release clean
xcrun: error: active developer path ("/Applications/Xcode 3.app/Contents/Developer") does not exist, use xcode-select --switch path/to/Xcode.app to specify the Xcode that you wish to use for command line developer tools (or see man xcode-select)
Fatal error: local() encountered an error (return code 1) while executing 'xcrun xcodebuild -target CardIO -arch armv7 -sdk iphoneos -configuration Release clean'
Aborting.
local() encountered an error (return code 1) while executing 'xcrun xcodebuild -target CardIO -arch armv7 -sdk iphoneos -configuration Release clean'
I don't have anything like xcode 3 in my computer but still its seeking at ("/Applications/Xcode 3.app/Contents/Developer") seems.

Thank you so much for your support!
I used xcode-select --switch /Applications/Xcode.app/Contents/Developer
Select   /Applications/Xcode.app/Contents/Developer comment to set the active developer directory then fab build:outdir=~ comment was worked without any issues.

Awesome! Glad you got it working, @Thavasidurai!

Also I am getting following Error while running using Fab Command to build library
ServiceMasterssharma:card.io-iOS-source-master ssharma$ fab verbose build:outdir=~
[localhost] local: xcode-select -p
Setup
All .strings files appear to be correct.
Will save release sdk to /Users/ssharma
[localhost] local: git describe --match='iOS_[0-9].[0-9]*' --tags --always --dirty
Fatal error: local() encountered an error (return code 128) while executing 'git describe --match='iOS_[0-9].[0-9]' --tags --always --dirty'
Aborting.

To resolve above issue , I set up project using git , than i was able to compile ,but archiving failing with following error .
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/Classes/CardIOPaymentViewController.m:18:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/cv/warp.h:10:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/dmz.h:11:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/scan.h:9:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/frame.h:9:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/expiry_seg.h:9:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/expiry_types.h:10:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/eigen.h:25:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/Eigen/Core:20:
/Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/Eigen/src/Core/util/Macros.h:248:1: error: unknown type name 'namespace'
namespace Eigen {
^
/Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/Eigen/src/Core/util/Macros.h:248:16: error: expected ';' after top level declarator
namespace Eigen {
^
;
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/Classes/CardIOPaymentViewController.m:18:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/cv/warp.h:10:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/dmz.h:11:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/scan.h:9:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/frame.h:9:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/expiry_seg.h:9:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/scan/expiry_types.h:10:
In file included from /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/eigen.h:25:
/Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz/Eigen/Core:28:10: fatal error: 'complex' file not found
#include
^
3 errors generated.
CompileC /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOGuideLayer.o Classes/CardIOGuideLayer.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0@global/bin:/Users/ssharma/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ssharma/.rvm/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch arm64 -fmessage-length=176 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -stdlib=libc++ -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wconversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-c++11-extensions -DCARDIO_DEBUG=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=6.0 -g -Wno-sign-conversion -fembed-bitcode -iquote /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-generated-files.hmap -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-own-target-headers.hmap -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-all-target-headers.hmap -iquote /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-project-headers.hmap -I/var/folders/lk/knb6cbxs2352gy3fc6g53jwwf__ncs/T/tmpBT31tB/Release/Archive/include -I/Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/opencv_device/include -I/Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/DerivedSources/arm64 -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/DerivedSources -F/var/folders/lk/knb6cbxs2352gy3fc6g53jwwf__ncs/T/tmpBT31tB/Release/Archive -include /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/PrecompiledHeaders/CardIO-Prefix-aisczoqlcbknkvfzqxldmomcgagf/CardIO-Prefix.pch -MMD -MT dependencies -MF /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOGuideLayer.d --serialize-diagnostics /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOGuideLayer.dia -c /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/Classes/CardIOGuideLayer.mm -o /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOGuideLayer.o
CompileC /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOIplImage.o Classes/CardIOIplImage.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0/bin:/Users/ssharma/.rvm/gems/ruby-2.3.0@global/bin:/Users/ssharma/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/ssharma/.rvm/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch arm64 -fmessage-length=176 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -stdlib=libc++ -fobjc-arc -gmodules -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wconversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wno-c++11-extensions -DCARDIO_DEBUG=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=6.0 -g -Wno-sign-conversion -fembed-bitcode -iquote /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-generated-files.hmap -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-own-target-headers.hmap -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-all-target-headers.hmap -iquote /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/CardIO-project-headers.hmap -I/var/folders/lk/knb6cbxs2352gy3fc6g53jwwf__ncs/T/tmpBT31tB/Release/Archive/include -I/Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/opencv_device/include -I/Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/dmz -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/DerivedSources/arm64 -I/Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/DerivedSources -F/var/folders/lk/knb6cbxs2352gy3fc6g53jwwf__ncs/T/tmpBT31tB/Release/Archive -include /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/PrecompiledHeaders/CardIO-Prefix-aisczoqlcbknkvfzqxldmomcgagf/CardIO-Prefix.pch -MMD -MT dependencies -MF /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOIplImage.d --serialize-diagnostics /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOIplImage.dia -c /Users/ssharma/Desktop/ServiceMaster/Project/CARDIO/August/GIT_SOURCE/card.io-iOS-source/Classes/CardIOIplImage.mm -o /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOIplImage.o
** ARCHIVE FAILED **
The following build commands failed:
CompileC /Users/ssharma/Library/Developer/Xcode/DerivedData/icc-gibrpkkvyhxegjezojxuyjwygsmj/Build/Intermediates/ArchiveIntermediates/CardIO\ Static\ Library/IntermediateBuildFilesPath/icc.build/Release-iphoneos/CardIO-static.build/Objects-normal/arm64/CardIOPaymentViewController.o Classes/CardIOPaymentViewController.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Fatal error: local() encountered an error (return code 65) while executing 'xcrun xcodebuild -scheme "CardIO Static Library" -target CardIO-static -configuration Release archive  CONFIGURATION_BUILD_DIR=/var/folders/lk/knb6cbxs2352gy3fc6g53jwwf__ncs/T/tmpBT31tB/Release/Archive  GCC_PREPROCESSOR_DEFINITIONS='$(value) ''
Please suggest?

@sachin123sharma did you run git submodule update --init ? if that doesn't help please open a new issue

Thanks , That works.


text:
Epoch information change

Describe the bug
When I find an epoch using the Koios API, the tx_count, blk_count and out_sum values are different per request.
To Reproduce

Go to 'Koios API'
Click on _epoch_no string
Write 348
Click on TRY
Save results
Click on TRY again
Compare results

Expected behavior
Every time someone make a request to the endpoint to get the epoch 348 should receive exactly the same information each time.
Screenshots

This is probably related to this issue on cardano-db-sync, maybe some nodes are/were running different cardano-db-sync versions or restored from snapshots created by diff versions of it.

Even within a release, the state could differ depending on epoch cache...the instance providers have been instructed to run fixes - it should resolve in few hours

This should be sorted for now, but will keep the issue open until next release - as graceful fix will only be available on next dbsync release.

Temporary patch to fix historical entries added to cron in #227 , part of upcoming release

authors: M4rc0Russ0 rcmorano rdlrt

repo: cardano-community/koios-artifacts


text:
How to get actor's longitudinal/lateral size and coordination.

How can I get longitudinal and lateral size of vehicle? and also how to get coordinate of each point of the car?
As I saw get_location just get the center of actor.

For cars and pedestrians you can just read the .bounding_box property. For other actors, it seems like that's currently not supported (see #1832).

bounding_box hast attributes location and extent. As I see location also gets the central location of box according to vehicle. however, I want the coordination for each point of the vehicle(ie, side of vehicle or back of the vehicle not just the central one)

I guess you can derive them from the vehicle's position and the bounding box's extent. First, get vehicle's location (actor.get_location() -> return vehicle's center point), then get the BBox and than "add" / "subtract" (in Cartesian space) the extent to the center point.

Take a look at this example: https://github.com/carla-simulator/carla/blob/master/PythonAPI/carla/scene_layout.py#L123

repo: carla-simulator/carla


text:
Synchronous_mode gets stuck in endless loop

SynchronizeFrame sometime does not get the correct GFrame Counter
and thus keeps waiting  in world.tick()

Lot of additional messages added to debug the situation, that is what is in the image.

This is our intermediate solution
void FCarlaEngine::OnPostTick(UWorld *, ELevelTick, float DeltaSeconds)
{
  uint32_t RunSomeCount = 0u;
  do
  {
    Server.RunSome(10u);
    // TODO: fix bug and remove
    // To solve for bug of Client not receiving new Frame and stuck forever in SyncronizeFrame
    // We are repeatedly sending same frame, only in SynchronousMode, and waiting for next tick
    // It only happens in Sync mode and faster than real-time speeds
    // and we need to send Frames repeatedly fast enough to maintain average performance
    RunSomeCount++;
    if (bSynchronousMode && RunSomeCount % 100 == 0)
     WorldObserver.BroadcastTick(*CurrentEpisode, DeltaSeconds);
  }
  while (bSynchronousMode && !Server.TickCueReceived());
}

Seems like the culprit is session 0: connection too slow: message discarded , data streaming is dropped instead of being queued.

session 0: connection too slow: message discarded

I see, that causes a dead-lock between client and server, but not sure how to fix it.
Definitively not very nice the way the simulator drops messages when the connection is slow, but having a queue also has its own problems.
Nevertheless, there is always a possibility some message is lost, in that case the client ends up waiting forever. I guess the best would be adding a timeout to the image queue in Python, say if the image hasn't arrived in X seconds, skip it and go on to the next tick (and make sure you ignore images with older frame numbers in case the image eventually arrives).

In our case we are not even using image and operating in no-rendering mode, that's how we are getting those high FPS and hitting this issue. We are only waiting for new Frame no. to be avaialbe WorldObserver.BroadcastTick(in Server) as SynchronizeFrame (in Client) waits.
static void SynchronizeFrame(uint64_t frame, const Episode &episode) {
    while (frame > episode.GetState()->GetTimestamp().frame) {
      std::this_thread::yield();
    }
  }

The do..while (bSynchronousMode && !Server.TickCueReceived()); loop is a idle loop waiting for the next tick from the client, which will never come if the client has never received the current frame. So keeping on re-sending the current frame in the waiting loop is on the msot robust way to make sure the client gets the current frame.
Few other options would be :

a time-out in SynchronizeFrame to skip frame
Synchronous get_frame call implementation to poll from SynchronizeFrame
Detect failure in AsyncStream.Send() from WorldObserver::BroadcastTick() and retry
Queue and send messages in ServerSession::Write(), instead of dropping, Example link

We also made some other improvements in the streaming server (yet to make a PR on that)
 // Configure socket options
    log_debug("streaming client: configuring socket");
    _socket.set_option( boost::asio::ip::tcp::no_delay( true) );
    #if defined(__linux) || defined(linux) || defined(__linux__)
      boost::asio::detail::socket_option::boolean<
          IPPROTO_TCP, TCP_QUICKACK> quickack(true);
      _socket.set_option(quickack);
    #endif

Fix in this branch https://github.com/AuroAi/carla/tree/improve_sync_mode_performance , Should I do a PR with this ?

@nsubiron
Hello nsubiron,
has this problem be solved?
when I run sync mode at high FPS, world.tick() get stuck at ramdom, show the following warning:
RuntimeError: time-out of 10000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:2000
I am wondering how to solve the problem

if the image hasn't arrived in X seconds, skip it and go on to the next tick
The same problem as #1994

Please also note, that sync mode also has bad performance compared to async, see https://github.com/carla-simulator/carla/issues/2617#issuecomment-643192087 and the following comments.

@hh0rva1h I believe this is not the right place for that comment. Please, let's not mix issues.

authors: ZhangYouRong germanros1987 hh0rva1h jit-rc jitrc nsubiron


text:
"map not found" exception: Using LoadWorld(), ReloadWorld() and GenerateOpenDriveWorld() in C++ not working

Hello,
I have made VS 2019 project using cmake and including all the libs I need, and my application manages successfully to connect with the CARLA server, apply synchronous settings and tick etc without any errors.
The functions that don't work are LoadWorld(), ReloadWorld() and GenerateOpenDriveWorld(). When I do a try catch for them, the exception returned is always "map not found".
However, I can confirm that the maps are correct, and for example in opendrive, it generates the .xodr file and .obj file in the Maps folder too.
It would be great if someone would able to give me some guidance on this?
Thank you.

I rebuilt CarlaUE4 and everything now works fine.