fix updated drone file

make generate needs to be run for static
docs need to test that they can build successfully on PR

Codecov Report

Merging #7336 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #7336      +/-   ##
=========================================
+ Coverage   41.29%   41.3%   +<.01%
=========================================
  Files         466     466
  Lines       63186   63186
=========================================
+ Hits        26095   26097       +2
+ Misses      33680   33678       -2
  Partials     3411    3411

Impacted Files
Coverage Δ

modules/log/event.go
65.64% <0%> (+1.02%)
:arrow_up:

Continue to review full report at Codecov.

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


Help getting started

Hi, thanks so much for doing this package. It's just what I need at the point I'm at in my project.
I copied from the complex and simple examples.
I have this much working
UPDATE: made sure it works, here's a proof of concept https://github.com/gostega/go-sse-poc
main.go
package main

import (
	"fmt"
	"io"
	"log"
	"net/http"
	"surfactor/pkg/controllers"
	"surfactor/pkg/models"
	"text/template"
	"time"

	"github.com/labstack/echo/v4"
	"github.com/labstack/echo/v4/middleware"
	"github.com/tmaxmax/go-sse"
)

const (
	topicRandomNumbers = "numbers"
	topicStateChanges  = "evt_statechange"
)

var sseHandler = &sse.Server{
	Provider: &sse.Joe{
		ReplayProvider: &sse.ValidReplayProvider{
			TTL:        time.Minute * 5,
			GCInterval: time.Minute,
			AutoIDs:    false,
		},
	},
	Logger: nil,
	OnSession: func(s *sse.Session) (sse.Subscription, bool) {
		topics := s.Req.URL.Query()["topic"]
		for _, topic := range topics {
			if topic != topicRandomNumbers && topic != topicStateChanges {
				fmt.Fprintf(s.Res, "invalid topic %q; supported are %q, %q", topic, topicRandomNumbers, topicStateChanges)
				s.Res.WriteHeader(http.StatusBadRequest)
				return sse.Subscription{}, false
			}
		}
		if len(topics) == 0 {
			// Provide default topics, if none are given.
			topics = []string{topicRandomNumbers, topicStateChanges}
		}

		return sse.Subscription{
			Client:      s,
			LastEventID: s.LastEventID,
			Topics:      append(topics, sse.DefaultTopic), // the shutdown message is sent on the default topic
		}, true
	},
}

func sseTest(c echo.Context) error {
	// s := &sse.Server{}

	// seededRand := rand.New(rand.NewSource(time.Now().UnixNano()))
	// const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
	go func() {

		// randID := seededRand.Intn(10)
		// b := make([]byte, 10)

		// for range time.Tick(time.Second) {
		// 	m := &sse.Message{}
		// 	m.ID = sse.ID(fmt.Sprintf("thread:%d", randID))
		// 	for i := range b {
		// 		b[i] = charset[seededRand.Intn(len(charset))]
		// 	}

		// 	m.AppendData(string(b))
		// 	_ = sseHandler.Publish(m)
		// }
		m := &sse.Message{}
		m.ID = sse.ID(topicStateChanges)
		m.AppendData("Connected")
		_ = sseHandler.Publish(m)

	}()

	sseHandler.ServeHTTP(c.Response(), c.Request())

	return nil
}

func main() {

        // -------------------------------------
	// ECHO ROUTER INITIALISATION
	// -------------------------------------
	e := echo.New()
	e.Use(middleware.Logger())
	// e.Use(middleware.Recover()) // only works with panics, not 'fatal'
	e.Renderer = NewTemplates()

       e.GET("/events", sseTest)

	/* Start the http server */
	go e.Logger.Fatal(e.Start(port))

        // would also be nice to send a closing message here. "bye" or something
	// I tried this but nothing happens. Perhaps it only works if my app gets terminated differently? I'm just using CTRL+C
	mBye := &sse.Message{Type: sse.Type("close")}
	mBye.ID = sse.ID(topicStateChanges)
	mBye.AppendData("Bye")
	defer sseHandler.Publish(mBye)
}

It works, if I have the random string code uncommented, it will send me random strings every second.
If I have it commented, like above, then I have only the 'Connected' message which I did just to show that the connection was successful.
$ curl localhost:9090/events?topic=evt_statechange
id: evt_statechange
data: Connected

The part that I'm stuck on now, is publishing messages from elsewhere in my code. I have other modules that do things like update the state on a node. And interact with a database. How do I call `_ = sseHandler.Publish("mymessage") from elsewhere?
For example I have another file models/node.go
package models

type Node struct {
	gorm.Model
	Name        string `json:"name"`
	State       State  `json:"state"`
	Target      string `json:"target"`
	Description string `json:"description"`
	Parents     []Path `gorm:"many2many:nodes_paths;"`
	fromState   State  //making the variable start with lowercase makes it invisible to json
}

func (n *Node) AfterUpdate(tx *gorm.DB) (err error) {
	if n.State != n.fromState {
		// how do I from here publish a message to the client?
	}
}

Sending a close message
So, to solve the first issue – of sending a "close" message – you can look at the complex example. It's not using Echo but the standard library's HTTP library but I believe it should be adaptable by looking at Echo's documentation. Personally I don't have any Echo experience so I'm not able to help you with precise directions on that. Here is the example – the net/http.Server.RegisterOnShutdown function does the trick.
Quick fix to dispatching events after update
For the GORM issue, an easy – but I would say dirty – solution would be the statement context. When making a GORM query, add the context as described here, but use a context which has the SSE handler as a value. For example:
db.WithContext(context.WithValue(ctx, "sseHandler", sseHandler)).Find(...)

where sseHandler is of type sse.Server and ctx is a context previously obtained (by means of an http.Request or just a context.Background(). Do not use a string key, as I did in the example. Read the context.WithValue docs for information.
This is one way to avoid creating a package for the SSE handler and having that as some sort of singleton – which I would consider an antipattern which gives away code design issues. Read further for an elaboration on that.
Some code design stuff
Now, for what I would consider a cleaner solution. Normally, to handle a request, a backend server is structured in the following manner:

the route handlers: this does user input deserialization (e.g. JSON to struct), calls into the business logic layer with the deserialized input, serializes the result of the business logic layer into the wire format (HTML, JSON etc.) and sends it to the client, all while handling any errors which occurred in the process.
the business logic layer: this first validates the user input, and then does various operations on the data source(s) (a database, for example) and other services (for example, the server-sent events handler) in order to execute a single business operation; you may choose to omit explicitly creating this layer for simple services (which may very well be your case).
the data layer: this usually does the basic CRUD operations on the data, abstracting away database-specific details, with which the business layer should not be concerned.

Let's run through an example: posting a tweet. Here's what the business requirements are:

a tweet should be not empty and not longer than 120 characters (we'll do validation)
posted tweets can be subsequently viewed forever (in other words, stored in the database)
users which follow the poster should be notified of the new post (to use the SSE handler)
This will be a JSON API, so both the user input and the server response will be in JSON.

At the code level, to each of these layers corresponds a struct with methods. For example, the data layer may look like this (I'll be using some pseudocodish Go which ignores imports for the examples):
package gormdata // assume the file path for this is data/gormdata/repository.go, it will make sense later

type Repository struct {
    db *gorm.DB
}

func (r *Repository) CreateTweet(ctx context.Context, user domain.User, content domain.TweetContent) (domain.Tweet, error)
func (r *Repository) GetUser(ctx context.Context, id domain.ID) (domain.User, error)
func (r *Repository) GetFollowers(ctx context.Context, user domain.User) ([]domain.User, error)

The methods above would implement the queries necessary to do what their names describe. Note that there is no sseHandler involved at this level – the data layer is only concerned with data. As an implementation detail, we still take a context.Context in even though we don't use it to pass the sseHandler to the hooks (we won't be using any GORM hooks anyway). The context is useful as a cancellation signal – that is, to stop the database queries/transaction if, for example, the user cancelled the request, the database timed out (in other words, set a limit on how long a request can take) and so on. If using GORM, always use db.WithContext for each request and immediately check the error after querying. Something like this:
if err := db.WithContext(ctx).Find(...).Error; err != nil {
    return err // or other appropriate handling
}

Anyway, now that the data layer is in place, we should create the business logic/domain layer. Here are the models:
package domain

type ID uuid.UUID // assume some external UUID package; could also be int64 or whatever else

type User struct {
    ID ID
    // other fields, for example a name etc.
}

// TweetContent is a string which can be the content of a tweet.
// That is, a text of length greater than 0 and smaller or equal to 120.
type TweetContent struct {
    text string
}

// String returns the inner text as a string.
func (s TweetContent) String() string

// NewTweetContent validates that the input is not empty and not longer than 120 characters
// and returns a TweetContent which contains it. An error is otherwise returned.
func NewTweetContent(input string) (TweetContent, error)

type Tweet struct {
    ID ID
    Poster *model.User // or maybe just posterID
    Content TweetContent
    // other fields, for example a createdAt would be useful – not included here
    // because it's not specifically stated in our business requirements above.
}

Something to note is that we do not consider these models to be GORM-specific here. We aren't and won't be making use of any GORM-specific features – the whole point is to be decoupled from the database outside the data layer. GORM models should probably be inside the gormdata package.
As a side note: By creating the TweetContent type instead of just using string we can ensure at the type level that anywhere where a valid tweet content is required a valid tweet content is provided (see Repository.CreateTweet). The string type does not encode the constraints the tweet content has, but this type, because it cannot be created through any other means than the constructor function, does. In general you want to try as much as possible to ensure validity – and generally hold as much information as possible about a value – at the type level, so you get help from the compiler.
Now comes our business logic handler in the same package:
package domain

type Repository interface {
    CreateTweet(ctx context.Context, user User, content TweetContent) (Tweet, error)
    GetUser(ctx context.Context, id ID) (User, error)
    GetFollowers(ctx context.Context, user User) ([]User, error)
}

type Domain struct {
    repo Repository
    sseHandler *sse.Server
}

func (d *Domain) PostTweet(ctx context.Context, userID, content string) (Tweet, error)

Note that we define the Repository interface here. The domain package defines how the data layer should look like, as it is the one that uses it – the consumer. Read the Go code review comments section on interfaces for more details on this (also, I consider the Go code review comments to be, as a whole, an essential must read for every Go programmer, so make sure to go through it fully if you haven't). By not receiving the gormdata.Repository directly we:

don't concern ourselves (much, transactions should probably be implemented somehow) anymore with database details in the implementation layer, which simplifies and streamlines the code and makes changes easier down the line (for example, if the database schema changes and the queries become more complex, you just do the change inside the data layer, not everywhere the specific query is used – so this also helps with preventing code duplication), and
open up the possibility to switch the database/ORM in the future. For example, you are bound to find out that GORM is not the best choice for interacting with the database (and that ORMs are not the first choice in Go); by having this separation you won't have to rewrite your entire application, in order to get rid of the models and disentagle the hooks code, but instead all you'll have to do is create a new package with a new repository and swap them later.
What we've done here is basically dependency injection.

Anyway, here's what the PostTweet function will do:

create a domain.ID from the userID string and a TweetContent from the content string; return errors if any fails
get the user's followers using Repository.GetFollowers; we do this before creating the tweet itself so, in case getting the followers fails, no tweet is created (we must do this because we haven't defined a way to do database transactions at the data layer – this is an example and in the real world you will want to have this)
create the tweet, using Repository.GetUser and Repository.CreateTweet; return errors if any fails
build the server-sent event and dispatch it to each of the followers; we'll use the followers' user IDs as message topics so only the respective users are reached (this assumes that each of those users is subscribed to a topic with their user ID as a name; there are better ways to do this, for example to have them subscribed to a topic that corresponds to the poster, but for this example it's simpler this way); return any errors, if they occur, because if a sse.Server.Publish error occurrs the handler is closed and the request should fail anyway

This would be the business logic layer. Now, for the final layer, to route handlers:
package handler

type Handler struct {
    domain *domain.Domain
}

func (h *Handler) PostTweet(w http.ResponseWriter, r *http.Request)

type postTweetInput struct {
    UserID string `json:"user_id"`
    Content string `json:"content"`
}

type postTweetOutput struct {
    TweetID string `json:"tweet_id"`
    // maybe other info off the `domain.Tweet` type which could be useful
    // to client state management, assuming the API is consumed by an SPA, in React for example.

It may look similar to domain.Domain, but notice the difference in the input parameters. The Handler sits at the edge between the client and the server and is responsible of:

the conversion of the data from and to a format understandable by the user
converting errors to a format understandable by and useful to the user (this is in a way a subset of the first rule)
What Handler.PostTweet does in our case is the following:
read the data from the ResponseWriter and parse it as JSON, using the unexported postTweetInput helper. Sends a 400 response if the JSON is invalid
pass that data to domain.PostTweet and handle the error: return 400 for validation errors, 404 for user not found, 500 for database errors
create a postTweetOutput from the resulted domain.Tweet, serialize it as JSON and write it to the client.

Note: to distinguish between the error types returned by the domain layer you may have a domain.Error type and a field on it of type domain.ErrorKind, which could be an enum like so:
package domain

type ErrorKind int

const (
    ErrorKindInvalidInput ErrorKind = iota
    ErrorKindNotFound
    ErrorKindInternal
)

type Error struct {
    Kind ErrorKind
    // Cause is the original error. May be from validation, from the database etc.
    Cause error
    // other useful fields maybe
}

// Error implements the error interface.
func (e *Error) Error() string
// Unwrap returns e.Cause. It makes this type compatible with errors.As, errors.Unwrap and others.
func (e *Error) Unwrap() error

This would be our route handler. In a way you can see how in this case it's just a soft wrapper around the domain layer. If your application is simple and this is too much boilerplate you could omit it and just have the data layer – that still gives you most of the benefits. In the real world, for example, some business logic operations are reused, and by not having the layer code would be duplicated. The separation is also worth it because for example authentication/authorization may be involved and you wouldn't want to execute any business logic for unauthenticated users; by not mixing the two this can be ensured not to happen, as one would authorize first and then go to the domain layer (in code there could be an Authorizer struct similar to the Domain one, which could also be an interface, to allow swapping authentication providers down the line, e.g. moving from Amazon Cognito to Google auth).
Finally, how are all these glued up? Here's how the main code could look like:
func main() {
    gormDB, err := /* init the database */
    // handle the error

    sseHandler := /* init the SSE handler */

    repo := gormdata.New(gormDB) // assume the constructors exists in their respective packages
    dom := domain.New(repo, sseHandler)
    handler := handler.New(dom)

    mux := http.NewServeMux()
    // Here handler.PostTweet could be wrapped in middleware, if necessary
    mux.HandleFunc("POST /post", handler.PostTweet)

    s := &http.Server{
        Address: "<IP_ADDRESS>:8080",
        Handler: mux, // Could also be wrapped in middleware: a panic handler, CORS, logging etc.
        // other fields
    }
    s.RegisterOnShutdown(func() {
        // the SSE close message code
    })

    // maybe add graceful shutdown

    err := s.ListenAndServe()
    // handle the error
}

Note: graceful shutdown is also implemented in the complex example. Take inspiration from that main function for your server startup code.
This would be the general outline.
How does this long-ass rushed incomplete high-level three tier architecture blog post relate to your AfterUpdate issue, though? The data/domain separation may have sparked an idea: dispatching status change events is the responsibility of the domain layer, not the data layer. I don't know what a Node is, but what I am pretty sure of is that its state updates come from some user operations. You should know which operations change the Node state – therein should the events be dispatched.
Final notes
Make sure you keep go-sse updated, as new features are added, bugs are fixed and breaking changes are introduced constantly and you'll want to keep up with them.
Hopefully this helped in giving you some direction on go-sse and Go in general!

I'll convert this issue to a discussion, as this is not an issue with the library per se.


Give the text input in your form the class form-control.

Challenge Waypoint: Style Text Inputs as Form Controls has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

CatPhotoApp

      <button class="btn btn-block btn-primary"> Like</button>

      <button class="btn btn-block btn-info"> Info</button>

      <button class="btn btn-block btn-danger"> Delete</button>

Things cats love:

cat nip

laser pointers

lasagna

Top 3 things cats hate:

flea treatment

thunder

other cats

  <form  action="/submit-cat-photo">

        <input type="radio" name="indoor-outdoor"> Indoor

        <input type="radio" name="indoor-outdoor"> Outdoor

        <input type="checkbox" name="personality"> Loving

        <input type="checkbox" name="personality"> Lazy

        <input type="checkbox" name="personality"> Crazy

    <input type="text" placeholder="cat photo URL" required>
  <form class="form-control">

        <button class="btn btn-primary" type="submit">Submit </button>

    </form>
    </form>

There seems to be an error in your code.. the directions are to give the input element of type text the class of form-control There is no need to create a separate form to go around the button as both the input and button are in a form. Hope this helps @vvkgdm!

@vvkgdm thanks for posting this issue!
@natac13 is correct. You should remove the new form element and add form-control class to <input type="text" placeholder="cat photo URL" required>.
Closing this issue. If you have problems with your code, please, post a message in our Gitter chat room first, thanks.

Please review the Guidelines for Contributing, thank you!.

input type="text" class="form-control" placeholder="cat photo URL" required>

@natac13 Really an intelligent person
May you succeed in your aim

Glad my answer helped you @hamadjadoon. I really appreciate the feedback!

Solved.
<input type="text" class="form-control" placeholder="cat photo URL" required>     <button type="submit" class="btn btn-primary"> Submit</button>

Thanks guys.:)

it helps me, thank you

<input type="text" class="form-control" placeholder="cat photo URL" required><button type="submit">Submit</button>

Give the submit button in your form the classes btn btn-primary. Why is this error there ?

@esaky  you should add the btn class to the button nest:
Submit

Problem:-Give the text input in your form the class form-control.
My code:

 Indoor

 Outdoor

 Loving

 Lazy

 Crazy

Submit

please help me ..thanks in advance..

Problem:Give the text input in your form the class form-control.
My code:

 Indoor

 Outdoor

 Loving

 Lazy

 Crazy

Submit

Submit


Add provider flag to vendor publish in README

This should definitely be in the README. I made the mistake of publishing all other assets too, when I didn't intend to.


new markdown

adding new features #to the project # @mylakgithubaccount , c coding

adding mylakgithu,baccount file , #to the further project#

[] turn on GitHub page

[ ] Turn on GitHub pages
[ ] outline of my portfolio


Description for TestActionResultModel.stepIdentifier does not make sense

Note: This bug is for the Results - List page, which has no link to providing feedback. The page has the following metadata:

ID: 67ac545f-f186-98b9-5c5e-8f1784dbaeea
Version Independent ID: 6dd0a90e-42c0-cf2b-b34e-02b34bb27f4c

This issue is specifically about the TestActionResultModel documentation. The documentation for the stepIdentifier property says the following (other properties redacted for clarity):

Name
Type
Description

stepIdentifier
string
This is step Id of test case. For shared step, it is step Id of shared step in test case workitem; step Id in shared step. Example: TestCase workitem has two steps: 1) Normal step with Id = 1 2) Shared Step with Id = 2. Inside shared step: a) Normal Step with Id = 1 Value for StepIdentifier for First step: "1" Second step: "2;1"

The description for stepIdentifier is poorly worded and confusing.

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

ID: 9225a655-ca16-ad3b-7c26-953213c3ab7c
Version Independent ID: 3e98152a-bcd0-a68f-17e6-e21ea1fb347b
Content: Results - REST API (Azure DevOps Test)
Content Source: docs-ref-autogen/6.0/test/Results.yml
Product: devops
Technology: devops-ref
GitHub Login: @wnjenkin
Microsoft Alias: whjenkin

Not only is it confusing, the steps that come back don't even correlate to the proper items, comments are on completely different stepIds than what one would expect, and they do not line up...


Update gov.md

Add API section.

@adirdidi : I notice you have used 3 backticks ( ``` ) before & after the links, to encapsulate them. Is there a MarkDown principle to use backticks this way? If so, I am not familiar with it and would like to know more about it. In my experience, 3 backticks are used on separate lines to create a code block for one or more lines/rows, like a code snippet or sample, or a whole script paragraph. Also, in my experience, it is only necessary to use 1 backtick before and after separate words or parts of a line, while the rest of the line (or row) stays unmodified by the backticks.
Hoping to hear from you about this, because this form of backtick usage has become a conundrum to me.


session unavailable, an issue of tutorial.

Expected Behavior

I was working on the auth blueprint part of the tutorial. When I tested the login() function under the debug mode, with inputing correct pair of username/passowrd, it should've thrown werkzeug.routing.BuildError: Could not build url for endpoint 'index'..
# flaskr/auth.py
@bp.route('/login', methods=('GET', 'POST'))
def login():
    if request.method == 'POST':
        username = request.form['username']
        password = request.form['password']
        db = get_db()
        err = None
        # ...

        if err is None:
            session.clear()
            session['user_id'] = user['id']
            return redirect(url_for('index'))
        # ...

# flaskr/__init__.py
def create_app(test_config=None):
    """Instead of creating an app (instance of `Flask` globally),
    loading configurations and other setups inside `create_app`.
    """
    app = Flask(__name__, instance_relative_config=True)
    app.config.from_mapping(
        SECRECT_KEY='dev',
        DATABASE=os.path.join(app.instance_path, 'flaskr.sqlite'),
    )
    # ...

Actual Behavior

However, I got

  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/.../.venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/.../.venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/.../.venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/.../pycourse/flaskr_project/flaskr/auth.py", line 73, in login
    session.clear()
  File "/.../.venv/lib/python3.7/site-packages/flask/sessions.py", line 103, in _fail
    "The session is unavailable because no secret "
RuntimeError: The session is unavailable because no secret key was set.  Set the secret_key on the application to something unique and secret.

So I checked SECRET_KEY and session. And I was confused since the secret_key seemed to be set but the session was still null.
<Config {'ENV': 'development', 'DEBUG': True, 'TESTING': False, ..., 'SECRECT_KEY': 'dev', 'DATABASE': '.../instance/flaskr.sqlite'}>

<session> <NullSession {}>

I tried to fixed it by using app.secret_key.
def create_app(test_config=None):
    """Instead of creating an app (instance of `Flask` globally),
    loading configurations and other setups inside `create_app`.
    """
    app = Flask(__name__, instance_relative_config=True)
    app.config.from_mapping(
        SECRECT_KEY='dev',
        DATABASE=os.path.join(app.instance_path, 'flaskr.sqlite'),
    )
    app.secret_key = 'secret'
    # ...

This line didn't change the SECRET_KEY in app.config. But this time I got the werkzeug.routing.BuildError.
Environment

Python version: 3.7.2
Flask version: 1.1.1
Werkzeug version: 0.16.0
(Also the tutorial is from) Doc version: 1.1.x

You have a typo in SECRECT_KEY


use raw strings where needed to avoid escape errors in 3.6+

Hi!
Starting with Python 3.6, unknown escape sequences cause warnings or errors (depending on the runtime environment). This PR is turning 2 regexes into raw strings. Since it's a really trivial patch, I've avoided adding myself to the author list ;-)

I would use raw string for all regexps, no matter if they contain backslashes or not

Yes, me too. However, I did not spend much time to check the semantics of, for example _octal_re and _quote_re. They even contain backslashes, but quoted. I'm just not sure, if for the regex engine or for the string parser.
Side note: I have no idea, why the checks fail. The test suite definitely ran locally :)

This PR is incorrect and causes the tests to fail for me, because backslashes do not need to be escaped in raw strings. See this commit for an updated version that also changes _octal_re and _quote_re to raw strings.

Yup, as said, no insight, which of the backslashes were real (same problem the interpreter had.). This PR was just for getting things rolling. Thanks for eventually fixing it.

That commit is my own fork, so the bug has not been fixed upstream yet. I can submit a new PR with my patch.
I am not 100% sure my patch is correct, but my reasoning was to remove backslashes from all the valid escaped characters (in this case, only \), and leave the backslashes on the invalid escapes.


Upgrade postgres check to psycopg3

What does this PR do?

This PR upgrades the postgres integration to use the latest psycopg library, psycopg3. This moves us to the latest and greatest tech when it comes to running postgres queries via python.
Motivation

Prior to this commit, we were running a version of psycopg2 that is 3 years old.
This allows us to track important bug fixes, as well as use the latest version of libpq under the hood.
There is evidence, based on several customer reports that the postgres integration is leaking under certain conditions

We were able to re-produce this in our own cluster, and saw that the place we were leaking from was in native memory

... after doing some investigative work, we were able to narrow down the source of the leak to likely be coming from libpq & it seemingly was triggered when many psycopg2 exceptions were being thrown.. as you can see here:

Bumps in memory & OOMs seem to line up with spikes in psycopg2 exceptions being thrown

From running the datadog native profiler, we could see memory growing overtime in libpq code path

Since libpq ships with the pyscopg2-binary, we were un able to upgrade it without upgrading pyscopg2. After upgrading to pyscopg3, we saw memory stabilize for our test agent

The next step is test across all of our clusters & with customers to confirm that this indeed solves the issue.
Other Fixes / Improvements

Adds logic around ensuring job loop threads are shutdown before cleaning up connection pool resources. This prevents psycopg.OperationalError: consuming input failed: connection pointer is NULL errors from being thrown & in some cases this resulted in a segfault being thrown from the underlying C code. Prior to this commit, the following could happen:

On cancel the job loop threads would shut down

This would call this shutdown hook that would close all db connections... from one of the job loop threads

Meanwhile, the check could still be running using the main db connection from the pool & see its connection closed while it's trying to finish running all of it's queries
When testing this code against hosts where cancel is called frequently (could happen to dbs that are not properly configured for the agent), we see null pointer connection exceptions / segfaults as a result.
In order to fix this we must:

use a separate connection for the main check thread
wait until job loops shut down & then close all connections from the main check thread
finally close main check thread connection after check has finished

Fix frequent json serialization errors seen on activity samples by adding support for IPv4Address to our custom implementation
Add better logic around how we format queries where dbstrict or ignore_databases is set in the users config. Without this, I saw many SyntaxErrors being thrown by psycopg, which I believe were previously swallowed
Prevent flaky failures on the activity sampling collection test, as explained here
Adds new WaitGroup utility to our tests, which allows for us to do communication between many threads & removes the need to rely on sleep to test for certain conditions. This also improved flakey test failures & will help us in the future as we continue to add functionality to this check.

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached
[ ] If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

I think changelog/Fixed is more appropriate, no? What was added?

This PR requires this change to the build process https://github.com/DataDog/datadog-agent/pull/18532 to be merged before we can proceed


Disable floating point contraction at link time

In https://github.com/acts-project/algebra-plugins/pull/95, we have run into an interesting problem with Vc where the library fails with illegal instruction errors in the Github CI when using Mac OS based runners. Using a debugger produces the following output:
Running main() from /Users/runner/work/algebra-plugins/algebra-plugins/build/_deps/googletest-src/googletest/src/gtest_main.cc
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from test_vc_host
[ RUN      ] test_vc_host.vc_soa_vector
[       OK ] test_vc_host.vc_soa_vector (0 ms)
[ RUN      ] test_vc_host.vc_soa_getter
Process 4114 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x00000001010da1b2 algebra_test_vc_soa`Vc_1::Vector<float, Vc_1::VectorAbi::Avx> Vc_1::Common::Trigonometric<Vc_1::ImplementationT<6u> >::atan2<Vc_1::Vector<float, Vc_1::VectorAbi::Avx> >(Vc_1::Vector<float, Vc_1::VectorAbi::Avx> const&, Vc_1::Vector<float, Vc_1::VectorAbi::Avx> const&) + 242
algebra_test_vc_soa`Vc_1::Common::Trigonometric<Vc_1::ImplementationT<6u> >::atan2<Vc_1::Vector<float, Vc_1::VectorAbi::Avx> >:
->  0x1010da1b2 <+242>: vfmsub231ps %ymm14, %ymm13, %ymm0     ; ymm0 = (ymm13 * ymm14) - ymm0
    0x1010da1b7 <+247>: vbroadcastss 0x38(%rax), %ymm14
    0x1010da1bd <+253>: vfmadd231ps %ymm0, %ymm13, %ymm14     ; ymm14 = (ymm13 * ymm0) + ymm14
    0x1010da1c2 <+258>: vbroadcastss 0x3c(%rax), %ymm0
Target 0: (algebra_test_vc_soa) stopped.
Process 4114 launched: '/Users/runner/work/algebra-plugins/algebra-plugins/build/bin/Release/algebra_test_vc_soa' (x86_64)

For reference, the Github Mac OS CI machines run Intel Ivy Bridge CPUs with AVX but without FMA. The program is breaking on vfmsub231ps, which is an FMA instruction. Notably, this is implementation 6 (Vc_1::ImplementationT<6u>) which indicates AVX without FMA, which is the right version of the code to load but it should not contain FMA instructions.
Turns out that this happens because XCode feels at liberty to perform link-time floating point contraction, which takes the following code from trigonometric_AVX.o:
00000000000020f0 <Vc_1::Vector<float, Vc_1::VectorAbi::Avx> Vc_1::Common::Trigonometric<Vc_1::ImplementationT<6u>>::atan2<Vc_1::Vector<float, Vc_1::VectorAbi::Avx>>(Vc_1::Vector<float, Vc_1::VectorAbi::Avx> const
&, Vc_1::Vector<float, Vc_1::VectorAbi::Avx> const&)>:
[some assembly redacted for brevity]
    21d6: c4 62 7d 18 70 30             vbroadcastss    48(%rax), %ymm14
    21dc: c4 41 14 59 f6                vmulps  %ymm14, %ymm13, %ymm14
    21e1: c4 e2 7d 18 60 34             vbroadcastss    52(%rax), %ymm4
    21e7: c5 8c 5c e4                   vsubps  %ymm4, %ymm14, %ymm4
    21eb: c5 94 59 e4                   vmulps  %ymm4, %ymm13, %ymm4
    21ef: c4 62 7d 18 70 38             vbroadcastss    56(%rax), %ymm14
    21f5: c5 8c 58 e4                   vaddps  %ymm4, %ymm14, %ymm4
    21f9: c5 94 59 e4                   vmulps  %ymm4, %ymm13, %ymm4
    21fd: c4 62 7d 18 70 3c             vbroadcastss    60(%rax), %ymm14
    2203: c4 c1 5c 5c e6                vsubps  %ymm14, %ymm4, %ymm4
    2208: c5 94 59 e4                   vmulps  %ymm4, %ymm13, %ymm4

And produces the following FMA-dependent code in libVc.a through link-time floating point contraction:
0000000000002460 <Vc_1::Vector<float, Vc_1::VectorAbi::Avx> Vc_1::Common::Trigonometric<Vc_1::ImplementationT<7u>>::atan2<Vc_1::Vector<float, Vc_1::VectorAbi::Avx>>(Vc_1::Vector<float, Vc_1::VectorAbi::Avx> const
&, Vc_1::Vector<float, Vc_1::VectorAbi::Avx> const&)>:
[some assembly redacted for brevity]
    2547: c4 62 7d 18 70 30             vbroadcastss    48(%rax), %ymm14
    254d: c4 e2 7d 18 40 34             vbroadcastss    52(%rax), %ymm0
    2553: c4 c2 15 ba c6                vfmsub231ps     %ymm14, %ymm13, %ymm0 ## ymm0 = (ymm13 * ymm14) - ymm0
    2558: c4 62 7d 18 70 38             vbroadcastss    56(%rax), %ymm14
    255e: c4 62 15 b8 f0                vfmadd231ps     %ymm0, %ymm13, %ymm14 ## ymm14 = (ymm13 * ymm0) + ymm14
    2563: c4 e2 7d 18 40 3c             vbroadcastss    60(%rax), %ymm0
    2569: c4 c2 15 ba c6                vfmsub231ps     %ymm14, %ymm13, %ymm0 ## ymm0 = (ymm13 * ymm14) - ymm0
    256e: c5 94 59 c0                   vmulps  %ymm0, %ymm13, %ymm0

In this commit, I disable floating point contraction at link time for XCode. I would expect this to have an extremely small (if not zero) impact on performance, as all useful floating point contraction would be likely to happen at compile time, not link time.

Thank you for the analysis and solution. It does look like a workaround to a linker bug, though. That doesn't mean there should be no workaround. But priority should be on a real fix, i.e. to the linker.

Thanks for your reply! I agree completely that I would rather fix this in the linker, and indeed it seems like more recent versions of XCode do not have this particular bug. I would be happy to disregard this because of this, but the XCode version affected by this problem is the default in Mac OS CI runners on Github. This means that the default configuration there is affected, and it's non-trivial to install a different version of XCode on the runners, as far as I am aware.
Out of curiosity, what is the intended mechanism through which Vc ensures that no link-time FP contraction happens? Is the linker supposed to respect some metadata embedded in the target-specific object files? I was unable to find any flags in the linker invocation of libVc.a that would suggest that FP contraction should be disallowed, but I am not intimately familiar with the intended behaviour of the linker here.

Linking by itself should not change the code. However LTO will. The principal idea of LTO is that the linker gets the same flags as the compiler got. So the linker would see the a -m flags that determine whether FMA instructions can be used. Contraction by itself isn't the problem. The real problem is emitting FMA instructions without -mfma.


QA - Site - Product Detail Page - Slug Name display during Page Loading.

QA - Site - Product Detail Page - Slug Name display for few seconds during Page Loading.
Click on Search Button without enter any data.
Click on any product and go to detail page.

Done


Deployment Tooling - Teraform

Saw a presentation at #secdevopssummit where teraform templates were mentioned as being part of the repo ... are they in a related repo?

I used terraform to spin up and spin down the environment used for the tests of our first experiment.

https://github.com/Optum/ChaoSlingr/tree/master/test/PortChange_Generatr
https://github.com/Optum/ChaoSlingr/tree/master/test/PortChange_Slingr


Add KubeletConfig for masters

Still draft. Needs to look it with no oncall in the way.
Which issue this PR addresses:
Fixes case where on big clusters masters starts firing the alert SystemMemoryExceedsReservation
What this PR does / why we need it:
It is bit over-complicated because of this https://bugzilla.redhat.com/show_bug.cgi?id=1995621
Test plan for issue:
Unit....
Is there any documentation that needs to be updated for this PR?
No

/azp run e2e

closed as this CRIO issue


Write "Getting started with pipelines" doc

Write and introductory tutorial for users who are completely new to Tekton to create their first pipeline.
This tutorial would be the natural second step for new users that already read how to create a single task. It should be a straightforward reproducible tutorial, that can be run locally and doesn't include more information that necessary.

/kind documentation

This was merged and the tutorial is now available on the website.

nice work!  but the tutorial link is a localhost url.

nice work! but the tutorial link is a localhost url.

Well, it works on my machine 😅
Sorry about that, I just updated my comment with the correct link.


What is the src/lib directory used for?

I have seen the src/lib directory in many projects but I have no idea why we should use it.
For example, in this project, you put the authorization.tsx file in this directory, it could be in the utils or hooks or even components directory. (I haven't read this project completely and maybe I'm wrong but you get the point.)
Can someone explain to me exactly what files should be placed in it? sometimes even functions and hooks are placed in this directory, when we should do this?

I like to put internal or external libraries inside the lib folder.
External libraries such as axios HTTP client can be configured there and then re-exported.
Theauthorization.tsx file is inside lib because it could be considered as an internal library. Why is it not in utils/hooks/components? Because it is a module that exports multiple things and it wouldn't fit in other folders such as hooks because it exports the Authorization component, and it is not in the components folder because it exports the useAuthorization hook plus some other things.

Thank you. That makes sense to me.


Feature Request: Lenient Merging

Context
In complex API ecosystems, it is common to encounter inconsistencies between specifications from different sources. Such discrepancies can lead to conflicts and complications when attempting to integrate these APIs into a unified supergraph with GraphQL Mesh.
To address these challenges, we propose a feature request for GraphQL Mesh that would introduce an option for more "flexible" or lenient merging of types. This feature would enable us to bypass the inconsistencies across our various Swagger specifications, allowing for smoother integration and usage of our APIs.
Motivational Example
"Person" definition in a 1st Swagger;
"Person": {
	"type": "object",
	"discriminator": {
		"propertyName": "personType",
		"mapping": {
			"ENTERPRISE": "#/components/schemas/Enterprise",
			"INDIVIDUAL": "#/components/schemas/Individual"
		}
	},
	"properties": {
		"id": {
			"type": "string"
		},
		"accountAccess": {
			"type": "array",
			"items": {
				"type": "string"
			}
		},
		"personType": {
			"type": "string"
		}
	}
}

"Person" definition in a 2nd Swagger;
"Person": {
	"type": "object",
	"properties": {
		"id": {
			"type": "string"
		},
		"login": {
			"type": "array",
			"items": {
					"type": "string"
			}
		}
	}
}

Result (Mesh Compose ERROR);
➡ Type "Person" has mismatched kind: it is defined as Interface Type in subgraph "A" but Object Type in subgraph "B"
In this case, we would like to have, in our supergraph.graphql file output by Mesh, a "Person" interface with 4 fields: id, accountAccess, personType and login.
Here are some other inconsistency errors we would also like to solve with a more flexible merging of type;
➡ Input object field "x" is required in some subgraphs but does not appear in all subgraphs: it is required in subgraph "A" but does not appear in subgraph "B"
➡ Type of field "x.y" is incompatible across subgraphs: it has type "a" in subgraph "A" but type "b" in subgraph "B"

Type of field "x.y" is incompatible across subgraphs: it has type "a" in subgraph "A" but type "b" in subgraph "B"
You need to rename that field in one of the subgraphs to resolve the conflict.

Input object field "x" is required in some subgraphs but does not appear in all subgraphs: it is required in subgraph "A" but does not appear in subgraph "B"
The best option would be rename one of the input object types to avoid merging those input objects.

In this case, we would like to have, in our supergraph.graphql file output by Mesh, a "Person" interface with 4 fields: id, accountAccess, personType and login.

If they are the same entities, you can transform Person in the other one to be an interface object using the following transform;
https://the-guild.dev/graphql/mesh/v1/transforms/federation
 createFederationTransform({
          // Schema Coordinates
          Product: {
             interfaceObject: true
          }
})

I'd recommend to avoid using it to be honest, because it breaks the query delegation so you won't be able to merge types from different sources and stitch fields from a subgraph to another one when you use it. I'd use rename or prefix transform


/channel command

ex... /channel lobby would do a location.replace('/?' + input)
Also, per #1 /nick would be useful.

I'm hesitant to enable commands, since it complicates the system and requires extensive user documentation. I feel it would be an avalanche to just supporting all of IRC commands.

While I understand that... /channel x could just redirect to /?x .. which would reload the page... in combination with remembering the person's username (via cookie or localstorage) it wouldn't be very annoying... I think just /channel and /nick should be enough (thought /msg would be cool too).


source and schema changes

Keep ancestry information in schema as the 10 previous hashes
Remove name argument from source

Ah alright, I was going to ask anyway because it did not seem useful to remove the decorator arg. I have updated the PR and it should be ready for review again @rudolfix


Guidozam patch dynamicfield

Q
A

Bug fix?
[ x ]

New feature?
[ ]

New sample?
[ ]

What's in this Pull Request?
Fix to the DynamicField control that prevented the correct behavior of the getRequiredErrorText method when the changedValue is null.

@GuidoZam thanks for the PR. I just merged the other PR with the fix to the property name and the same changes are showing here. Could you please update this PR?

Sorry @joelfmrodrigues my bad, I thought I've created another branch for the changes. I'll fix as soon as I can!


Dribble stats

Add stats for cars that can dribble

Codecov Report

Merging #111 into new_stats will decrease coverage by 0.95%.
The diff coverage is 86.84%.

@@             Coverage Diff             @@
##           new_stats   #111      +/-   ##
===========================================
- Coverage      85.95%    85%   -0.96%
===========================================
  Files             78     82       +4
  Lines           3276   3395     +119
  Branches         491    502      +11
===========================================
+ Hits            2816   2886      +70
- Misses           394    443      +49
  Partials          66     66


[Feature Request] Additional Drag type: FixedToPlane

We've gotten 3 additional request for a new drag behavior, where if specified, locks the drag into a provided plane / axis. This is useful for dragging objects in AR, where we do not necessary want to fix the object onto feature points, but would like to drag an object on the ground. This also helps mitigate certain limitations of ARCore, where the depth visibility of the device and thus "Draggable area" for DragToWorld is limited.
Note: The notion of a plane here is entirely virtual. For now, this does not apply to ARPlanes.

I think the feature request would help if you, could choose the axis before the drag (or choose a fixed value to some axis before the drag) I think it could be ideal.
Maybe with mask? fixedDragMask = DRAG_X | DRAG_Y;

Hello, @dthian .
I just downloaded and used 1.7.0 version.
Below is my code with the new DragType.
        println("node: ${node}");
        println("parent node: ${node.parentNode}");
        println("node A");
        println("\tpos realtime${node.positionRealtime}");

        node.setDragListener { source, node, worldLocation, localLocation ->
                println("node");
                println("\tsource ${source}}");
                println("\tnode ${node}");
                println("\tworldLocation ${worldLocation}");
                println("\tlocalLocation ${localLocation}");
                println("-----");
            }

        node.setDragType(Node.DragType.FIXED_TO_PLANE)
        node.setDragPlanePoint(Vector(0f, -1f, 0f))
        node.setDragPlaneNormal(Vector(0f, 1f, 0f))
//      node.setDragMaxDistance(5f);

First, how can I lock the z-axis and enable just the x and y axis?
What is really the DragPlanePoint? I saw that it locks y to -1, this is right?
So, for I lock the z axis in value of 0.5 always, I make something like:
        node.setDragType(Node.DragType.FIXED_TO_PLANE)
        node.setDragPlanePoint(Vector(0f, 0f, 0.5f))
        node.setDragPlaneNormal(Vector(0f, 0f, 1f)) // lock z

or:
        node.setDragType(Node.DragType.FIXED_TO_PLANE)
        node.setDragPlanePoint(Vector(0f, 0f, 0.5f))
        node.setDragPlaneNormal(Vector(1f, 1f, 0f)) // allow x, y

I really don't get these 2 functions use.
But, anyway, in my frist code, a lot of times this is happening when dragging the node:
/System.out: node: com.viro.core.Object3D@84378b4
I/System.out: parent node: com.viro.core.Node@ac25316
              node A
              	pos realtime[-0.0089530945, -0.055826187, 0.025]
D/ViewRootImpl@4edd5cc[MainActivity]: ViewPostIme pointer 0
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
I/System.out: 	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
I/System.out: -----
I/System.out: node
I/System.out: 	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
I/System.out: 	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
I/System.out: 	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
I/System.out: 	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
I/System.out: 	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
I/System.out: -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
I/System.out: 	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
I/System.out: 	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
I/System.out: 	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----
I/System.out: node
              	source 1}
              	node com.viro.core.Object3D@84378b4
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]
              -----

This is a bug, the NaN? Or I forgot something?
Thanks!

Hey @rgipd, as mentioned in the docs:

Dragging is limited to a user defined plane (specified by a point on the plane and its normal vector). You can also limit the maximum distance the dragged object is allowed to travel away from the camera/controller. These properties are controlled by setDragPlanePoint(Vector), setDragPlaneNormal(Vector), and setDragMaxDistance(float).

As such, both the planePoint and planeNormal actually define how the plane is oriented:

Thus, if you want to drag the lock the object on a plane that is fixed to the Z axis, you would:
node.setDragType(Node.DragType.FIXED_TO_PLANE)
node.setDragPlanePoint(0,0, objectLocation.z);          // Sets the drag point in world coordinates
node.setDragPlaneNormal(0,1,0);                                 // Sets the normal perpendicular to that point, creating a plane.
node.setDragPlaneMaxDistance(5);                             // Sets the max distance you can drag an object along the plane.

You might wonder why the setDragPlaneDistance is necessary - this is because if you tilt your phone up (so that it is perpendicular to the floor), it is possible to drag an object along the floor into infinity. This would effectively push the object so far into the distance that it disappears :). To prevent this, we lock this draggable area with a maximum distance from the plane point.
I'm not exactly sure why you are getting 'Nan' for the drag location - i'll take a look at that shorty.

Hey @rgipd, I've just tested the above, and have verified the behavior of dragging an object on an the Y Axis (the floor). I've also verified testing dragging the object along the Z axis (say the wall) and that works as well - to do this, the code is the same as the above, but the normal is now facing towards you (0,0,1).
I've also verified that no 'Nans' are provided in the onDrag callback, even with your drag settings above. Do give the above sample code a try and let me know if you continue to experience any problems or issues. Much thanks!

@dthian I tried to lock the z axis with your code provided:
node.setDragType(Node.DragType.FIXED_TO_PLANE)

// Sets the drag point in world coordinates
Vector planeOrigin = node.convertLocalPositionToWorldSpace(node.getPositionRealtime());
node.setDragPlanePoint(planeOrigin);

// Sets the normal perpendicular to that point, creating a plane.
node.setDragPlaneNormal(0,1,0);

 // Sets the max distance you can drag an object along the plane.
node.setDragPlaneMaxDistance(5);

Before I drag the object:
              	pos realtime[-0.0022325516, -0.04988599, 0.025]

while dragging:
              	worldLocation [0.43098518, -0.09723115, 10.543012]
              	localLocation [0.43098518, -0.09723115, 10.568011]
...
              	worldLocation [0.44126257, -0.09723115, 10.542596]
              	localLocation [0.44126257, -0.09723115, 10.5675955]

When I put:
        node.setDragType(Node.DragType.FIXED_TO_PLANE)
        val planeOrigin = node.convertLocalPositionToWorldSpace(node.getPositionRealtime())
        node.setDragPlanePoint(planeOrigin)
        node.setDragPlaneNormal(Vector(0f, 0f, 1f))
        node.setDragMaxDistance(5f);

a lot of NaN appears again.
Don't know why...

The above answer is from before you answered me with this:
Hey @rgipd, I've just tes

ted the above, and have verified the behavior of dragging an object on an the Y Axis (the floor). I've also verified testing dragging the object along the Z axis (say the wall) and that works as well - to do this, the code is the same as the above, but the normal is now facing towards you (0,0,1).
I've also verified that no 'Nans' are provided in the onDrag callback, even with your drag settings above. Do give the above sample code a try and let me know if you continue to experience any problems or issues. Much thanks!

I thought that putting the 1 at Z-axis would lock it, because in the example of message above, I notice that 1 in y-axis locked y (but in some different location than original before drag).
I don't know if it's the SceneGraph. the drag is applied in a 4th-5th child node.
But when I apply to Z-axis, lot of NaNs is made.
The code is very big and I can't post it right now (lot of classes involved as well).

Hm, do you have a strong use case or reason for using val over a type safe approach with Vector3f? It is good coding practice to always use type safe variables, so that you know exactly what kind of object you are interacting with, and what you can / cannot call on that object.
Also, even with the above where you see "Nans", does the drag behavior appear to work normally?

That is strange, because i've tried creating a restrictive plane in the Z axis as well, and am able to drag the object along that "wall". In this case, the scale shouldn't matter (other than then setDragMaxDistance). Again you are simply just defining a plane where your object is dragged alon (with fixed to plane).
With the above, do you have a strong use case or reason for using val over a type safe approach with Vector3f? It is good coding practice to always use type safe variables, so that you know exactly what kind of object you are interacting with, and what you can / cannot call on that object, rather than relying on java to "infer" what the object might be.
Also, even with the above where you see "Nans", does the drag behavior appear to work normally?
Finally, can you try by actually defining your planeOrigin to be typeSafe? I'm not too familiar with Kotlin, but that appears to be of the syntax:
val planeOrigin: Vector

@dthian I can try put type-safe variables, but I don't know if this is the case, because the dex final class is the same of java generated, but I will try to make sure it's not some kind of bug because external library.
About the NaNs, I put the log in DragListener to see what was happening, the node just vanish, I can't drag it (I can, but when I move it, it just vanish)
PS: about kotlin, in compile time, it already make the val planeOrigin be Vector, so I will try, but I think it's not going to have changes.

New code with NaN:
        this.scene.rootNode.addChildNode(container.node);
        container.node.setPosition(Vector(0f,0f,0f));

        container.node.setDragListener { source, node, worldLocation, localLocation ->
          // ...
        }

        container.node.setDragType(Node.DragType.FIXED_TO_PLANE)
        val planeOrigin : Vector = container.node.convertLocalPositionToWorldSpace(container.node.getPositionRealtime())

        println("plane origin: ${planeOrigin}");

        container.node.setDragPlanePoint(planeOrigin);
        container.node.setDragPlaneNormal(Vector(0f, 0f, 1f))
        container.node.setDragMaxDistance(5f);

Output:
              node
I/System.out: 	pos realtime[0.0, 0.0, 0.0]
I/System.out: plane origin: [0.0, 0.0, 0.0]

D/ViewRootImpl@4edd5cc[MainActivity]: ViewPostIme pointer 0
I/System.out: node
              	source 1}
I/System.out: 	node com.viro.core.Object3D@61189ca
              	worldLocation [NaN, NaN, NaN]
              	localLocation [NaN, NaN, NaN]

This node is a Object3d loaded from FBX, should I need to convert again with new converter (if any?)
Thanks

PS: Some full code of box (1x1x1) that does not work.
Maybe the 1.7.0 aar is uploaded with problems?
   override fun onSuccess() {

        // Load materials.
        val materials = ViroMaterialUtils.defaultMaterials;
        materials.load(requireContext());

        // Setup the viro view.
        viroView.setHDREnabled(true)
        viroView.setPBREnabled(true)
        viroView.setBloomEnabled(false)

        // Create the scene.
        val scene = Scene();
        this.scene = scene;

        // Set the scene environment (HDR).
        val environment = Texture.loadRadianceHDRTexture(Uri.parse("file:///android_asset/SoftboxStudio2.hdr"))
        scene.lightingEnvironment = environment

        // Set the scene background.
        val backgroundBitmap = bitmapFromAsset("textures/background.png");
        val backgroundTexture = Texture(backgroundBitmap, Texture.Format.RGBA8, true, false)
        scene.setBackgroundTexture(backgroundTexture)

        // Setup the camera.
        val camera = Camera();
        camera.fieldOfView = 1f;
        camera.fieldOfView = 0.5f;
        camera.fieldOfView = 0.5f;
        camera.fieldOfView = 10f;
        camera.fieldOfView = 10f;

        // Setup the camera node.
        val cameraNode = Node();
        cameraNode.setPosition(Vector(0f, 0f, 20f));
        cameraNode.setRotation(Vector(0f, 0f, 0f));
        cameraNode.camera = camera;
        this.cameraNode = cameraNode;

        // Add the camera node and set camera as point of view.
        scene.rootNode.addChildNode(cameraNode);
        viroView.setPointOfView(cameraNode);

        val box1 = Box(1f, 1f, 1f);
        val boxNode1 = Node();
        boxNode1.geometry = box1;
        boxNode1.setPosition(Vector(0f, 0f, 0f));

        scene.rootNode.addChildNode(boxNode1);

        boxNode1.setDragListener { i, node, vector, vector1 ->
            println("Vector: ${vector}");
            println("Vector 1: ${vector1}");
        }

        boxNode1.setDragType(Node.DragType.FIXED_TO_PLANE)

// Sets the drag point in world coordinates
        val planeOrigin : Vector = boxNode1.convertLocalPositionToWorldSpace(boxNode1.getPositionRealtime());
        boxNode1.setDragPlanePoint(planeOrigin);

// Sets the normal perpendicular to that point, creating a plane.  In this case, it's "Up": Y = 1
        boxNode1.setDragPlaneNormal(Vector(0f,0f,1f));

        // Sets the max distance you can drag an object along the plane.
        boxNode1.setDragMaxDistance(5f);

        viroView.setScene(scene);
}

The output:

D/ViewRootImpl@4edd5cc[MainActivity]: ViewPostIme pointer 0
I/System.out: Vector: [NaN, NaN, NaN]
I/System.out: Vector 1: [NaN, NaN, NaN]
I/System.out: Vector: [NaN, NaN, NaN]
              Vector 1: [NaN, NaN, NaN]
I/System.out: Vector: [NaN, NaN, NaN]
              Vector 1: [NaN, NaN, NaN]
I/System.out: Vector: [NaN, NaN, NaN]
I/System.out: Vector 1: [NaN, NaN, NaN]
I/System.out: Vector: [NaN, NaN, NaN]
              Vector 1: [NaN, NaN, NaN]
...

Thanks

Thanks @rgipd, when you mentioned "Some full code of box (1x1x1) that does not work." - can you explain what you mean by does not work?

What do you see happen on your end on the screen? What do you expect to see instead?
Does the object not drag across to a fixed Z plane as expected?

Thanks @rgipd, when you mentioned "Some full code of box (1x1x1) that does not work." - can you explain what you mean by does not work?

The code of my scene is in last message. The boxNode1 is the node I want to drag.

What do you see happen on your end on the screen when you drag the cube? What do you expect to see instead?

I'm adding a 1x1x1 cube in the origin 0,0,0 of scene's root node. This box has a drag on plane with z-axis locked. I want to drag the cube around x and y axis without change the original z-axis (that's 0). The box just vanish and when I print the world and local coordinates (provided by drag listener method, it prints NaN).

Does the cube drag across to a fixed Z plane as expected?

No, it vanishes and print NaN in world and local coordinates.
Thank you.

Hey @rgipd, I've managed to root cause the issue that you are experiencing above. It occurs when you've set the dragging point at a position beyond the set Max drag distance. Try setting:

The setDragMaxDistance manually at any value >= 20
The setDragPlanePoint at (0,0,0)

And see if that fixed your issue. Thanks!

@dthian. Yes. It works!
But, if I put the dragPlanePoint as (0, 0, 0) for the cube (1x1x1) with Z-axis locked (0, 0, 1), the output is (x-dynamic, y-dynamic, -0.5f).
Then, I put the dragPlanePoint as (0, 0, 0.5f) and the output changed to (x-dyn, y-dyn, 0.0f).
The drag action considers the center of cube (1.0f / 2) and add the dragPlanePoint (z value in this case) or this is just a coincidence?
P.S.: By the way, there are way to I limit the drag around a bounding box?
Thanks.

Just a quick note:

It occurs when you've set the dragging point at a position beyond the set Max drag distance.

I think it's another error, because clearly in the code below, does not work (NaN)
        node.setDragPlanePoint(Vector(0f, 0f, 0.025f))
        node.setDragPlaneNormal(Vector(0f, 0f, 1f))
        node.setDragMaxDistance(1f);

But with the code below works (without NaN):
        node.setDragPlanePoint(Vector(0f, 0f, 0.025f))
        node.setDragPlaneNormal(Vector(0f, 0f, 1f))
        node.setDragMaxDistance(50f);

Or the dragMaxDistance is from the raycasting from camera position?

@dthian Sorry, I found some cases that the z-axis fixed just does not work.
I made a orbital camera around with Touch in ViroViewScene, when I position the camera  in a way that Z axis can be "seen", the z-axis lock does not work and the node/object2d is allowed to move around z-axis.

The drag action considers the center of cube (1.0f / 2) and add the dragPlanePoint (z value in this case) or this is just a coincidence?

The drag is always done in reference to the node's position of a 3d object. For a cube, this happens to be it's center.

P.S.: By the way, there are way to I limit the drag around a bounding box?

I don't think so, currently Fixed_To_Plane does what its name implies - it limits the drag and 'locks it' to a plane; it does not limit the drag into a bounding box.

I think it's another error, because clearly in the code below, does not work (NaN)

No, this is by design. As you have mentioned "the dragMaxDistance is from the ray casting from camera position" - this is correct. The max distance is effectively the distance from the controller (in this case the camera), so that the user's drag radius is limited from the reference of the controller.

orbital camera around with Touch in ViroViewScene, when I position the camera in a way that Z axis can be "seen", the z-axis lock does not work and the node/object2d is allowed to move around z-axis.

Hm, can you share the code you've used to verify and make this claim? I've just tested an Orbit camera and have verified that dragging an object that is fixed to a Z plane does not move in a z plane.

Closing due to inactivity, and that the main feature request for this issue has been fixed. Please feel free to re-open a new issue should you have any additional questions / concerns.


Debugging features and tips for SFPI code implementation

As far as I know, there is an emulator and logging feature for SFPI.
However, it seems both features are not opened yet.
Are there any good tips for debugging SFPI code? Or is there a way to use the features I mentioned?

Emulation section in https://tenstorrent-metal.github.io/tt-metal/latest/ttnn/dependencies/llk.html
But, there's no main.cc file in tt-metal repo.

FWLOG macro in LLK but it seems there's no implementation.

// ckernel_sfpu.h
template <bool APPROXIMATION_MODE, int ITERATIONS>
inline void _calculate_dropout_(const int iterations, uint prob, uint scale)
{
    // SFPU microcode

    FWLOG1("calculate_dropout() -- prob:%x", prob);
    FWLOG1("calculate_dropout() -- scale:%x", scale);

// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc.
//
// SPDX-License-Identifier: Apache-2.0

#define FWASSERT(s, p)
#define FWLOG0(...) (void)sizeof(__VA_ARGS__)
#define FWLOG1(...) (void)sizeof(__VA_ARGS__)
#define FWLOG2(...) (void)sizeof(__VA_ARGS__)

Target : WH_B0

https://github.com/tenstorrent-metal/tt-metal/blob/main/tt_metal/hw/inc/tt_log.h
I also found this file which contains defining a macro (TT_LLK_DUMP) that looks like printing something in LLK-level.
Need more info about it.


feat: timeouts and manual redirections

update dependencies
fix error: maximum limit of redirects
add timeout and delay

https://github.com/grammyjs/website/pull/961#issuecomment-1851625755

@quadratz I have made the changes and will be merging this now. Thanks again for the contribution!


Scan job exits with exception Internal Server Error: /api/jobs/

🐛 Bug Report

[ x] 📁 I've Included a ZIP file containing my librephotos log files

Archive.zip

[ x] ❌ I have looked for similar issues (including closed ones)
[ na] 🎬 (If applicable) I've provided pictures or links to videos that clearly demonstrate the issue

📝 Description of issue:
Scan job exits with exception, has happened twice in a row. (after scanning about 50k photos).
exception, first:
EOS 60D/2014-05-03_225418_Canon EOS 60D_IMG_0284.jpg, elapsed: 18.202155
2023-03-12 19:41:35 INFO:ownphotos:job 5a1cdbce-65ba-44bf-9928-80e2de83a397: handling image /data/Family/Pics/2014/05-May/Canon EOS 60D/2014-05-03_225426_Canon EOS 60D_IMG_0285.jpg
2023-03-12 19:42:09 Internal Server Error: /api/jobs/
2023-03-12 19:42:09 Traceback (most recent call last):
2023-03-12 19:42:09   File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 84, in _execute
2023-03-12 19:42:09     return self.cursor.execute(sql, params)
2023-03-12 19:42:09 psycopg2.OperationalError: server closed the connection unexpectedly
2023-03-12 19:42:09     This probably means the server terminated abnormally
2023-03-12 19:42:09     before or while processing the request.
2023-03-12 19:42:09
2023-03-1

exception, second time:
2023-03-13 08:38:36 INFO:ownphotos:job c9a6af64-d59f-49d0-a38f-9667251a4651: extract video length: /data/Family/Pics/2013/07-July/Canon EOS 60D/2013-07-06_063056_Canon EOS 60D_IMG_4666.jpg, elapsed: 49.146051
2023-03-13 08:38:53 Internal Server Error: /api/rqavailable/
2023-03-13 08:38:53 Traceback (most recent call last):
2023-03-13 08:38:53   File "/usr/local/lib/python3.10/dist-packages/django/db/backends/utils.py", line 84, in _execute
2023-03-13 08:38:53     return self.cursor.execute(sql, params)
2023-03-13 08:38:53 psycopg2.OperationalError: server closed the connection unexpectedly
2023-03-13 08:38:53     This probably means the server terminated abnormally
2023-03-13 08:38:53     before or while processing the request.
2023-03-13 08:38:53
2023-03-13 08:38:53

🔁 How can we reproduce it:
Not sure, seems specific to my instance?
Please provide additional information:

💻 Operating system: macos ventura
⚙ Architecture (x86 or ARM): M1
🔢 Librephotos version: latest from 17 days back docker pull reallibrephotos/librephotos:latest
📸 Librephotos installation method (Docker, Kubernetes, .deb, etc.): Docker

🐋 If Docker or Kubernets, provide docker-compose image tag: 84f9c8087440

📁 How is you picture library mounted (Local file system (Type), NFS, SMB, etc.): USB
☁ If you are virtualizing librephotos, Virtualization platform (Proxmox, Xen, HyperV, etc.):  NA

Updated to pytorch 2.0.1. Should fix the error in dev and will be available in the next latest release.


What is daemon_pi.py going to do?

The main purpose of this program is using a daemon thread running in background and improving the precision of the estimation of the value of pi by using Monte Carlo simulation. The program should satisfy the following requirements:

The user is asked for the value of the radius of a circle and calculates the area of the circle by using pi and radius values.
The program ends if user gives "q" as the radius.
More our user waits, our estimation for the value of pi becomes more precise.
If program ends, the thread created with DaemonPi should not block the program, therefore it should be daemon thread.

Good luck.
https://github.com/canbula/ParallelProgramming.2022.2023.Fall/blob/8a7ae01e4597aaa44ac58a03d4fa1fca2f82d058/Week08/midterm/daemon_pi.py

import threading
import random
class DaemonPi(threading.Thread):
def init(self):
super().init(daemon = True)
self._inner = 0
self._total = 0
self._lock = threading.Lock()
def run(self):
    while True:
        x = random.uniform(-1, 1)
        y = random.uniform(-1, 1)
        with self._lock:
            self._total += 1
            if x ** 2 + y ** 2 <= 1:
                self._inner += 1

def pi(self):
    return 4 * self._inner / self._total

def main():
pi_thread = DaemonPi()
pi_thread.start()
while True:
radius = input("Enter radius: ")
if radius == "q":
break
print(f"Pi is estimated as {pi_thread.pi()}")
print(f"Area of circle with radius {radius} is "
f"{pi_thread.pi() * float(radius) ** 2}")
if name == 'main':
main()

I am very happy with the result, thank you for the contributions.


change iTunes to Apple Podcasts

Change all "iTunes" references to "Apple Podcasts"
Signed-off-by: Darin Pope<EMAIL_ADDRESS>

This looks good! I'll merge this and cut a release. Thank you for the contribution!


[DS-1518] Support of StartTLS in LDAPAuthentication.

https://jira.duraspace.org/browse/DS-1518
Added support for StartTLS. To test this pull request try:

Change the provider_url to use port 389 and remove the s from ldaps eg.: provider_url=ldap://ldap.myu.edu:389
Uncomment the last line of dspace/config/modules/authentication-ldap.cfg (#starttls=true) to enable startttls
Try to login

The TLS part works (I tested this commit cherry-picked to master).
Note from testing (not yet sure if related to this PR):
With autoregistration on, when a person registers for the first time, the following error page is shown upon eperson creation. Subsequent logins are without a problem.
java.lang.NullPointerException
	at org.dspace.authenticate.LDAPAuthentication.authenticate(LDAPAuthentication.java:348)
	at org.dspace.authenticate.AuthenticationServiceImpl.authenticateInternal(AuthenticationServiceImpl.java:115)
	at org.dspace.authenticate.AuthenticationServiceImpl.authenticate(AuthenticationServiceImpl.java:85)
	at org.dspace.app.xmlui.utils.AuthenticationUtil.authenticate(AuthenticationUtil.java:121)
	at org.dspace.app.xmlui.aspect.eperson.LDAPAuthenticateAction.act(LDAPAuthenticateAction.java:71)
	at org.apache.cocoon.sitemap.impl.DefaultExecutor.invokeAction(DefaultExecutor.java:55)

https://github.com/christian-scheible/DSpace/blob/DS-1518/dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java#L348

The above NPE isn't specific to this PR, I also get it on master. I created https://jira.duraspace.org/browse/DS-3046
+1 to this PR. I tested both with and without TLS. Just needs the simple config change:
starttls=true -> authentication-ldap.starttls=true

+1 (via code review). This will require updates to the LDAP Authentication documentation once merged, to explain the new config and how it works, etc.

I did the configuration change and merged to master: 7cf90d3db2a8060bd79833cdca3d80bf9562f88a


Bug fixes

This should fix:
https://github.com/googlei18n/fontmake/issues/15
https://github.com/googlei18n/fontmake/issues/14
@adrientetar @brawer whoever would like to take a look, please do.

@schriftgestalt where is a complete list of all known customParameter keys?

There is a file Glyphs.app/Contents/Frameworks/GlyphsCore.framework/Versions/A/Resources/customParameterTypes.plist
and a file that has all allowed keys for font, master and instance (customFontParameters ...).

So unlike FontData.xml you are okay for that list of keys to be libre?

Lgtm

So unlike FontData.xml you are okay for that list of keys to be libra?

Yes. That is mostly from The openType and UFO spec. You can probably ignore the ones that start with an uppercase letter as those influence the behavior of Glyphs and are not exported directly.
there are some keys included in the patch that are from the 'types' file (macintoshFONDFamilyID...) but are not in any of the other three files. That means that the value will not be used by Glyphs and unlikely to be found in a .glyphs file (only if imported from FLS and left there).

Parse and use time offsets

The time for lastChange is always written in GMT (no time zone offset) to avoid diffs/changes by saving in different parts of the world. So the old implementation would be sufficient. Only files from Glyphs 1 might have time zone offsets.

On 16 February 2016 at 18:03, Georg<EMAIL_ADDRESS>wrote:

The time for lastChange is always written in GMT (no time zone offset) to
avoid diffs/changes by saving in different parts of the world. So the old
implementation would be sufficient. Only files from Glyphs 1 might have
time zone offsets.

That sounds good (to drop it for worldwide collaboration)

The time for lastChange is always written in GMT (no time zone offset) to
avoid diffs/changes by saving in different parts of the world. So the old
implementation would be sufficient. Only files from Glyphs 1 might have
time zone offsets.

That sounds good (to drop it for worldwide collaboration)

Well, this new implementation still works fine for timestamps with no offset, and I don't think it hurts to have it for old files. I'd rather just keep it. If a Glyphs file is updated, the offset will be removed anyways.

I'd rather just keep it

Sure! :8ball:

lgtm!


Add NuGetSdkResolver to minimal msbuild

Fixes https://github.com/OmniSharp/omnisharp-roslyn/issues/1678
Tested with dotnet/format repo which relies on the 'Microsoft.DotNet.Arcade.Sdk'

do these nuget packages need a special feed?
Unable to find version '5.4.0-rtm.6292' of package 'NuGet.Common'.

Can't we just use 5.4.0 which is already on NuGet? https://www.nuget.org/packages/NuGet.Common/5.4.0

Can't we just use 5.4.0 which is already on NuGet?

Unfortunately NuGetSdkResolver isn't on NuGet.org.


add new endpoint to read SKUs and remove hard-coded SKU values

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information

[x] The title of the PR is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[x] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[x] If applicable, the PR references the bug/issue that it fixes.
[x] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[x] I have read the contribution guidelines.
[x] My spec meets the review criteria:

[x] The spec conforms to the Swagger 2.0 specification.
[x] The spec follows the guidelines described in the Swagger checklist document.
[x] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

@yuchouMS,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.
It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

Hi There,
I am the AutoRest Linter Azure bot. I am here to help. My task to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:
File: arm-analysisservices/2016-05-16/swagger/analysisservices.json
Before the PR: Warning(s): 1  Error(s): 9
After the PR: Warning(s): 1  Error(s): 11
Thanks for your co-operation.

Hi There,
I am the AutoRest Linter Azure bot. I am here to help. My task to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:
File: arm-analysisservices/2016-05-16/swagger/analysisservices.json
Before the PR: Warning(s): 1  Error(s): 9
After the PR: Warning(s): 1  Error(s): 11
Thanks for your co-operation.

@yuchouMS, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.
Thanks, Microsoft Pull Request Bot

Hi There,
I am the AutoRest Linter Azure bot. I am here to help. My task to analyze the situation from the AutoRest linter perspective. Please review the below analysis result:
File: arm-analysisservices/2016-05-16/swagger/analysisservices.json
Before the PR: Warning(s): 1  Error(s): 9
After the PR: Warning(s): 0  Error(s): 9
Thanks for your co-operation.

No modification for AutorestCI/azure-sdk-for-node

No modification for AutorestCI/azure-sdk-for-python

 https://github.com/Azure/azure-sdk-for-ruby/pull/811


Clean-up remediation-service to not control the remediation sequence

Current status: In its current implementation, the remediation-service controls the execution of the remediation sequence by sending out the action.triggered event and waiting for action.finished and evaluation.finished. Besides, waiting for 10 minutes is hard-coded into the services.
Clean-up remediation-service: The remediation-service does not control the sequence, but:

it subscribes to a get-action.triggered event,
it analysis the event payload and determines the next action to execute by looking into the remediation.yaml.
If the remediation.yaml defines multiple actions for one problem and the one was already be executed, the remediation-service must be smart enough to take the next one in the list of actions.

Clean-up of spec:

By implementing this approach, the reserved Keptn Task remediation is not needed anymore: https://github.com/keptn/spec/blob/master/shipyard.md#remediation

As a result of this clean-up task, the shipyard-controller takes over the responsibility for sending action.triggered, and evaluation.triggered - since this is modeled in the shipyard.
Design decisions:

The sh.keptn.event.problem.open event does not work as trigger for the remediation sequence --> it will be the sh.keptn.event.remediation.triggered that kicks off the sequence.
Can the issue https://github.com/keptn/spec/issues/59 be resolved then?

Definition of Done:

[ ] The remediation sequence execution is explicitly modelled by the shipyard, e.g.:

- name: "production"
  sequences:
  - name: remediation
      tasks:
      - name: get-action
      - name: action
      - name: evaluation

This issue resolves: https://github.com/keptn/keptn/issues/3498


Add support for idle instances

Add support for min-idle-instances in application configuration. Idle instances will be kept available and used when up-scale is happening.max-idle-instances is not used yet: at this time only min-idle-instances will be kept running in the system.

As far as I can tell, there isn't anything here to prevent idle instances from being routed.

@cdonati let me know if this way to avoid routing is what you had in mind.

Closing this PR for now: it will be reopened when reworked.


Test Pipelines locally

Pipelines cannot be tested locally (https://docs.microsoft.com/en-us/azure/machine-learning/how-to-debug-pipelines#debug-scripts-locally) and the suggested steps to debug the pipeline locally are a bit convoluted (e.g., run each script independently and create interim data folders ourselves). Is there any plans to allow to run pipelines on our local computers? I believe that would make the dev experience smoother and less time-consuming.

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

ID: 6371624d-a33a-70ba-dfdc-bff5a5ba372e
Version Independent ID: e45d1046-3a0a-11f2-d30b-27e2e6e2c939
Content: Troubleshooting ML pipelines - Azure Machine Learning
Content Source: articles/machine-learning/how-to-debug-pipelines.md
Service: machine-learning
Sub-service: core
GitHub Login: @lobrien
Microsoft Alias: laobri

Thanks for the feedback! We are currently investigating and will update you shortly.

@JackCaster Thanks for the product feedback, I have shared this with the product team to check any plan for it. Will let you know.

Hi @JackCaster, thanks for your report! Since @YutongTie-MSFT has already taken this on, I'll let them close this issue out.
In the future, you can also provide product feedback in our dedicated feedback forum: https://feedback.azure.com/forums/257792-machine-learning
Have a great day!

We will now proceed to close this thread. If there are further questions regarding this matter, please respond here and @YutongTie-MSFT and we will gladly continue the discussion.


[Event Parameter Request] #16672: Add Parameter CurrFieldNo

Could you please add the CurrFieldNo parameter to the Event requested in #16672? Thank you.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 41534.


CLN: remove workaround for streaming delays.

Now that load jobs are used, no sleep is required when replacing a table.
Tests with credentials running at https://travis-ci.org/tswast/pandas-gbq/builds/375003060

Nice.
Slight tangent, but we could think about only doing one chunk, which would mean we could fall back to the replace / amend / overwrite native implementations rather than writing our own

Yeah, someone reported that at https://github.com/pydata/pandas-gbq/issues/107 I agree we should do it. We could even do it if we keep chunking by having subsequent load jobs be "append" mode, but it could also be a good opportunity to deprecate chunks since it's actually not all that helpful when using load jobs (which are a limited resource of 1,000 / day).


Feature: Offer a possibility to grant max hp at first level

Shadowdark normally rolls the hit points, so this is definitely not a core feature.
But granting max hp at first level is a common houserule/hack in nearly all editions of D&D-based systems. So it would be really nice to have :)

This is a level of automation too far I'm afraid.


Anyone able to Get-Org Report?

Have checked my API helper settings a million times but no matter what I get a 403 error code
My tenant is in the EU region, have tried using idpxnyl3m.pingidentity.eu instead but then I end up with a 400 error.
Anyone have any idea? Need to some get a automated report of users in PingID
VERBOSE: Calling PingID API:
VERBOSE: POST https://idpxnyl3m.pingidentity.com/pingid/rest/4/getorgreport/do with -1-byte payload
VERBOSE: FAILED - ERROR CODE:
VERBOSE: 403

Did you call CreateJob and GetJobStatus?

If it still doesn't work I suggest emailing<EMAIL_ADDRESS>

So everything else seems to work. CreateJob, GetJobStatus, and GetUserDetails all work just fine.
After running CreateJob and GetJobStatus the error message is a little different but
PS C:\scripts\pingid-powershell-scripts-master\scripts> .\Get-Organization-Report.ps1 -FileType CSV -Verbose
VERBOSE: API Token:
VERBOSE: eyJhbGciOiJIUzI1NiIsInRva2VuIjoiNGQ1YzljN2Q3ZTM1NGMwYjgxOGViYmIyMjhiNmFmOGIiLCJvcmdBbGlhcyI6ImFjMjk3YWVlLTljNGYtNGIyYS1iNzA2LWJhYTkwMmQ3NmYxNCJ9.eyJyZXFIZWFkZXIiOnsic2VjcmV0S2V5IjoiNGQ1YzljN2Q3ZTM1NGMwYjgxOGViYmIyMjhiNmFmOGIiLCJ0aW1lc3RhbXAiOiIyMDE5LTA3LTE3IDEzOjE4OjI3WiIsInZlcnNpb24iOiI0LjkiLCJsb2NhbGU
iOiJlbiIsIm9yZ0FsaWFzIjoiYWMyOTdhZWUtOWM0Zi00YjJhLWI3MDYtYmFhOTAyZDc2ZjE0In0sInJlcUJvZHkiOnsiZmlsZVR5cGUiOiJDU1YifX0.cooQjiuyG8C4atV72k-INT2ZGkgn68W3MJOvFFAVK6U
VERBOSE: Calling PingID API:
VERBOSE: POST https://idpxnyl3m.pingidentity.eu/pingid/rest/4/getorgreport/do with -1-byte payload
VERBOSE: received 7008-byte response of content type application/octet-stream
VERBOSE: FAILED - ERROR CODE:
Write-Verbose : Cannot bind argument to parameter 'Message' because it is null.
At C:\scripts\pingid-powershell-scripts-master\scripts\pingid-api-helper.ps1:160 char:17
+         Write-Verbose $_.Exception.Response.StatusCode.Value__
+                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Write-Verbose], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.WriteVerboseCommand

VERBOSE: FAILED
VERBOSE: Failed: Error code

Success! Forgot to change the output path in the last run, the report downloaded successfully now.
Is this because I ran CreateJob earlier? Does this have to be run before Get-Org report?
I'm trying to automate this and have it run every couple of hours, and then pipe out the results to a different script that can add these users to a specific group in AD. So I am just trying to figure out the flow here.
Thanks!

Just to update if anyone else is having similar issues...

Run Create-Job
Wait a few seconds for job to complete I put in a 15 second pause
Run Get-Organization-Report

Thanks for the help

There's no need to wait.
You should call GetJobStatus to know when the job is done.


NLP - Predefined Sentiment Analysis

Please include answers to these questions as part of your pull request
In the GitHub webUI, use the Write tab to modify the Markdown text that is part of the pull request. For each question simply place an X inside the square brackets, [X], that represents your answer. Make sure there are no blanks inside the brackets, otherwise MarkDown doesn't render properly. Using the Preview tab while editing this form, you can see the formatted/rendered version of the message.

Q1: Confirm that you have the right to submit the code that is being contributed. Please consider the origin of your code and confirm you have the appropriate rights to make the submission subject to the Apache 2.0 license that applies to everything in this repository of custom steps. If so, follow the instructions for the Contributor Agreement (which is based on the industry-standard Developer Certificate of Origin (DCO)).

[X] Yes, I have the right to submit the contributed code on behalf of myself, my company, or any other owner of the code. I have also attached my signed copy of the DCO to this message.
[ ] No

Q2: Confirm that your contribution does not include any personally identifiable information (PII), for example, in any examples used in your README file.

[X] My contribution does NOT include PII data
[ ] My contribution includes PII data

Q3: Confirm your contribution does not include any encryption or other export-controlled technology.

[X] My contribution does NOT contain encryption or other export-controlled technology
[ ] My contribution includes encryption or other export-controlled technology

To summarize my feedback:

Provide list of languages in alphabetically sorted order
Provide sample data in the README.md to make it easy for a user to get started with the step
When issuing an abort statement in a data step make sure you have a put statement that starts with ERROR:  just before that abort statement. This will result in your error message to be shown on the step when the user hoovers the mouse over the step that has the "in error" icon overlay.

or alternatively use the %abort macro statement.


Build out services controller API endpoints

Need API to show all servers.  This would be for an admin to see everything.

Would be nice to use /services/tag as a way to retrieve resources.

Currently working on this in the enhancement/ux-477-add-servers-to-sidebar branch.

[x] add /services routes to API
[ ] add /services/tag route

Right now /services and /services/:tag are returning services as order items with order item attributes.
Problematically, we don't have things like Product Type or other attributes regarding the Project/Order the OrderItem lives on.
I know that we are currently leveraging serializers in Jellyfish, so I'm looking at setting one up for services.

Couldn't figure out how to attach project/product attributes to OrderItems using scope since Service is handled from its own model. I took the approach of overriding the default select clause that comes with ActiveRecord so that I could select multiple attributes across table joins.

I have built out the ServicesController the following endpoints:

\services: returns a list of order_items and details about their associated project and product
\services\count: returns a summary view of order_items per project and an overall summary of distinct order items across all projects.
\services:tag: returns a list of order_items tagged with :tag and details about their associated project and product

Haved moved aforementioned changes into this branch.


Fix issues related Hive Sink

Observed few issues while testing HiveSink. This issue to track those fixes.

Closed via https://github.com/hortonworks/streamline/pull/811


Check the available credit for the BondTransferRoot watcher in the DB getter, similar to the BondWithdrawal watcher

The BondWithdrawal watcher has an availableCredit check that looks at the local state in the DB getter in order to avoid on-chain calls every poll. The BondTransferRoot watcher can use this logic as well in order to avoid the repeated on-chain calls.

@shanefontaine is this still an issue?

@miguelmota Yes it is. The BondTransferRoot watcher should have some logic similar to this in order to optimally send transactions at the appropriate time.
The name/description of this issue was incorrectly worded, so I just updated it.

Thanks, I'll handle these changes

Closed by https://github.com/hop-protocol/hop/pull/328


Docker: Hide message 'Error: No such container:'

When stopping containers using dev_start.sh stop, the following message appears: 'Error: No such container:'
$ docker/scripts/dev_start.sh stop
[INFO] Now stop container apollo_dev_user ...
[INFO] Done.
[INFO] Now stop container apollo_smoke_volume_user ...
Error: No such container: apollo_smoke_volume_user
[INFO] Done.
[INFO] Now stop container apollo_faster_rcnn_volume_user ...
Error: No such container: apollo_faster_rcnn_volume_user
...

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

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

Hi @gsa88 , thanks for your PR. Please sign our CLA so that this PR can be merged. Thank you.

Hi @storypku, I’ve signed the CLA

Hi @storypku, I’ve signed the CLA

Sorry, the CLA link should be https://cla-assistant.io/ApolloAuto/apollo?pullRequest=13386 .
Please recheck it. :-)

Hi @storypku, I’ve signed the CLA

Sorry, the CLA link should be https://cla-assistant.io/ApolloAuto/apollo?pullRequest=13386 .
Please recheck it. :-)

done!

Hi @storypku, I’ve signed the CLA

Sorry, the CLA link should be https://cla-assistant.io/ApolloAuto/apollo?pullRequest=13386 .
Please recheck it. :-)

done!

@gsa88 Sorry but It seems that there is something wrong with the CLA stuff. Have you seen that the CLA stage passed ?

Hi @storypku, I’ve signed the CLA

Sorry, the CLA link should be https://cla-assistant.io/ApolloAuto/apollo?pullRequest=13386 .
Please recheck it. :-)

done!

@gsa88 Sorry but It seems that there is something wrong with the CLA stuff. Have you seen that the CLA stage passed ?

I see that the CLA stage not passed. But I've agreed to the CLA for ApolloAuto/apollo:

@gsa88 I see that the commit was made by @vkaser , so you should sign the CLA as user @vkaser . Thanks.

@gsa88 I see that the commit was made by @vkaser , so you should sign the CLA as user @vkaser . Thanks.

Thanks, it works.


feat: add struct literal

Add a Struct literal type. The short term use is to use it when integrating with delta-rs. Assumption would be it might also come in handy as we develop the write path and need to express partition values.
Looked through the code if we needed to so some additional handling w.r.t. fileConstantValues, but that seems to be all in "raw" form as we find in the actions?

Turns out, we luckily never allowed Struct type in delta-rs as partition value. However we are using it as a convenient container when handling partition values.
For some reason I enjoy working with the struct type :), and I "think" it may come in useful later... Is that a good enough reason to add it?
That said - we can easily implement the container functionality in delta-rs. the one thing we do need from this PR is the is_null method.


Re-Reinstalling Tailwind

Inverted Morbius Strip

Git Bash View.pdf
This is the view I get when I execute NPM start on this branch.

Chrome Browser Views.pdf
This is view from the Chrome browser and the second screen dump shows the console error due to changing it from a  item to a  item on the menu.

What's the current status on this? Is there something that I need to do to get this back in motion?

@meltonlogan615  -- Shall we use this pull request as your completion of the installation of Tailwind (rather than https://github.com/nashvillefcc/nashvillefcc2020website/pull/19 )?

If John was able to get it to run and resolve the the errors, then absolutely.