profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/rpalcolea/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Roberto Perez Alcolea rpalcolea @Netflix @nebula-plugins Los Gatos, CA http://blog.perezalcolea.info

desirable-objects/grails-sendgrid 10

Sendgrid plugin for Grails

rpalcolea/codemash-2018-presentation 2

Presentation for my talk "Real Time Traffic Visualization in a Microservices World" @ CodeMash 2018

rpalcolea/dependency-management-at-scale-jconf-centroamerica-2020 1

Dependency Management at Scale - JConf Centro America 2020

rpalcolea/airbrake-grails 0

Airbrake Client for Grails

rpalcolea/artifactory-badge 0

Badge generator for Artifactory

rpalcolea/artifactory-client-java 0

Artifactory REST Client Java API bindings

rpalcolea/blog 0

rpalcolea's blog

push eventNetflix-Skunkworks/policyuniverse

scriptsrc

commit sha a47239e61bfbe359c09afe28807bf3d6a2c25cbf

Updating PolicyUniverse SDFs

view details

push time in 20 hours

issue openedNetflix/dgs-framework

bug: Generated client interfaces does not extend other interfaces

I have a schema like this:

interface Error {
   message: String
}

interface SpecializedError implements Error {
   messsage: String
   specializedError: String
}

type ValidationError implements SpecializedError, Error {
   message: String
   specializedError: String
}

type TestPayload {
   errors: [Error!]
   result: ResultType
}

type ResultType {
   success: Boolean!
}

Expected behavior

I want the generated interface SpecializedError to extend Error so that my TestPayload error field can contain both ValidationError and other error types that implement Error directly.

Actual behavior

Interfaces do not extend other interfaces. However, concrete classes implement multiple interfaces.

Steps to reproduce

Generate code from the schema above and view its output. This is using the Java codegen.

Let me know if I can assist with more information.

created time in a day

issue openedNetflix/dgs-framework

Generating client queries/mutations from nested types only creates top level type

Discussed in https://github.com/Netflix/dgs-framework/discussions/370

<div type='discussions-op-text'>

<sup>Originally posted by anderssandven May 28, 2021</sup> I have a schema like this:

type Mutation {
	one: One
}

type One {
	two(three: Three!): Two
}

type Two {
	test: String
}

input Three {
	test3: String
}

When doing code generation I expect to get multiple queries generated. The queries generated are: OneGraphQLQuery.java
OneProjectionRoot.java
OneTwoProjection.java

I expect to get a OneTwoGraphlQuery aswell because I cannot supply any arguments through OneGraphqlQuery.

Am I misunderstanding how this works?</div>

created time in a day

issue commentNetflix/dgs-framework

Getting KotlinReflectionInternalError: Unresolved class: error while serializing UUID in GraphQLQueryRequest object

When using the client API, I think it should get the same result in the GraphiQL UI. The serialization and deserialization are dependent on Jackson.

You can try to return a String type of the execution result, and use json path to read the result. The String type result should be a JSON String.

marepab

comment created time in a day

issue openedNetflix/dgs-framework

feature: Simplified Directive declaration

Followed the steps of the discussion posts, I tried to add a simple uppercase directive in mysample project, but it does not work as expected.

The uppercase directive wring class.

public class UppercaseDirectiveWiring implements SchemaDirectiveWiring {
    @Override
    public GraphQLFieldDefinition onField(SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> env) {

        var field = env.getElement();
        var parentType = env.getFieldsContainer();

        var originalDataFetcher = env.getCodeRegistry().getDataFetcher(parentType, field);
        var dataFetcher = DataFetcherFactories.wrapDataFetcher(originalDataFetcher,
                (dataFetchingEnvironment, value) -> {
                    if (value instanceof String s) {
                        return s.toUpperCase();
                    }
                    return value;
                }
        );

        env.getCodeRegistry().dataFetcher(parentType, field, dataFetcher);
        return field;
    }
}

And I created a bean @DgsRuntimeWiring in the data fetchers.

@DgsComponent
public class PostsDataFetcher {

    @DgsRuntimeWiring
    RuntimeWiring.Builder runtimeWiring(RuntimeWiring.Builder builder) {
        return builder.directive("uppercase", new UppercaseDirectiveWiring());
    }

When running the application, and test it on Graphiql, but it does not work. Not sure where is wrong.

This directive is working with my other Graphql example written in GraphQL Java and Spring Graphql.

Check: https://github.com/hantsy/spring-graphql-sample/tree/master/graphql-java/src/main/java/com/example/demo/gql/directives

Hope add a @DgsDirective and apply on the UppercaseDirectiveWiring to register a directive.

created time in a day

push eventopenrewrite/rewrite

Jonathan Schneider

commit sha 334198d5191afe5a0d13336c57e50671f4c0a297

UnnecessaryThrows doesn't remove Closeable/Autocloseable exceptions (fixes #631)

view details

push time in a day

issue closedopenrewrite/rewrite

UnnecessaryThrows drops throws for exception thrown from AutoCloseable close().

Discovered while running UnecessaryThrows on GeoTools.

import java.io.IOException;
import java.net.URL;
import java.net.URLClassLoader;

class Test {
    public void testLookupWithExtendedClasspath() throws IOException{
        URL url = getClass().getResource("foo.jar");
        assertNotNull(url);
        // URLClassLoader implements Closeable and throws IOException from its close() method
        try (URLClassLoader cl = new URLClassLoader(new URL[] {url})) {
        }
    }
}

closed time in a day

pway99

push eventopenrewrite/rewrite

Sam Snyder

commit sha 792620d2191bb972ed5f1bb169c40a4c13a67a90

Enable enhanced type validation now that #653 is fixed

view details

push time in a day

push eventopenrewrite/rewrite

Jonathan Schneider

commit sha c00179cc8264eceb01b944e160e1d9a5589c93a6

BlockStatementTemplateGenerator doesn't duplicate inner classes (fixes #653)

view details

push time in a day

issue closedopenrewrite/rewrite

BlockStatementTemplateGenerator produces snippets with multiple definitions of the same inner class, leading to missing type attributions after templating

I noticed this while looking into why CovariantEqualsTest.replaceWithNonCovariantEqualsWhenNested() was producing a method invocation missing type attributions.

That test turns this before:

class A {
    class B {
        int n;

        public boolean equals(B bee) {
            return n == bee.n;
        }
    }
}

into this after:

class A {
    class B {
        int n;

        @Override
        public boolean equals(Object obj) {
            if (obj == this) return true;
            if (obj == null || getClass() != obj.getClass()) return false;
            B bee = (B) obj;
            return n == bee.n;
        }
    }
}

getClass() and obj.getClass() come out un-type-attributed because the snippet being generated by BlockStatementTemplateGenerator is (reformatted for legibility):

class A {
    class B {
        public boolean equals(B bee) {
            return true;
        }

        int n;
    }

    class B {
        public boolean equals(B bee) {
            return true;
        }

        int n;

        public boolean equals(Object obj) {
            if (true) {
                /*__TEMPLATE__*/
                if (obj == this) return true;
                if (obj == null || getClass() != obj.getClass()) return false;
                B bee = (B) obj;
            }
            return true;
        }
    }
}

Which has two competing definitions for inner class B.

closed time in a day

sambsnyd

issue commentNetflix/dgs-framework

feature: Integration with WebFlux ReactiveSecurityContextHolder

Okay, after messing around inside dgs-framework, I think I have a path forward but would love input from the maintainers.

I modified DataFetcherResultProcessor:

 interface DataFetcherResultProcessor {
     fun supportsType(originalResult: Any): Boolean
     fun process(originalResult: Any, dfe: DataFetchingEnvironment): Any
 }

this is a relatively trivial change, allowing access to the dfe (or potential we should allow access to DgsDataFetchingEnvironment instead) inside of Mono/FluxDataFetcherResultProcessors.

I then had to implement my own custom Mono/Flux implementation converters since spring-security is not included in these modules.

class MonoDataFetcherResultProcessor : DataFetcherResultProcessor {
    override fun supportsType(originalResult: Any): Boolean {
        return originalResult is Mono<*>
    }

    override fun process(originalResult: Any, dfe: DataFetchingEnvironment): Any {
        if (originalResult is Mono<*>) {
            val context = ReactiveSecurityContextHolder.withAuthentication((dfe.getContext<DgsContext>().customContext as SecurityContext).authentication)
            return originalResult.contextWrite(context).toFuture()
        } else {
            throw IllegalArgumentException("Instance passed to ${this::class.qualifiedName} was not a Mono<*>. It was a ${originalResult::class.qualifiedName} instead")
        }
    }
}

noting that my customContext is:

@Component
class SecurityContextDgs : DgsReactiveCustomContextBuilderWithRequest<SecurityContext> {
    override fun build(
        extensions: Map<String, Any>?,
        headers: HttpHeaders?,
        serverRequest: ServerRequest?
    ): Mono<SecurityContext> {
        return ReactiveSecurityContextHolder.getContext()
    }
}

This could probably be improved in some way, but it does work e2e for me on my fork + custom implementations.

What are peoples thoughts and suggestions?

driverpt

comment created time in a day

issue commentNetflix/dgs-framework

feature: Add a default Cors configuration

Add a CorsFilter is on conditional, as it was done in the graphql-java-kickstart spring boot starter.

hantsy

comment created time in a day

created tagNetflix/spectator-go

tagv0.1.3

created time in a day

push eventopenrewrite/rewrite

traceyyoshima

commit sha 7b717926d1e949d261d1397acc1fce89e19aaaac

Adjust RemoveUnusedImport test to show issue #687.

view details

push time in a day

push eventNetflix/spectator-go

Matthew Johnson

commit sha 276718605156595da704f7ca8f7af22465baab66

fix file descriptor metric names This commit fixes a bug that was introduced by the following commit: https://github.com/Netflix/spectator-go/commit/375b638ffabe980c39294486dc6e03a9993a2fb3 When the file descriptor metric names were updated from `fh.maxOpen` and `fh.curOpen` to `fh.allocated` and `fh.max`, the names were swapped. The `allocated` metric should track the number of file descriptors opened, and the `max` metric should track the number of file descriptors configured.

view details

Matthew Johnson

commit sha ec1510c7a7c9cbf52c7e8200bd670878bfde172e

Merge pull request #57 from copperlight/fh-metric-names fix file descriptor metric names

view details

push time in a day

PR merged Netflix/spectator-go

Reviewers
fix file descriptor metric names

This commit fixes a bug that was introduced by the following commit:

https://github.com/Netflix/spectator-go/commit/375b638ffabe980c39294486dc6e03a9993a2fb3

When the file descriptor metric names were updated from fh.maxOpen and fh.curOpen to fh.allocated and fh.max, the names were swapped. The allocated metric should track the number of file descriptors opened, and the max metric should track the number of file descriptors configured.

+2 -2

0 comment

1 changed file

copperlight

pr closed time in a day

PR opened Netflix/spectator-go

fix file descriptor metric names

This commit fixes a bug that was introduced by the following commit:

https://github.com/Netflix/spectator-go/commit/375b638ffabe980c39294486dc6e03a9993a2fb3

When the file descriptor metric names were updated from fh.maxOpen and fh.curOpen to fh.allocated and fh.max, the names were swapped. The allocated metric should track the number of file descriptors opened, and the max metric should track the number of file descriptors configured.

+2 -2

0 comment

1 changed file

pr created time in a day

issue commentopenrewrite/rewrite

MethodPattern("* build()") doesn't match anyhting

The test Jonathan provides passes currently. Since that works for you, Alex, I'm closing this issue.

BoykoAlex

comment created time in a day

issue closedopenrewrite/rewrite

MethodPattern("* build()") doesn't match anyhting

If my code has Response.status(200).build() the pattern isn't matched. However, if the pattern is "javax.ws.rs.core.Response.ResponseBuilder build()" it works. Suspecting "*" for the type not making it in properly into regular expression, i.e. [^.]* is the regular expression for the type... ^ should be not inside [] ?

closed time in a day

BoykoAlex

push eventopenrewrite/rewrite

Sam Snyder

commit sha 38726d790e02c9b13b6b93d64796baf50f5c5589

Add test for MethodMatcher matching any reciever type. Closes #629

view details

push time in a day

issue commentNetflix/dgs-framework

feature: Add a default Cors configuration

Because CORS is very specific to each application, and there are some dangers in not knowing it's enabled, I think we should not support this out of the box. @berngp WDYT?

hantsy

comment created time in a day

delete branch Netflix/dgs-framework

delete branch : fragment-serializaton

delete time in a day

push eventNetflix/dgs-framework

Paul Bakker

commit sha fb456dc21bace4c45283e17e52619c4d4194336f

Added serialization for fragments

view details

Paul Bakker

commit sha 423d3359c1a87875354de9f72b0fa3fa04e1cb9e

Added serialization for fragments

view details

Paul Bakker

commit sha c03aeb5d211527688c538eb7cc6e5c8cc0585d26

formatting

view details

Paul Bakker

commit sha 56caed13eaae5ee5890ea655049fded4d6834a94

query formatting

view details

Paul Bakker

commit sha c0c74c39956ff6511d2b98d16af56153a29147eb

Merge pull request #418 from Netflix/fragment-serializaton Added serialization for fragments

view details

push time in a day

PR merged Netflix/dgs-framework

Added serialization for fragments

Fix to properply serialize input arguments for fragments as well.

+8 -3

0 comment

1 changed file

paulbakker

pr closed time in a day

issue commentopenrewrite/rewrite

RenameFile base recipe

I was wondering: maybe there should be a warning or an error if multiple files matches the expression? Otherwise some files will be lost. E.g. your run the recipe with fileMatcher=*.txt and fileName=foo.csv and you have a directory containing a.txt, b.txt and c.txt : at end you'll have only one file in that directory.

jkschneider

comment created time in a day

created tagNetflix/titus-api-definitions

tagv0.0.2-rc.3

created time in a day

created tagNetflix/dgs-framework

tagv4.3.0-rc.6

GraphQL for Java with Spring Boot made easy.

created time in a day

issue openedopenrewrite/rewrite

Condition to unfold static Imports never triggers.

References to items in the static * may have been removed, but the import is never unfolded.

created time in a day

push eventNetflix/dgs-framework

Paul Bakker

commit sha 56caed13eaae5ee5890ea655049fded4d6834a94

query formatting

view details

push time in a day

delete branch Netflix/titus-api-definitions

delete branch : TITUS-5368_networking_mode

delete time in a day