Unknown command: 'post_upgrade'

Environment

Python version: Python 3.6.14
Nautobot version:

nautobot-server --version
1.1.1

Docker-image : networktocode/nautobot

Steps to Reproduce

docker-compose up -d
container failed because docker-entrypoint.sh try nautobot-server post_upgrade which does not working

Expected Behavior
Post_upgrade proceed

Observed Behavior
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (0s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (3s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (6s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (9s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (12s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (15s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (18s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (21s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (24s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (27s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
❌ Waited 30s or more for the DB to become ready.

My debug :
florian@dsrauto-dev1:~/nautobot-carrefour$ docker exec -it nautobot /bin/bash
nautobot@2db08bf4b155:~$ nautobot-server post_upgrade
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
nautobot@2db08bf4b155:~$ env
PYTHONUNBUFFERED=1
HOSTNAME=2db08bf4b155
PYTHON_VERSION=3.6.14
PWD=/opt/nautobot
HOME=/opt/nautobot
NAUTOBOT_ROOT=/opt/nautobot/
LANG=C.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
GPG_KEY=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
TERM=xterm
prometheus_multiproc_dir=/prom_cache
SHLVL=1
PYTHON_PIP_VERSION=21.2.2
PYTHON_GET_PIP_SHA256=6665659241292b2147b58922b9ffe11dda66b39d52d8a6f3aa310bc1d60ea6f7
PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/a1675ab6c2bd898ed82b1f58c486097f763c74a9/public/get-pip.py
NAUTOBOT_DEBUG=True
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
_=/usr/bin/env
nautobot@2db08bf4b155:~$ which nautobot-server
/usr/local/bin/nautobot-server

docker-compose.yml
version: "3.7"

services:

  redis_s:
    build: ./redis_s
    image: carrefourdsr/redis
    container_name: redis_s_nautobot
    ports :
     - "6379"

  redis-sentinel:
    image: docker.io/bitnami/redis-sentinel:latest
    container_name: redis_sentinel_nautobot
    environment:
      - REDIS_MASTER_HOST=redis_s_nautobot

  nautobot:
    image: "networktocode/nautobot"
    volumes:
      - ./nautobot/nautobot_config.py:/opt/nautobot/nautobot_config.py:ro
    environment:
      - NAUTOBOT_ROOT=/opt/nautobot/
      - NAUTOBOT_DEBUG=True
    container_name: nautobot

  sql:
    image: postgres:11
    restart: always
    container_name: sql-nautobot
    environment:
      POSTGRES_USER: user1
      POSTGRES_PASSWORD: cisco1234
      POSTGRES_DB: nautobot

Official docker image :
networktocode/nautobot                                                                          latest              b778847db723        19 hours ago        372MB

Thanks for the report! Could you provide the output of nautobot-server help to assist in debugging this issue?

Thanks for your answer @glennmatthews
Here's the output :
nautobot@2aac5e858ba2:~$ nautobot-server help

Type 'nautobot-server help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    makemigrations
    migrate
    runserver
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver

Hm, so it's not loading any of the Django management extensions. That's not good. Would it be possible to additionally share your nautobot_config.py (with any passwords, secret keys, etc. redacted, of course)?
For reference, what should be seen here is something more like:
Type 'nautobot-server help <subcommand>' for help on a specific subcommand.

Available subcommands:

[auth]
    changepassword
    createsuperuser

[cacheops]
    cleanfilecache
    invalidate

[contenttypes]
    remove_stale_contenttypes

[core]
    celery
    generate_secret_key
    post_upgrade
    start
    startplugin

[dcim]
    trace_paths

[django]
    check
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    sendtestemail
    shell
    showmigrations
    sqlflush
    sqlmigrate
    sqlsequencereset
    squashmigrations
    startapp
    startproject
    test
    testserver

[django_jinja]
    makemessages

[django_rq]
    rqenqueue
    rqscheduler
    rqstats

[drf_yasg]
    generate_swagger

[extras]
    fix_custom_fields
    nbshell
    renaturalize
    rqworker
    runjob
    webhook_receiver

[graphene_django]
    graphql_schema

[health_check]
    health_check

[rest_framework]
    generateschema

[sessions]
    clearsessions

[social_django]
    clearsocial

[staticfiles]
    collectstatic
    findstatic
    runserver

[utilities]
    makemigrations
    migrate

I'll continue to investigate from this end - it's possible that this might be somehow related to #785, although the symptom is clearly rather different.

nautobot_config.py
SECRET_KEY = "CENSORED"

ALLOWED_HOSTS = ['*']

DATABASES = {
    'default': {
        'NAME': 'nautobot',                         # Database name
        'USER': 'user1',                            # Database username
        'PASSWORD': 'cisco1234',                    # Database password
        'HOST': 'sql-nautobot',                     # Database server
        'PORT': '',                                 # Database port (leave blank for default)
        'CONN_MAX_AGE': 300,                        # Max database connection age
        'ENGINE': 'django.db.backends.postgresql',  # Database driver ("mysql" or "postgresql")
    }
}

# Set CACHEOPS_REDIS to an empty value
CACHEOPS_REDIS = False

# If you want to use Sentinel, specify this variable
CACHEOPS_SENTINEL = {
    "locations": [("redis-sentinel", 26379)], # Sentinel locations, required
    "service_name": "mymaster",          # Sentinel service name, required
    "socket_timeout": 11,                # Connection timeout in seconds, optional
    "db": 10                              # Redis database, default: 0
    # ...                                # Everything else is passed to `Sentinel()`
}

RQ_QUEUES = {
    "default": {
        "SENTINELS": [
            ("redis-sentinel", 26379)
            # ("othersentinel.redis.example.com", 6379)
        ],
        "MASTER_NAME": "mymaster",
        "DB": 10,
        "PASSWORD": "",
        "SOCKET_TIMEOUT": None,
        "CONNECTION_KWARGS": {
            "socket_connect_timeout": 10,
        },
        "SSL": False,
    },
    "check_releases": {
        "SENTINELS": [
            ("redis-sentinel", 26379)
            # ("othersentinel.redis.example.com", 6379)
        ],
        "MASTER_NAME": "mymaster",
        "DB": 10,
        "PASSWORD": "",
        "SOCKET_TIMEOUT": None,
        "CONNECTION_KWARGS": {
            "socket_connect_timeout": 10,
        },
        "SSL": False,
    },
    "custom_fields": {
        "SENTINELS": [
            ("redis-sentinel", 26379)
            # ("othersentinel.redis.example.com", 6379)
        ],
        "MASTER_NAME": "mymaster",
        "DB": 10,
        "PASSWORD": "",
        "SOCKET_TIMEOUT": None,
        "CONNECTION_KWARGS": {
            "socket_connect_timeout": 10,
        },
        "SSL": False,
    },
    "webhooks": {
        "SENTINELS": [
            ("redis-sentinel", 26379)
            # ("othersentinel.redis.example.com", 6379)
        ],
        "MASTER_NAME": "mymaster",
        "DB": 10,
        "PASSWORD": "",
        "SOCKET_TIMEOUT": None,
        "CONNECTION_KWARGS": {
            "socket_connect_timeout": 10,
        },
        "SSL": False,
    },

}

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'normal': {
            'format': '%(asctime)s.%(msecs)03d %(levelname)-7s %(name)s : %(message)s',
            'datefmt': '%H:%M:%S',
        },
        'verbose': {
            'format': '%(asctime)s.%(msecs)03d %(levelname)-7s %(name)-20s %(filename)-15s %(funcName)30s() :\n  %(message)s',
            'datefmt': '%H:%M:%S',
        },
    },
    'handlers': {
        'file': {'level': 'INFO', 'class': 'logging.FileHandler', 'filename': '/opt/nautobot/nautobot.log', 'formatter': 'normal'},
        'normal_console': {'level': 'INFO', 'class': 'rq.utils.ColorizingStreamHandler', 'formatter': 'normal'},
        'verbose_console': {'level': 'DEBUG', 'class': 'rq.utils.ColorizingStreamHandler', 'formatter': 'verbose'},
    },
    'loggers': {
        'django': {'handlers': ['file', 'normal_console'], 'level': 'INFO'},
        'nautobot': {'handlers': ['file', 'verbose_console'], 'level': 'DEBUG'},
        'rq.worker': {'handlers': ['file', 'verbose_console'], 'level': 'DEBUG'},
    },
}

@glennmatthews for information, I tried to build the docker image myself, and I have the issue with the final build stage but not with the final-dev build stage.
:white_check_mark:  Working : Command for building the final-dev image :
docker build --target final-dev -t carrefourdsr/nautobot -f ./docker/Dockerfile --build-arg PYTHON_VER=3.6 .
Container log :
Performing database migrations...
Operations to perform:
  Apply all migrations: admin, auth, circuits, contenttypes, db, dcim, extras, ipam, sessions, social_django, taggit, tenancy, users, virtualization
Running migrations:
  No migrations to apply.

Generating cable paths...
Found no missing circuit termination paths; skipping
Found no missing console port paths; skipping
Found no missing console server port paths; skipping
Found no missing interface paths; skipping
Found no missing power feed paths; skipping
Found no missing power outlet paths; skipping
Found no missing power port paths; skipping
Finished.

Collecting static files...

965 static files copied to '/opt/nautobot/static'.

Removing stale content types...

Removing expired sessions...

⏳ Running initial systems check...
System check identified some issues:

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W009) Your SECRET_KEY has less than 50 characters or less than 5 unique characters. Please generate a long and random SECRET_KEY, otherwise many of Django's security-critical features will be vulnerable to attack.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
?: (security.W016) You have 'django.middleware.csrf.CsrfViewMiddleware' in your MIDDLEWARE, but you have not set CSRF_COOKIE_SECURE to True. Using a secure-only CSRF cookie makes it more difficult for network traffic sniffers to steal the CSRF token.
?: (security.W019) You have 'django.middleware.clickjacking.XFrameOptionsMiddleware' in your MIDDLEWARE, but X_FRAME_OPTIONS is not set to 'DENY'. Unless there is a good reason for your site to serve other parts of itself in a frame, you should change it to 'DENY'.

System check identified 6 issues (0 silenced).
Performing system checks...

System check identified no issues (0 silenced).
August 09, 2021 - 14:21:11
Django version 3.1.13, using settings 'nautobot_config'
Starting development server at http://<IP_ADDRESS>:8080/
Quit the server with CONTROL-C.

:x: Not working : Command for building the final image :
docker build --target final -t carrefourdsr/nautobot -f ./docker/Dockerfile --build-arg PYTHON_VER=3.6 .
Container Logs :
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (0s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (3s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (6s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (9s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (12s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (15s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (18s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (21s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (24s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
⏳ Waiting on DB... (27s / 30s)
Unknown command: 'post_upgrade'
Type 'nautobot-server help' for usage.
❌ Waited 30s or more for the DB to become ready.

Thanks for the investigation! Since this is an issue with final but not with dev, that does point towards it being potentially related to #785. Can you try building with the changeset from #788 and see if the issue still occurs?

@glennmatthews good point ! It'w working with your PR.
git checkout gfm-issue-785-loader
docker build --target final -t carrefourdsr/nautobot -f ./docker/Dockerfile --build-arg PYTHON_VER=3.6 .

Performing database migrations...
Operations to perform:
  Apply all migrations: admin, auth, circuits, contenttypes, db, dcim, extras, ipam, sessions, social_django, taggit, tenancy, users, virtualization
Running migrations:
  No migrations to apply.

Generating cable paths...
Found no missing circuit termination paths; skipping
Found no missing console port paths; skipping
Found no missing console server port paths; skipping
Found no missing interface paths; skipping
Found no missing power feed paths; skipping
Found no missing power outlet paths; skipping
Found no missing power port paths; skipping
Finished.

Collecting static files...

965 static files copied to '/opt/nautobot/static'.

Removing stale content types...

Removing expired sessions...

⏳ Running initial systems check...
System check identified some issues:

WARNINGS:
?: (security.W004) You have not set a value for the SECURE_HSTS_SECONDS setting. If your entire site is served only over SSL, you may want to consider setting a value and enabling HTTP Strict Transport Security. Be sure to read the documentation first; enabling HSTS carelessly can cause serious, irreversible problems.
?: (security.W008) Your SECURE_SSL_REDIRECT setting is not set to True. Unless your site should be available over both SSL and non-SSL connections, you may want to either set this setting True or configure a load balancer or reverse-proxy server to redirect all connections to HTTPS.
?: (security.W009) Your SECRET_KEY has less than 50 characters or less than 5 unique characters. Please generate a long and random SECRET_KEY, otherwise many of Django's security-critical features will be vulnerable to attack.
?: (security.W012) SESSION_COOKIE_SECURE is not set to True. Using a secure-only session cookie makes it more difficult for network traffic sniffers to hijack user sessions.
?: (security.W016) You have 'django.middleware.csrf.CsrfViewMiddleware' in your MIDDLEWARE, but you have not set CSRF_COOKIE_SECURE to True. Using a secure-only CSRF cookie makes it more difficult for network traffic sniffers to steal the CSRF token.
?: (security.W019) You have 'django.middleware.clickjacking.XFrameOptionsMiddleware' in your MIDDLEWARE, but X_FRAME_OPTIONS is not set to 'DENY'. Unless there is a good reason for your site to serve other parts of itself in a frame, you should change it to 'DENY'.

System check identified 6 issues (0 silenced).
[uWSGI] getting INI configuration from /opt/nautobot/uwsgi.ini
[uwsgi-static] added mapping for /static => /opt/nautobot/static
*** Starting uWSGI <IP_ADDRESS> (64bit) on [Mon Aug  9 15:02:19 2021] ***
compiled with version: 8.3.0 on 09 August 2021 13:09:50
os: Linux-4.9.0-14-amd64 #1 SMP Debian 4.9.246-2 (2020-12-17)
nodename: 84f691964988
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /opt/nautobot
detected binary path: /usr/local/bin/python3.6
!!! no internal routing support, rebuild with pcre support !!!
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
building mime-types dictionary from file /etc/mime.types...565 entry found
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on <IP_ADDRESS>:8080 fd 12
uWSGI http bound on <IP_ADDRESS>:8443 fd 13
uwsgi socket 0 bound to TCP address <IP_ADDRESS>:36669 (port auto-assigned) fd 11
Python version: 3.6.14 (default, Jul 22 2021, 16:28:25)  [GCC 8.3.0]
--- Python VM already initialized ---
Python main interpreter initialized at 0x5559fc759aa0
python threads support enabled
your server socket listen backlog is limited to 128 connections
your mercy for graceful operations on workers is 60 seconds
mapped 291680 bytes (284 KB) for 3 cores
*** Operational MODE: preforking ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x5559fc759aa0 pid: 1 (default app)
spawned uWSGI master process (pid: 1)
spawned uWSGI worker 1 (pid: 31, cores: 1)
spawned uWSGI worker 2 (pid: 32, cores: 1)
spawned uWSGI worker 3 (pid: 33, cores: 1)
spawned uWSGI http 1 (pid: 34)

Oh that's good news to have on a Monday morning. :-) Thank you!


Image pull errors, removing amd64 fixes it

The image gcr.io/google_containers/heapster-amd64:v1.3.0-beta doesn't seem to exist and I get an ErrImagePull when using the manifest. Removing the -amd64 specification seems to work, although a better fix might be to actually create the image with -amd64 if there is other images available than amd64 ones.

This change is

I signed it!

Closing as obsolete. Please use  gcr.io/google_containers/heapster-amd64:v1.3.0-beta.1


Associate a long description to a field (or entity btw)

Hi!

I miss in Serenity the possibility to associate a long description to a field. That would be useful to fields where the display name is not enough to completely describe the purpose of that.
In terms of implementation, IMHO, that could work based on an attribute, much like DisplayNameAttribute currently works. In this case, System.ComponentModel.DescriptionAttribute would be appropriated.
Possible usage Example:
[DisplayName("Public Key"), Description("This key you should share with your partners.\r\n That allows your partners to send secure messages to you.")]
public String PublicKey {...
This description could be placed somewhere in the form, near the associated field.
Public Key * [VHlwZSlcmUuLi4= ]  (i) This key you should share with your partners. 			                       That allows your partners to send secure messages to you.
In addition to fields that could also work with entities (rows) to give some kind of description of what is the purpose of that entity.
The possibility to have multiple lines (\r\n) and support for localization would be also great!
IMHO, I think the implementation itself would not be so hard. Basically the identical job has already been done with DisplayNameAttribute.
I was trying to implement this globally myself but I think that this must be done inside Serenity sources. I've tried to do that, but, at least for now, I don’t know the platform well enough to perform the task.
So, I leave here the idea. If someone could give me some guidance I would love to implement that myself...
Regards!

Hey Joao,
Are you from Brazil too?
I had this question months ago. After helps from Volkan and other guys, I did this way:
1 - Placeholder
1.1 - In XYZrow.cs, above the name of the field, insert the Placeholder Attribute
e.g.:
[DisplayName("Nome"), Size(100), Placeholder("Nome do Contato")]
public String Nome
{
get { return Fields.Nome[this]; }
set { Fields.Nome[this] = value; }
}
2 - Hint
2.1 - If the description is so long, consider insert Hint Attribute instead Placeholder. To see it, let's the mouse hover the field DisplayName for some seconds.
e.g.:
    [DisplayName("Nome"), Size(100), Hint("Nome do Contato")]
    public String Nome
    {
        get { return Fields.Nome[this]; }
        set { Fields.Nome[this] = value; }
    }

3 - Both
3.1 - I'm using this way: placeholder to short explanation of the field, and hint to a detailed explanation of this field
e.g.:
    [DisplayName("Nome"), Size(100), Placeholder("Nome do Contato"), Hint("Nome do contato que se responsabilizará pelo contrato\nFavor preencher o nome completo.")]
    public String Nome
    {
        get { return Fields.Nome[this]; }
        set { Fields.Nome[this] = value; }
    }

ps.: to breakline, use "\n" instead "\r\n"

Hi Rolemberg,
In fact I speek portuguese also but I'm from across the atlantic sea, from Portugal!
Now I see that I totally miss issue #720, sorry for that.
I'll give it a try, yet, for what I see that doesn't seem to completely invalidate the need for Description. Yet, I must check that in action and maybe Hint+Placeholder can be enough.
For now, I'll just close this since duplicates  #720.
Thanks a lot!


Add function to Popover

I recently applied http://ryanlanciaux.com/blog/2013/10/16/fake-popovers-for-angular-xeditable/,
but I need to be able to add the function to the popup onbeforesave event to form to save the new value in the DB when the submit button (glyphicon glyphicon-ok) is pressed.
Can you help me?
Thanks in advance.

That link is already applied in xeditable here
You should be able to just add onbeforesave to the definition of your editable element.


画面定義設定の正規表現定義欄にて、デフォルトでは空白行が１行表示されているが無くても良いと思われる

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

修正済みのためクローズ


As a user I want to see my projects' list in the workspace loading faster

The main issue here is performance. Every time we load the 'User Projects' table in the Workspace this one renders '23' times which causes 'flickering' of the UI before the user is able to continue.

@jblom or @avlisodraude Please also check this bug in the screencast. It happened when I collected some bookmarks in the production version, the bookmarks are not loading (see mostly 00:38).


(index):94 Error: SyntaxError: Unexpected token < in JSON at position 0(…)

This error happens with the base app that I cloned, I clone the app, run npm install, then npm start. the first time the page loads fine, but if I make anychange, including just a space and hit save, I get the error
(index):94 Error: SyntaxError: Unexpected token < in JSON at position 0(…)

Hi @mthor,

if I make anychange, including just a space and hit save

Where do you make a change? To some file under src/ `? To a HTML file? To a CSS file? Can you provide some specific steps to reproduce?
Also:

(index):94 Error: SyntaxError: Unexpected token < in JSON at position 0(…)
Is this the complete error message? If there is a longer stacktrace please include it.

Greetings
Dope

an example, is I create a folder in the shared folder named "events"  then I add a index.ts  if I do this while npm start is running after I add the .ts file the browser refreshes with the error above.
(index):75 Error: SyntaxError: Unexpected token < in JSON at position 0(…) "Report this error at https://github.com/mgechev/angular2-seed/issues"(anonymous function) @ (index):75ZoneDelegate.invoke @ zone.js?1468519665105:323Zone.run @ zone.js?1468519665105:216(anonymous function) @ zone.js?1468519665105:571ZoneDelegate.invokeTask @ zone.js?1468519665105:356Zone.runTask @ zone.js?1468519665105:256drainMicroTaskQueue @ zone.js?1468519665105:474ZoneTask.invoke @ zone.js?1468519665105:426

@mthor on what OS?

Thanks for the reply,
I am on osx yosemity
I have all my imports as /index,
to duplicate the error, I can just copy the name-list.service into another folder and change the component name and set the correct path to the index file,  I can check systemjs, but I did take from the latest project pull,

this seems to be fixed as of latest pull! thanks


Add a new Elixir example service

Feature Request
Since the feature flag service was replaced with flagd, we need to provide an example erlang or elixir service, ideally one that is an optional sub component of the demo.
Additional Context
Previous discussion: https://github.com/open-telemetry/opentelemetry-demo/issues/1343#issuecomment-2041293323

Based on the latest discussions in this SIG and with the Erlang SIG, there is interest in exploring a chat application to show something Elixir-y with Phoenix Channels / Presence.
I put together a quick proof of concept adding otel instrumentation to this example chat app. This app uses Phoenix liveview to establish and render the initial page view, then uses a socket connection to a Phoenix channel for the chat messages.
The paths on phoenix liveview and ecto are already instrumented with the opentelemetry-erlang-contrib libraries, but the messages passed on the phoenix channel are not traced (automatically). It's easy enough to add traces manually. Adding auto-instrumentation for Phoenix channels to the contrib library may also be worthwhile (I'll open a separate issue to discuss this).
Questions to be answered:

Are we good with moving forward with a Phoenix-based chat application similar to this example? If yes:
Do we want to use Phoenix Liveview for rendering the chat chrome (maybe embedded with an iframe as suggested by @austinlparker) or support a JS frontend (or both)?
Are manual root spans on the socket messages ok for the time-being?
Maybe we could use span links to link all spans originating from the same socket connection?

You mention iframe. So you are thinking it'd be one of those chats that can popup in the corner of a webpage?

You mention iframe. So you are thinking it'd be one of those chats that can popup in the corner of a webpage?

yep

I'm heading out on vacation for a week today but based on the conversation this week in the SIG meeting, next week I will refactor the example application into a PR. I will use manual instrumentation for now while the Elixir instrumentation issue makes its way through the process. I will use Ecto to store the messages in a Postgres database, but I will use the shell scripts created by @puckpuck for seeding the Postgres database. I think this service should probably also call another downstream service like perhaps ProductCatalogService.


Refactor wait_for_{proxy,attached}

This PR:

Extracts and moves wait_for_proxy to config.sh.
Introduces wait_for_attached.

Nice reduction in code size!


Error: Digest method not supported when running ng serve

🐞 Bug report
Command (mark with an x)

[ ] new
[ x ] build
[ x ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[ ] extract-i18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Is this a regression?

 Yes, the previous version in which this bug was not present was: v12
Description
 A clear and concise description of the problem...
Running ng build or ng serve after upgrading to Angular v13, fails with an error saying Digest method not supported
🔬 Minimal Reproduction
https://github.com/khaledosman/angular-realworld-example-app

clone the sample repo
upgrade to angular v13: npx @angular/cli@13 update @angular/core@13 @angular/cli@13
try to start the app via npm start or npm build

🔥 Exception or Error

(node:12345) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:12345) UnhandledPromiseRejectionWarning: Error: Digest method not supported
    at new Hash (internal/crypto/hash.js:46:19)
    at Object.createHash (crypto.js:116:10)
    at BulkUpdateDecorator.hashFactory (/Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack/lib/util/createHash.js:145:18)
    at BulkUpdateDecorator.update (/Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack/lib/util/createHash.js:46:50)
    at RawSource.updateHash (/Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack-sources/lib/RawSource.js:64:8)
    at NormalModule._initBuildHash (/Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack/lib/NormalModule.js:868:17)
    at handleParseResult (/Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack/lib/NormalModule.js:934:10)
    at /Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack/lib/NormalModule.js:1026:4
    at processResult (/Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack/lib/NormalModule.js:743:11)
    at /Users/khaledosman/Documents/github/angular-realworld-example-app/node_modules/webpack/lib/NormalModule.js:807:5

🌍 Your Environment

Angular CLI: 13.0.1
Node: 14.17.5
Package Manager: yarn 1.22.17
OS: darwin x64

Angular: 13.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1300.1
@angular-devkit/build-angular   13.0.1
@angular-devkit/core            13.0.1
@angular-devkit/schematics      13.0.1
@angular/cli                    13.0.1
@schematics/angular             13.0.1
rxjs                            7.4.0
typescript                      4.4.4

It appears that the following resolutions configuration in the projects package.json combined with the preexisting package lock file is causing an unsupported version of Webpack to be used.
  "resolutions": {
    "webpack": "^5.0.0"
  },

Removing the resolutions configuration should resolve the problem.  If this does not then also removing the package lock file (yarn.lock) may be necessary.


Sbom file is not fully generated via CICD Pipelines

Hello Team,
I am working on Typescript/react FE microservices on Azure, with Azure DevOps. I am using Azure DevOps CICD pipelines.
When I use cyclonedx-npm --package-lock-only > bom.json in my local Mac, command working fine, generating SBOM bom.json file with around 50K lines, but when is used same command in pipeline, I get sbom file with just 50 lines.
I don't know what is issue, I tried to install global, and non-global, I used npm and npx, and behaviour is same.
I checked in pipelines, I used cat bom.json, and I can confirm file is small.
I would like for kind assistance.
Thank you.

I am working on Typescript/react FE [...]

for react/FE you better use https://github.com/CycloneDX/cyclonedx-webpack-plugin

Your issue report is pretty vague. So far, I can only think of your build pipeline might not have proper IO-redirection. Did you try cyclonedx-npm --package-lock-only --output-file bom.json instead of cyclonedx-npm --package-lock-only > bom.json?
If this did not help, please create a new issue and provide access to a reproductive setup, provide evidence and a reproducible step-by-step instruction.


Prevent parent node from being dragged below dependent node

Describe the Bug with repro steps
1.Create a Stateful workflow and open the Designer.
2.Add Http request trigger and add Dropbox and add compose.
3.Add Dropbox token into compose create a dependent action to compose which adds implicit for loop.
4.Add some more compose action after step 2.
4.Try to Drag the Dropbox and drop in between step 4 compose actions.
Expected: Drag and drop can not happen in this above case with Dropbox.
Actual: It is happening, we can drop the Dropbox action after its dependent card.
What type of Logic App Is this happening in?
Standard (Portal)
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
No
Workflow JSON
{
  "definition": {
    "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
    "actions": {
      "For_each": {
        "type": "foreach",
        "foreach": "@body('List_files_in_folder')",
        "actions": {},
        "runAfter": {}
      },
      "Compose_1": {
        "type": "Compose",
        "inputs": "fdadfhdf",
        "runAfter": {
          "Compose": [
            "SUCCEEDED"
          ]
        }
      },
      "List_files_in_folder": {
        "type": "ApiConnection",
        "inputs": {
          "host": {
            "connection": {
              "referenceName": "dropbox"
            }
          },
          "method": "get",
          "path": "/datasets/default/folders/@{encodeURIComponent(encodeURIComponent('6e202211-2856-4d17-9ded-5beb8b8626b0'))}"
        },
        "runAfter": {
          "For_each": [
            "SUCCEEDED"
          ]
        },
        "metadata": {
          "6e202211-2856-4d17-9ded-5beb8b8626b0": "/"
        }
      },
      "Compose": {
        "type": "Compose",
        "inputs": "@items('For_each')?['DisplayName']",
        "runAfter": {
          "List_files_in_folder": [
            "SUCCEEDED"
          ]
        }
      }
    },
    "contentVersion": "<IP_ADDRESS>",
    "outputs": {},
    "triggers": {
      "When_a_HTTP_request_is_received": {
        "type": "Request",
        "kind": "Http"
      }
    }
  },
  "connectionReferences": {
    "dropbox": {
      "connection": {
        "id": "/subscriptions/53ce23c6-ff79-490b-a7fb-9590fe7a414a/resourceGroups/LAStnd-v-govubilish/providers/Microsoft.Web/connections/dropbox"
      },
      "connectionName": "dropbox",
      "api": {
        "id": "/subscriptions/53ce23c6-ff79-490b-a7fb-9590fe7a414a/providers/Microsoft.Web/locations/centralus/managedApis/dropbox"
      },
      "authentication": {
        "type": "ManagedServiceIdentity"
      }
    }
  },
  "parameters": {}
}

Screenshots or Videos

Browser
Edge
Additional context
Environmental Details:
URL: https://aka.ms/emastagiLong-flowstip1
Version: 2.30717.1.1
AB#24612832

Issue repro in the latest request:
Environmental Details:
URL: https://aka.ms/emastagiLong-flowstip1
Version: 2.30731.1.4

Issue repro in the latest request
Environmental Details:
URL: https://aka.ms/emastagiLong-flowstip1
Version: 2.30814.1.1

Issue repro in the latest request.
1.VS Code extension - vscode-azurelogicapps-2.58.0.vsix
2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc4MzA5NDU2L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.36.3.nupkg
3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting
4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.36.3/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.36.3_any-any.zip

Issue repro in the latest request
Environmental Details:
URL: https://aka.ms/emastagiLong-flowstip1
Version: 2.30828.1.1

Issue repro in the latest VS code request
1.VS Code extension - vscode-azurelogicapps-2.63.3.vsix
2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzc5MjQ0MDM5L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.38.2.nupkg
3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting
4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.38.2/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.38.2_any-any.zip

Issue repro in the latest request.
Environmental Details:
URL: https://aka.ms/emastagiLong-flowstip1
Version: 2.30920.1.1

Issue repro in the latest request.
1.VS Code extension - vsix icon vscode-azurelogicapps-2.69.0.vsix
2.NuGet package: https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzgwMDY5MTEwL2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.41.1.nupkg
3.Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting
4.Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.41.1/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.41.1_any-any.zip</p>
image

Issue repro in the latest request.
URL: https://aka.ms/emastagiLong-flowstip1
Version: 2.31010.1.1

Issue repro in the latest request
Environmental Details:
Version: 2.31023.1.1

Issue repro in the latest request.
1.VS Code extension -vsix icon[ vscode-azurelogicapps-2.81.0.vsix]
2. NuGet package:  https://artprodeussu2.artifacts.visualstudio.com/A41bf5486-7392-4b7a-a7e3-a735c767e3b3/b32aa71e-8ed2-41b2-9d77-5bc261222004/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL21zYXp1cmUvcHJvamVjdElkL2IzMmFhNzFlLThlZDItNDFiMi05ZDc3LTViYzI2MTIyMjAwNC9idWlsZElkLzgyMzkzNDQ2L2FydGlmYWN0TmFtZS9kcm9wX2J1aWxkX0J1aWxkQXJ0aWZhY3RzX1dpbmRvd3M1/content?format=file&subPath=%2FMicrosoft.Azure.Workflows.WebJobs.Extension.1.47.3.nupkg
4. Extension Bundle (CDN URL): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting

Extension Bundle (Direct Download): https://cdnforlogicappsv2.blob.core.windows.net/logicapps-vendortesting/ExtensionBundles/Microsoft.Azure.Functions.ExtensionBundle.Workflows/1.47.3/Microsoft.Azure.Functions.ExtensionBundle.Workflows.1.47.3_any-any.zip

Issue repro in the latest request.
Environmental Details:
URL: https://aka.ms/emastagiLong-flowstip1
Version: 2.31108.1.1

Issue repro in the latest VScode version.
1.VS Code extension -2.86.0

Issue repro in the latest VScode version.
1.VS Code extension -2.99.0

Issue repro in the latest VScode version.
1.VS Code new bundle -1.55.0

Issue repro in the latest portal version:
Version: 2.40109.1.1

Issue repro in the latest Standard portal version:
Version: 2.40122.1.1

Issue repro in the latest vscode version.

Issue repro in the latest portal version: 2.40226.1.1

Issue repro in the latest Vscode version: 2.119.0

Issue repro in the in the latest VSCode version: 2.125.0

Issue repro in the latest portal version: 2.40311.1.4

Issue repro in the latest VScode version :v.3.0.0

Issue repro in the latest portal version:  2.40408.1.2

Issue repro in the latest Vscode version: 1.70.23

Issue repro in the latest VScode version: 4.13.10

Issue repro in the latest VScode version: 4.25.0


When drag an logo image of channel in sales invoice issue

https://www.loom.com/share/3fc59e77a702498fa592b4d973098b42
As seen in video, -
Expected - the image should not be drag able - so user does not get confused.

Fixed

Approved


How can I get IPs through  cf API

Hi friends
I want to get three fields of information  through  cf API :  CF_INSTANCE_IP，CF_INSTANCE_INTERNAL_IP and CF_INSTANCE_PORT  .But I didn't get a reference from helpful resources.   How can I get these fields

I can get these fiels by instruction : cf ssh $appName;     env | grep INATANCE .    But I want to get those by api

Hmm, I don't believe we provide those via the API.  What use case do you have that would require those variables?

@zhengduoyu
Does this endpoint do what you need?
http://v3-apidocs.cloudfoundry.org/version/3.72.0/index.html#get-stats-for-a-process
One gotcha with it is that the ports it displays can be misleading if you have route integrity enabled, though. See this story for more information on improving that experience: https://www.pivotaltracker.com/story/show/166934752

@zhengduoyu just checking in again, does the /v3/processes/:process-guid/stats endpoint[0] give you what you need? It has the IP of the host that is running the app container in its response.
{
  "resources": [
    {
      "type": "web",
      "index": 0,
      "state": "RUNNING",
      "usage": {
        "time": "2016-03-23T23:17:30.476314154Z",
        "cpu": 0.00038711029163348665,
        "mem": 19177472,
        "disk": 69705728
      },
      "host": "<IP_ADDRESS>",
      "instance_ports": [
        {
          "external": 64546,
          "internal": 8080
        }
      ],
      "uptime": 9042,
      "mem_quota": 268435456,
      "disk_quota":<PHONE_NUMBER>,
      "fds_quota": 16384,
      "isolation_segment": "example_iso_segment",
      "details": null
    }
  ]
}

[0] http://v3-apidocs.cloudfoundry.org/version/3.74.0/index.html#get-stats-for-a-process

https://www.pivotaltracker.com/story/show/166934752 is related to this

I am writing a new CAT for readiness healthcheck today, and I was looking for exactly this feature, so I could grab the CF_INSTANCE_INTERNAL_IP variable. It would be nicer if I could grab it from the API vs the cf cli.

@ameowlia how does the CLI get it?

I think the net_info probably has it on there. I might poke at that real quick and see if it is actually there.

@sethboyles looks like you could do something like this
https://github.com/cloudfoundry/cloud_controller_ng/pull/3378
If this is a change y'all are actually looking for I'd be happy to make a real PR.

resolved with https://github.com/cloudfoundry/cloud_controller_ng/pull/3378 and released in capi 1.162.0


8913 vd special resolutions additional updates, misc clean-up, ux feedback updates

Issue #: /bcgov/entity#8913
Description of changes:

Remaining outstanding issues from previous PR (https://github.com/bcgov/business-create-ui/pull/300)

Move date and other validation rules to rules files to make reusable
Move resolution summary in review page to own component(CompleteResolutionSummary)
Restructure/simplify parseDissolutionDraft logic for parsing special resolutions

Misc cleanup

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

@severinbeauvais @cameron-freshworks I'm going to start writing unit test for the resolution component but I think I've addressed the comments/issues from the previous PR.  You guys can take a look whenever you want.  Don't have to approve yet until I finish the tests.

Merging so Cameron can get the latest code and help me out with UX feedback updates.  Don't worry, I haven't forgotten about unit tests which always seem to be evading me.  And I will address the one last comment you have @severinbeauvais as follow up.


added makefile

Centralized build instructions to Makefile
Closes #82 by creating a central build script location
Closes #64 by removing make.sh

Closes #80


fix(deps): memoize-one cjs exports breaking changes

- Summary
Following up on #2204 and #2202. The latest release of memoize-one introduced a breaking change for the cjs exports - https://github.com/alexreardon/memoize-one/releases/tag/v5.2.0 - this PR bumps the memoize-one dep and addresses the breaking changes.
- A picture of a cute animal (not mandatory but encouraged)

Using adming privilege to merge this, as we're blocked by an on-going build incident.


iOS: Support link in feed list settings menu

Similar to how we have it on Android, there should be a simple way to get support from the iOS app. Let's link people to the support forum. Call it "Support forum" and put it above Logout.

I used the world icon; if you'd like a different one, please provide.


Conditional type turns union into intersection

Bug Report

🔎 Search Terms

🕗 Version & Regression Information
Version 4.3.2

This is the behavior in every version I tried, and I reviewed the FAQ for entries about conditional types

⏯ Playground Link

link
💻 Code

type ConditionalType<T> = T extends undefined ? () => void : (value: T) => void;

interface ConditionalTypeReturn<T> {
    conditionalFunction: ConditionalType<T>;
}

function PerformsActions<T = undefined>(): ConditionalTypeReturn<T> {
    return {
        conditionalFunction<T>(value?: T) { /* do something */}
    }
}

/** works correctly with undefined */
const action = PerformsActions();
action.conditionalFunction()

/** works correctly with number */
const actionTwo = PerformsActions<number>();
actionTwo.conditionalFunction(2)

interface Alpha {
    testProperty: number;
}

interface Bravo {
    otherTestProperty: number;
}

/** breaks union type */
const actionThree = PerformsActions<Alpha | Bravo>()
actionThree.conditionalFunction({ testProperty: 2 })

🙁 Actual behavior

The conditionalFunction argument is Alpha & Bravo
🙂 Expected behavior

The conditionalfunction argument to be Alpha | Bravo

This is working as intended. See https://github.com/microsoft/TypeScript/issues/35819.

It's not ideal, but I get it.


Setup a Sonar run in CI

The purpose of this issue is to Setup a CodeSonar run in CI.

Sonar is run locally


Tab titles should be forced onto two lines regardless of screen width

@ahurworth reports that the tab titles are no longer wrapping on two lines.

After chatting to @helloantoine, it doesn't sound like the wrapping was actually deliberate. They do have a fixed width in Sketch but that wasn't intended to be implemented in production. We could force them onto two lines regardless of screen width but it may be difficult to do in a way that works for all languages. Will need some investigation.

@mattobee do we know the settings or phone screen size that is doing this? I haven't seen this on any device.

@kevin-sheldon I'm not sure what device @ahurworth was using but I can see the same behaviour on a OnePlus 6 where "My Health Log" fits onto one line. There is nothing forcing them to wrap onto two lines so it will happen on any screen above a certain size/resolution.


Seperate the DHW and SH supply system

Each building has one supply system for both DHW and SH currently.

Something that can help specially the Zurich case is this publication of F. Marechal's team: """Characterisation of domestic hot water end-uses for integrated urban thermal energy assessment and optimisation""


Paolo theme protocol

This PR contains:

[ ] bugfix
[ ] feature
[ ] refactor
[x] documentation
[ ] other

Are tests included?

[x] no
[ ] yes (bugfixes and features will not be merged without tests)

Breaking Changes?

[x] no
[ ] yes (breaking changes will not be merged unless absolutely necessary – please provide motivation)

List any relevant issue numbers:

Description
Initial documentation and requirements for the DME Core

Quite a lot of work in this pull request, sorry for all the changes, but it's partially the documentation of what most of the code can do now, so it would be nice if we could start to look into all the protocols and see if we want to improve something as well as let's start discussing all the requirements. All the docs are (like for the ROOL repo) in doc.
Thanks!

Tip for the future: you can add all change suggestions you agree with to a "batch" from the "Files changed"-view and commit them as a single commit. This saves a lot of unnecessary notification emails being sent.


Use Gulp instead of Grunt

This PR rebases #282 on top of master and fixes the conflicts.
cc. @robinwhittleton, @joelanman, @edwardhorsford.
--
Copied from #282 (thanks @htmlandbacon) 💯
This pull request moves from grunt to gulp scripts, this should remove warnings (#89) from the build.
I've kept the functionality of the tasks largely the same, I've split out some tasks a little more where I thought it made sense but happy to take feedback on them, I've also structured this into smaller files.
A couple of things outside the core gulp scripts :

start.js no longer includes the command line version, I had issues with getting this to fully report the output, I've moved this to the package.json file (runs as was) with the npm command

travis ci - this might need a bit more testing, as I struggled to do a real test with it

Procfile - heroku deployment worked fine for me

Be good to get some eyes on this, as it is quite a big change 👏

This isn't copying the documentation stylesheets or assets, the tasks for these need to be added.

@htmlandbacon I might be misreading, but I think theres something wrong here.
The old start sequence was:
npm start
node start.js
checks for node_modules
removes old .port.tmp if necessary
runs grunt
listens for ctrl c, and deletes .port.tmp
.port.tmp is created if the kit has to use a port other than 3000 (ie multiple kits are running), so when server.js automatically restarts it uses the same port
the new sequence is:
npm start
node start.js && gulp
(this means run node start.js, then if it finishes running with no errors, run gulp)
checks for node_modules
removes old .port.tmp if necessary
listens for ctrl c, and deletes .port.tmp
(node start.js is done at this point and exits, allowing gulp to run)
gulp does all the things
the problem is with nothing listening for ctrl c, when a kit starts on another port, it writes .port.tmp to the filesystem but when it stops, theres nothing to delete that file.
It's not a major problem, but its not really right. is it possible to kick off gulp from start.js as before?

Looks like we can http://stackoverflow.com/a/28493832

I'll take a look, I had a few quirks with running it from within a js file.

I've made start.js run the gulp default task, and updated nodemon to ignore changes in assets, and to stop setting NODE_ENV

I’m happy with this.


[SPARK-35678][ML][FOLLOWUP] Use softmax in NB

What changes were proposed in this pull request?
use newly impled softmax function in NB
Why are the changes needed?
to simplify impl
Does this PR introduce any user-facing change?
No
How was this patch tested?
existing testsuite

Test build #139863 has finished for PR 32927 at commit cbcb584.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139863/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44392/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44392/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44392/

@srowen Sorry for missing this one.
There are other softmax computations in ML (ANN), but seems need to make softmax support offset & step, I will have a try.

Test build #139879 has started for PR 32927 at commit 6ee9054.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44409/

Test build #139879 has finished for PR 32927 at commit 6ee9054.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139879/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44409/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44409/

retest this please

Test build #139905 has started for PR 32927 at commit 6ee9054.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44435/

Test build #139905 has finished for PR 32927 at commit 6ee9054.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139905/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44435/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44435/

Thanks @huaxingao @srowen for reviewing!

Merged to master, thanks！

Hm, the tests didn't pass:
2021-06-16T16:16:45.6226175Z ======================================================================
2021-06-16T16:16:45.6227313Z ERROR [7.047s]: test_raw_and_probability_prediction (pyspark.ml.tests.test_algorithms.MultilayerPerceptronClassifierTest)
2021-06-16T16:16:45.6228919Z ----------------------------------------------------------------------
2021-06-16T16:16:45.6229472Z Traceback (most recent call last):
2021-06-16T16:16:45.6270603Z   File "/__w/spark/spark/python/pyspark/ml/tests/test_algorithms.py", line 89, in test_raw_and_probability_prediction
2021-06-16T16:16:45.6271739Z     self.assertTrue(np.allclose(result.rawPrediction, expected_rawPrediction, rtol=0.1))
2021-06-16T16:16:45.6272750Z AssertionError: False is not true
2021-06-16T16:16:45.6273240Z
2021-06-16T16:16:45.6274058Z ----------------------------------------------------------------------

and seems like it fails. I am reverting this for now.

Sorry, I will be more careful next time.

@HyukjinKwon It is OK to revert this PR, I will send a new one which fix this failed case.
But It is somewhat surprising to me that it showed This patch passes all tests. with a failed pyspark test.

Ah, Jenkins and GA have a a bit different env some times. GA is more correct in general fwiw

OK, we will to be more careful @HyukjinKwon


[Feature Request]: requesting for opensource large language models

Do you need to file an issue?

[ ] I have searched the existing issues and this feature is not already filed.
[ ] My model is hosted on OpenAI or Azure. If not, please look at the "model providers" issue and don't file a new one here.
[X] I believe this is a legitimate feature request, not just a question. If this is a question, please use the Discussions area.

Is your feature request related to a problem? Please describe.
i want to use opensoue large language models.
Describe the solution you'd like
No response
Additional context
No response

Please see #657


Write a GO program to print multiplication table

Description
Write a GO program to print multiplication table
Input  : 2

2 x 1 = 2
2 x 2 = 4
2 x 3 = 6
2 x 4 = 8
2 x 5 = 10
2 x 6 = 12
2 x 7 = 14
2 x 8 = 16
2 x 9 = 18
2 x 10 = 20

How to contribute

Save the solution in print_multiplication_table.go file
Add print_multiplication_table.go file in print-multiplication-table folder

!assign

Hey @Chirag8023,
This issue has been assigned to you for more than 15 days.
We are unassigning you from this issue.
If you are still interested in contributing to this issue, please get auto-assigned on the issue by commenting !assign again.
Thanks for your contributions :)


weekYear(Number) jumps to the previous day of the week (and wraps around)

Description of the Issue and Steps to Reproduce:
For the German locale, weekYear(Number) does not preserve the day of the week, even if Number === weekYear(). It always jumps to the previous day and wraps around on Sunday.
import moment from 'moment'

moment.locale('de')

const date = moment('2016-01-01')

date.weekYear(2015) // 2015-12-31 Th
date.weekYear(2015) // 2015-12-30 We
date.weekYear(2015) // 2015-12-29 Tu
date.weekYear(2015) // 2015-12-28 Mo
date.weekYear(2015) // 2016-01-03 Su
date.weekYear(2015) // 2016-01-02 Sa
date.weekYear(2015) // 2016-01-01 Fr

// Workaround:
const day = date.day() // 5
date.weekYear(2015).day(day) // 2016-01-01 Fr

https://jsfiddle.net/mtvsr738/
Environment:
Chrome 57, Firefox 52 and Edge 38 on Windows 10
Other information that may be helpful:
Tue May 02 2017 21:08:56 GMT+0200 (Mitteleuropäische Sommerzeit)
2.5.2017, 21:08:56
-120
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
2.18.1

Looks like a bug to me. Would accept a patch.

Seems to be not only 'de'. I can repro on 'da', 'ca' and 'fr' as well. Only seems to work in 'en'.

Seems to be an issue in other locales as well. I can repro in 'ca' and 'da' as well locally.

dayOfYearFromWeeks(year, week, weekday, dow, doy) seems to calculate a wrong dayOfYear.
moment([2015, 11, 27]).locale('de').weekYear(2015) leads to the call dayOfYearFromWeeks(2015, 52, 6, 1, 4) which then calculates dayOfYear = 360, while it should be 361.


Use service workers for loading webview resources on desktop

This switches us from using a custom protocol to using a service worker to load resources inside webviews. Previously we had only been using service workers on web (since custom protocols are not supported on web). The service worker based approach is much cleaner to than our custom protocol work and lets us avoid some extra roundtrips between the main process and the renderer
We were previously blocked from using service workers on desktop due to an electron issue. However this has now been resolved
/cc @deepak1556

Merging this for testing in insiders
It's possible this change will cause regressions due to an oversight the implementation or for specific extensions that are using the webview in interesting ways. Will continue testing today and look for more feedback once this hits insiders


Add "publication_short" in the "Compact" view for publication

Hi,
It would be nice to include the venue/conference/journal/... in the "Compact" view, similar than in the "Card" view.
Thanks

Duplicate of #950 - see https://github.com/gcushen/hugo-academic/issues/950#issuecomment-469070269


Add GitHub actions configuration in file flake8

adding configuration in file flake8 and adding the file pipfile and pipfile.lock
add for github actions configuration

adding configuration in file flake8 and adding the file pipfile and pipfile.lock
add for github actions configuration


invoke.onError transition not taken when error is thrown

Description

When using invoke with an onError transition I expected throwing an error (or rejecting a promise) from the invoked thing to trigger the onError transition.
Expected Result

onError gets invoked, no error is reported to the console, and I decide what to do with the thrown error.
Actual Result

Console shows a red error and the onError transition is never taken.
Reproduction

https://codesandbox.io/s/xstate-child-machine-errors-h5csv
Additional context

I asked this question in gitter and @davidkpiano suggested that this should work correctly. @amitnovick had a useful workaround where you can sendParent(error(<invoked-id>, data)) which works but feels very clunky and requires child machines to know the id they were invoked with which is problematic.

This is an excellent minimal reproduction of the issue! easily confirmed it.

It works correctly with invoked promises - https://codesandbox.io/s/xstate-child-machine-errors-2hxlu
As to invoked machines - making it work would require defining an extension to SCXML. In SCXML errors are generally added to internal event queue and there is no builtin mechanism for sharing this with a parent.
I'm also not yet sure if supporting this is a good idea - errors can have different root causes, meanings etc (some are expected - e.g. network failure, some are unexpected - e.g. a typo) and explicit error handling (on per call site basis) should be IMHO preferred.

As to invoked machines - making it work would require defining an extension to SCXML. In SCXML errors are generally added to internal event queue and there is no builtin mechanism for sharing this with a parent.
I'm also not yet sure if supporting this is a good idea - errors can have different root causes, meanings etc (some are expected - e.g. network failure, some are unexpected - e.g. a typo) and explicit error handling (on per call site basis) should be IMHO preferred.

Fair points.
Just trying to make sense of this a little more; it seems that:

onDone is similar in function to SCXML's <finalize>
onError doesn't exist in SCXML

That said, I refrain to give opinion as to whether XState should strictly adhere to SCXML or not (I barely have a working understanding of SCXML at this time).

onDone is similar in function to SCXML's

That's correct.

onError doesn't exist in SCXML

That's also correct 😉

That said, I refrain to give opinion as to whether XState should strictly adhere to SCXML or not (I barely have a working understanding of SCXML at this time).

In general XState aims to be compatible with SCXML - however, it doesn't mean that it cannot extend it. In this particular case, I'm not sure if onError is a valid extension (for invoked machines) because it seems preferred for error handling to happen locally (in crashed machine) and only communicate a failure to the outside world IF that is what local error handling decides to do - but that decision is always explicit.
If "uncaught" error would "bubble up" to the parent implicitly we would also have to consider what should happen if it stays unhandled - should we kill all ancestors till the root? When root gets killed in such a way - should we kill all spawned children and propagate it to all "leafs"?

Handling errors at the call sites is annoying duplication but workable, it's what I already have to do using the sendParent(error(<id>)) workaround.
The part that really annoys me is that all my current options require duplication of effort to handle:

If I use sendParent("ERROR") I have to essentially define the onError for the parent twice, once as the actual onError and once in an { on : { ERROR } }.

Or use the awkward sendParent(error(<child-id>)) format, where the child-id param has to be duplicated all over the child machine and has to match the id field defined in the parent machine.

Add a new error state to the child machine with type : "final" and make sure that all possible fatal error paths in the child transition to that state.

If throwing an error/rejecting a promise from the child machine would trigger the onError in the parent like I expected it would, none of those workarounds would be necessary. Not catching the error in the child and letting it propagate to the parent is being explicit, it's explicitly choosing to end the child machine because it hit an unrecoverable error state and let the parent machine know what happened.
I'd be fine with this being an opt-in behavior like autoForward if necessary.

Not catching the error in the child and letting it propagate to the parent is being explicit, it's explicitly choosing to end the child machine because it hit an unrecoverable error state and let the parent machine know what happened.

IMHO omitting an explicit error handler can hardly be considered as being explicit. Problem with propagating errors to parent automatically is that in many situations the parent machine WON'T really be notified about what happened - it will receive some random error, without real intent (in form of an event) associated with it.
You are kinda proposing automatic error bubbling, similar to what try/catch does in languages - but there are perfectly valid concerns why not every programming language has those constructs and why some prefer explicit error passing. It makes you really handle all errors and makes error tracing way easier. With implicit error bubbling it's super hard for a newcomer to know if the error is being handled or not by looking at the call site - because to really know if it is being handled you need to search through all layers for an error handler.

I opened the issue because @davidkpiano told me in Gitter that my original idea (throwing an error in a child machine should trigger the parent onError) should already work and it was a bug that it didn't.
Seems like you and I are just not going to agree on whether or not this is valuable @Andarist 🙂

Seems like you and I are just not going to agree on whether or not this is valuable @Andarist slightly_smiling_face

I believe that @Andarist has been very thoughtful with his reply, in which he points out that "fixing" the behaviour to the expected result may not be the best design choice (for the reasons that he lists, and other reasons).
It would be nice if we could get a clarification from @davidkpiano as to what the onError is intended to do, since after all I think this was his decision to add onError as an extension to SCXML.

Keep also in mind - that I'm just discussing and stating personal opinions. I'm not a native english speaker and my writing might suffer from that - might sound a little bit harsh, too confident etc but that is certainly not my intention.
Just to add a little bit to the discussion - I believe that even if u need to introduce some duplication it might be good because it forces you to be explicit which is really helpful for future readers. It also kinda makes the possible visualization better because the intent being visible closer to the failing call site (so on the same diagram, rather than somewhere else).
I wouldn't also recommend "hacking" the system by using things like sendParent(error(<child-id>)) - I would recommend creating a dedicated event for a particular failure. I believe that only error.execution (runtime errors caused by typos, undefined access etc) should really be handled as "errors" - those are unexpected (and can only be avoided with proper testing). Everything else is not that much of an error - it's just something that happens in the system and is expected to happen.

To be clear, I'm not mad that we disagree on this. We just have very opposing opinions on this and that's totally fine!
I've got a solution that works even if it's a little awkward. It's at least less awkward than forcing every invoke state with a machine that can die to handle onError identically in two different places.

I've found this also annoying. I was expecting same behavior as with promises.
My own awkward solution (draft):
import { Machine, Interpreter } from "xstate"
import { error }                from "xstate/lib/actions"

class CustomInterpreter extends Interpreter {
    spawnMachine(machine, options) {
        try {
            super.spawnMachine(machine, options)
        } catch( errorData ) {
            this.send(error(options.id || machine.id, errorData))
        }
    }
}

const interpret = (machine, options) =>  new CustomInterpreter(machine, options)

codesandbox

Taking a look at Akka docs for actor supervision: https://doc.akka.io/docs/akka/current/general/supervision.html
I would say this falls more under the realm of actor supervision than SCXML (which doesn't define behavior for this, and doesn't care if invoked children fail).
We can make a new "error.<something>" event type to handle this, which is allowed by SCXML:

Therefore applications and platforms may extend the set of errors defined in this specification in two ways. First by adding a suffix to an error name defined in this specification, and second by using 'error.platform' with or without a suffix.

https://www.w3.org/TR/scxml/#ErrorEvents
So child services that throw an error can automatically send the parent an e.g., "error.child" event, which is handled by the parent:
on: {
  "error.child": {
    // handle what happens when an error occurs
    actions: (ctx, event) => {
      event.origin; // child ID
      event.data; // error data
    }
  }
}

Thoughts? This would remove the boilerplate of manually sending an error via sendParent('CUSTOM_ERROR').

@davidkpiano would that event also be issued when an error that would normally trigger onError occurs? My entire use case for wanting this is not wanting to be have to have two separate handlers for errors, so just making sure your proposal covers it.

We can make a new "error." event type to handle this, which is allowed by SCXML:

Extending is definitely OK. I'm not sure if it's OK to send events from error "namespace" to different SCXML sessions though. Every example of error events only adds them to internal queue, there is no example of adding those to external queue (and sending them to external~ entities would require us to add them to their external queue).
I also can't find any statement explicitly forbidding those events from being sent to other sessions, but would be great to reach for some SCXML consultancy regarding this 😅 .
This is just about naming convention - we can always introduce smth like xstate.error namespace - so ultimately for the feature itself it doesn't matter much and can be decided later.

I would say this falls more under the realm of actor supervision

Does Akka define what kind of things are an actor failures and what kind of strategies they recommend in general? What if the supervisor ignores the error? Is the decision about it explicit or implicit (omitting explicit handler)?

My entire use case for wanting this is not wanting to be have to have two separate handlers for errors, so just making sure your proposal covers it.

Could you give an example of "two separate handlers" being needed right now? I might miss that context.

Could you give an example of "two separate handlers" being needed right now? I might miss that context.

I think it is all about this:
invoke: {
    src: <Promise>,
    onDone: "done",
    onError: "error"
}

vs
invoke: {
    src: <Machine>,
    onDone: "done",
    on: {
        "error.child": {
            // handle what happens when an error occurs
            actions: (ctx, event) => {
                event.origin; // child ID
                event.data; // error data
            }
        }
    }
}

While working, refactoring, optimizing, reusing, it may be problematic.

@Andarist Sure!
What I want to be able to do
const child = Machine({
    initial : "request",

    states : {
        request : {
            invoke : {
                id : "req",
                src : () => {
                    /* something that explodes */
                },

                // Purposefully not handling the explosion because it's fatal,
                // the child cannot go on and the parent should be told so
            },
        },
    },
});

const parent = Machine({
    initial : "runchild",

    states : {
        runchild : {
            invoke : {
                id : "child",
                src : child,

                onError : "failure"
            },
        },
    },
});

How I have to do it right now:
const child = Machine({
    initial : "request",

    states : {
        request : {
            invoke : {
                id : "req",
                src : () => {
                    /* something that explodes */
                },

                onError : {
                    // This is awkward, because the "child" value has to match the id field
                    // defined in the parent machine for this invoked machine.
                    actions : (ctx, { data }) => sendParent(error("child", data)),
                },
            },
        },
    },
});

const parent = Machine({
    initial : "runchild",

    states : {
        runchild : {
            invoke : {
                id : "child",
                src : child,

                onError : "failure"
            },
        },
    },
});

What I have to do w/o the sendParent(error()) hackiness:
    initial : "request",

    states : {
        request : {
            invoke : {
                id : "req",
                src : () => {
                    /* something that explodes */
                },

                onError : {
                    actions : (ctx, { data }) => sendParent("ERROR", data),
                },
            },
        },
    },
});

const parent = Machine({
    initial : "runchild",

    states : {
        runchild : {
            on : {
                // Required to handle runtime failures in the child
                ERROR : "failure",
            },

            invoke : {
                id : "child",
                src : child,

                // Required to handle JS failures in the child
                onError : "failure"
            },
        },
    },
});

Now, these examples are all drastically simplified from what the real child/parent machines would look like and the amount of work that goes on in the error-handling paths, but hopefully it helps?

I strongly believe that not being able to invoke a service because it failed to invoke (the "something that explodes") would be an SCXML "error.communication" (which would be in the internal event queue of the parent that invoked the service):

Indicates that an error has occurred while trying to communicate with an external entity.
https://www.w3.org/TR/scxml/#ErrorEvents

XState should definitely raise that error. Thoughts @Andarist ?

I strongly believe that not being able to invoke a service because it failed to invoke (the "something that explodes") would be an SCXML "error.communication" (which would be in the internal event queue of the parent that invoked the service):

This is definitely true when an external service can't be reached etc (e.g. using non-existent child ID as target). But if it has been reached and it "fails" during initialization (e.g. evaluating initial datamodel) then this failure is put (in form of error.execution) into the internal queue of the invoked service - because that error is already local to it.

If the value specified for a  element (by 'src', children, or the environment) is not a legal data value, the SCXML Processor must raise place error.execution in the internal event queue and must create an empty data element in the data model with the specified id.
Note that <data> is a child of <datamodel> which in turn can be a child of <scxml>. I believe similar behavior can be found to be described around other executable contents (this is not limited to <data> evaluation).

The issue described here is not solely exclusive to "initialization" failures. From what I understand @tivac's intention - he'd like to "catch" any "error-events" in parent's external queue~ (or even catch such error automatically in grandparent).
What comes to my mind here - that maybe the problem itself is not about a need for manual conversion of Errors into specific error-events but rather about having to pass such events manually through layers of machines hierarchy, which I agree is tedious. This could be fixed by allowing to target arbitrary known machine as send's target (where at the moment you can only target own children and parent) - see https://github.com/davidkpiano/xstate/issues/523 . With that in place you could just forward explicit event to correct "supervisor".

having to pass such events manually through layers of machines hierarchy

This is definitely a big part of it, though I'm actually less annoyed by the need to explicitly pass errors up to the parent than I am by having two separate paths in the parent to handle different types of errors.
In my mind onError means "the child errored and I want to handle it", which is currently only true for some of the errors in the child unless you use the sendParent(error()) workaround.

Could you specify when this gets currently called:
                // Required to handle JS failures in the child
                onError : "failure"

You name both types of errors 1) runtime failures and 2) JS failures - which ain't that easily distinguishable for a reader (like me).

Docs describe it like this:

onError - (optional) the transition to be taken when the invoked service encounters an execution error.

But... I don't know what an "execution error" is when invoking another machine as it turns out. I tried various forms of invalid things (invalid targets, invoking numbers as functions) and I'm not sure what can actually trigger an onError handler.

I think that for invoked machines it just won't be called (right now) at all - so this leaves you with only one error handler in the parent 😉
The feedback received here is great ❤ we'd really like to recognize the needs of the community to design the API with that in mind. This means that there probably won't be any "quick actions" taken here (maybe besides adjusting the docs), but be sure that we are going to improve the story (one way or another) around this.

https://codesandbox.io/s/xstate-sendparent-test-9mt6e
This is likely the shape of what I'll be using going forward to avoid the "child machine needs to know its id issue" with using the sendParent(error(<id>)) construct. It... works fine, but I think it's ugly & harder to read compared to being able to use onError like I wanted to. I especially dislike that if the parent invoke has an onDone transition defined that the "done" and "error" handlers are now in two different places in the tree instead of nicely encapsulated in the invoke.
I'm not sure why this bothers me so much, but it really does!

Okay, borrowing some terminology from Akka, we can have an action creator called escalate() which escalates an error to the parent.
This would be the same as sendParent((_, event) => error(event)) and would be handled in:
// child
{
  onError: { actions: escalate() }, // error from event (default)
  // ...
  entry: escalate({ message: 'uh oh' }) // custom error
}

// ...

// parent
{
  src: someMachine,
  onError: {
    // handles the escalated error events
  }
}

Thoughts?

Seems reasonable to me. I've got zero problems with it being an explicit thing for the child to fail and notify the parent. escalate seems like a better name for it then flameoutAndDie or something 👍🏻

With the upcoming XState 4.7, your example will look like:
const child = Machine({
  initial: "die",
  states: {
    die: {
      entry: escalate("FATALITY")
    }
  }
});

const parent = Machine({
  initial: "one",

  states: {
    one: {
      invoke: {
        id: "child",
        src: child,
        // taken due to escalate(...)
        onError: "two"
      }
    },
    two: {}
  }
});

Thanks everybody, it took a bit to get alignment but I think this ended up in a great place!

A bit of a nitpick about the escalate(...) function arguments:
I find it intuitive that the argument would be the Error built-in JS object, with the signature:
escalate (error: Error): void

This is because semantically, we catch the escalation with an onError, so the user might think that they need to escalate an Error literally.
Of course, for sending a non-Error value to the parent service, one can always use sendParent.

@amitnovick XState goes beyond the browser.
How would you communicate an error from a remote service, as plain JSON?
The point of escalate() is not the shape of the error (you can pass it an Error instance if you want), it's the invoke config automatically recognizing it in onError.

@amitnovick XState goes beyond the browser.
How would you communicate an error from a remote service, as plain JSON?

Ah, I didn't realize serializability was a goal in service communications, but now that you brought it up and I thought about it, I agree that it's useful in many cases. With serializable messages, there is no need to to use custom encoding and decoding and just rely on JSON.

@Andarist

I'm also not yet sure if supporting this is a good idea - errors can have different root causes, meanings etc (some are expected - e.g. network failure, some are unexpected - e.g. a typo) and explicit error handling (on per call site basis) should be IMHO preferred.

Here's a proposal which tries to preserve explicitness but enables onError to catch runtime exceptions/errors:
Communicated messages from the invoked service to the invoking parent can bear a special type value on the event object.
Currently we have the following type format denoting special message treatment: ${prefix}.${id}, with at least these two prefixes (there may be more I'm unaware of):

ActionTypes.DoneInvoke gets handled by onDone
ActionTypes.error gets handled by onError

In order for the parent to handle a runtime exception/error thrown from an invoked service, it could do something like this:
import { isRuntimeError } from 'xstate'

// ...

invoke: {
  src: machineThatMightThrowAnError,
  onError: (_, error) => {
    if (isRuntimeError(error.type)) {
      //handle the error
    }
  }
}

Where
isRuntimeError(type: string): boolean

would be positive when type has a specific prefix, e.g. ActionTypes.error.runtime.

@amitnovick Keep in mind that onError is a transition(s) configuration, not a function.

D'oh! 🤦
It could still work using Guards though:
invoke: {
  src: machineThatMightThrowAnError,
  onError: {
    cond: (_, event) => isRuntimeError(event.type),
    target: 'somethingWrongHappenedScreen'
  }
}

Note: implementing this would be a breaking change, since onError would be called in cases where it currently doesn't.

Although this issue is closed with the new release which now supports escalate.
I wanted to understand how can I pass the exact error event to the onError of parent.
I want to do something like this
failure: {
      entry: {
           actions: (ctx, event) => {
               escalate(event);
           }
      }
}

The reason is I want the parent to get the exact error object that got returned when let's say an api call failed.
Can we do this?

@vivek12345 Can you open a separate issue for that enhancement request?
Also please keep in mind that escalate(...) and all other action creators are action creators. They do not actually execute the action.

Sure I will create a new request for this. Thank you

I've got this problem but the error was caused with,
The machine I was created was recreated as a machine which doe not causes error
so the code was
const Machinie = createMachine(Machine)
...
created() {
   const AppMachine = Machinie = createMachine(Machine)
}

The error was not so clear. But hopefully this experience would help :)


Dropdown: triggers double onClose event when clicking the icon

Bug Report
A dropdown (like this one) with search, multiple, and selection will trigger the onClose event twice if i click the arrow icon to close, but only once if i click away from the dropdown.
Steps
open dropdown, select an item, or 2 , or not.
close the dropdown by clicking on the arrow
notice console
Expected Result
only one call to onClose
Actual Result
Double call to onClose 💣
Version
0.81.2
Testcase
[Fork, update, and replace this pen to show the bug]:
Forked codesandbox:
https://codesandbox.io/s/wqqyrv5xjl

A valid bug, thanks for report 👍


Tested on Firefox + Metamask, everything is working as intended.

I've tested the app with Firefox and Metamask, and no problems were founds.

Great!  Did you also maybe want to include a screenshot of your logged in account with an attestation and also a link to your completed listing?


frontport 1.13.1 changelog

as title

Codecov Report

Merging #14175 (3f0debb) into master (3175d08) will increase coverage by 0.00%.
The diff coverage is n/a.

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

🚀


Adopt golang 1.21

Tracking issue for Go 1.21
Related: https://github.com/istio/istio/issues/44683

Blocked by quic-go

Tests pass. Benchmarks are mostly about 5% percent better.
GOEXPERIMENT=loopvar do NOT pass yet


Import PFX password-protected certificate to be used for build

Hello,
Question based on the following documentation: https://docs.microsoft.com/en-us/windows/uwp/packaging/auto-build-package-uwp-apps.
Would it be possible to have more explanation on how to use certificate for UWP app, the certificate being supposed to be handled at build time?
So far, I use Secure Files, then use tasks Download Secure File and Copy Files to upload it in my UWP project.
The problem is that, as the certificate is password-protected, the build fails.
Could you please indicate how to handle the password ?
Thanks for your help

Thanks for bringing this to our attention. The engineering team that owns this scenario is looking at updating this article. I will update this issue when we know more.

Last month we updated significant updates to this article, including new guidance about handling passwords for private keys in the certificate. Hopefully the updated guidance provides the info you're looking for. If not, please feel free to reopen this issue with more details.


Gatsby publishing how-to session for the Cupcake website stream

chsanche created the following on Oct 04:

User Story

As a user role below:
DDS Cupcake website content creator

I need to:
understand the Gatsby theme and know how to publish content with the theme

so that I can:
publish content efficiently.

Additional information

Gasby theme can be viewed here.

Training attendees are: Wonil, Lara, Scott, Olivia, James, Jim, Jacob and Jenny.

Acceptance criteria

[ ] Jim, Jacob, and Jenny know how to publish website content with the Gatsby set up

Original issue: https://github.ibm.com/webstandards/digital-design/issues/1803

On Oct 04, chsanche commented:
FYI: I will add Jacob to this task issue once he has an Git account.

On Oct 04, jamespistilli commented:
@chsanche Was this related to a particular epic that might have useful information for us?
Thanks

On Oct 04, chsanche commented:
@jamespistilli This is under the Cupcake MVP epic. I am not sure if there's any other Epic that should be connected to. @hahnrob Can you share your thought?

On Oct 07, hahnrob commented:
@chsanche @jamespistilli I checked another training issue and it is related the release epic: Design kit training #1725.  Since this issue includes Gatsby publishing training for the cupcake website, I think that the linking this issue to the cupcake MVP is fine.

On Oct 07, chsanche commented:
Update: Training scheduled for 10/15 1:00 pm EST.

On Oct 07, chsanche commented:
Perfect. Thank you, @hahnrob.

The learning session scheduled and completed.
Step by step document created by Kenny can be viewed here:
https://ibm.box.com/s/as8fo8gcecvizngxgq2dpuk4po2alq7t


Warning messages in DfRobotInputAbstraction.h and IoAbstraction.h

I have turned on warnings in the Arduino IDE and it comes up with some warnings for these files, all of which are [-Wunused-parameter] and easy to fix by commenting out the name of the parameter. I have uploaded a zip with the two changed files.
Thank you for your libraries
John Fletcher
ChangedFiles.zip

These are acutally in IoAbstraction.
Most of our development is using CLion on platformIO, we have code linting turned on, but it probably has a slightly different set of warnings to Arduino IDE. However, I've gone through and tried to fix up as many warnings as I can.


Feature/#569 remove scope pipeline

I think this PR should merge to dev/3.0, not develop branch right?


Switch to npm workspaces

This implements #331 and substantially changes the repositories structure, build process and tooling. It does not change code apart from compiler error fixes required after TypeScript update:

Switch to npm workspace and vite and thereby drop yarn, lerna and webpack
Restructure project: All code is moved to packages directory
Update and clean-up all dependencies
Use monaco-editor in examples instead of monaco-editor-core #337
README is fully updated
Introduce GitHub Actions
Reconnecting websocket has been removed from the example

This PR could be best checked with a fresh checkout. Please have a look at the updated README if the instructions are good and sufficient. Please check if the example still work as expected. I think so, but I am only involved here since a couple of weeks and may have missed something or misunderstood something.

There is a lot of changes so it's hard to review, there is also some comments that are not relevant anymore I think

There is a lot of changes so it's hard to review, there is also some comments that are not relevant anymore I think

My apologies. This is maily about built, tools and dependencies and not about what the code really does.
What about: Let's not do any code changes apart from needed-because-of-newer-compiler-version in this PR, but open another PR (there are at least two things you recognized, I guess there are more).
Did you have time to try it out, btw?

I added these two points to #315:

Introduce semantic release
Improve code where easily possible


Update app.R

map provider wrap to show tiles in greyed area solves #54

Is this needed anymore? I think this was solved in #72, which has more tile providers in it as well.
I'm going to close this for now so it's not accidentally merged.


🍒 Cherry pick PR #19339 to staging 🍒

🍒 Cherry pick https://github.com/Expensify/App/pull/19339 to staging 🍒

🚀 Cherry-picked to staging by https://github.com/OSBotify in version: 1.3.16-6 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/chiragsalian in version: 1.3.16-7 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Cherry-picked to staging by https://github.com/AndrewGable in version: 1.3.28-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes.

🚀 Deployed to production by https://github.com/AndrewGable in version: 1.3.28-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Code Question

I've been reading the source code for the compiler and I really congratulate you, never seen anything any neater, the code is self explanatory and readable and comment are doing a great job., Maybe I missed it when I got into the VM part because I do not know the theory ., I am looking forward to implement a Pascal Interpreter in C/C++ (Because I really want to make one), however I'm not sure about the type checking !, Any hints how to implement that ?, Thank you very much ^^

Pascal compilers are very easy to write. The language was designed to be easy to implement. Niklaus Wirth (the author of Pascal) has a book called "Compiler Construction" that is supposedly very good (I've never read it). Don't worry at first about the type checking. Just start writing the compiler, and it will later be obvious where to do the type checking when you have to generate code.

Thank you :D, never intented to post an issue. I was intended to reach you for a while, never know how :)


Cupcake website page creation - Guidelines/Overview page

User Story

As an IBM.com page creator

I need to: have a good understanding of the guidelines

so that I can: do my day to day work without confusion.

Additional information
✏ Carbon and DDS v19a websites do not have Guideline overview pages so the content will be new. Please take a look at all the overview pages across the updated sitemap below and come up with a structure for all the overview pages, so we can keep consistency.
Acceptance criteria

[ ] Content and design published with markdowns.
[ ] Content and design reviewed with Jenny and Wonil.
[ ] Content and design accepted by Wonil and Linda.

As we pivot to the new Cupcake website structure, we will no longer create the Guideline/Layout page. Instead, we will modify this issue for the Guideline/Overview page content creation.
FYI - @RobertaJHahn

@jimpistilli The super rough draft of the content copy is ready for your edit and can be viewed in the box folder here.
Let's hop on WebEx and let me go over the content with you before you start. Calendar invite coming soon.

@JennySanchez @jacobottesen-dgc Updated version here: https://ibm.ent.box.com/file/560544800441?sb=/activity

@jimpistilli I reviewed and added my comments to the document. Let me know if you have any questions.

@JennySanchez Updated version below, reflecting your comments.  Please let me know if anything additional is needed.
https://ibm.box.com/s/zdoe49xt24tf8k8lgs1v9hr3afj44jq3
cc: @jacobottesen-dgc

Thank you, @jimpistilli. I will publish the content with markdowns as the next step.

Page published with markdowns and can be viewed here.

@JennySanchez Looks great! Can I make minor edit requests?  If so:

Expressive Theme should be in italics

"colloquial natural language" should have a , after colloquial

The link (and all links really) should be opening in a new page instead of using the same browser. This is a best practice we try to employ for our marketing pages and I believe should carry over here as well. It's a best practice for a better user experience, and keeps readers on our page longer.

cc: @jacobottesen-dgc


Fix: Restore support for dictionary-typed theme setup parameter

This was the original behaviour before 37a3b8c, using the provided config.options.theme as a dictionary to build highlight groups unless it's a string.

Oops . This is on me . @freehaha thanks for fixing it . @hoob3rt can you merge this as soon as you can ...


Add license

If this project is really intended for people to copy and re-use as a base for their own plugins, as stated in the blog post, then it should probably have a license that specifically allows this.
I think MIT should do the job (Caveat lector).

Good catch Jan.
It have to be MIT though. That is our decison.

MIT license added.