driverpt/kong-redis-session 20
Kong plugin that translates a Session Cookie to Authorization header. e.g.: Session Cookie -> JWT
DNSBL Checker for Java
Alpine Linux with Dockerize Installed
One framework. Mobile & desktop.
AWS SDK for JavaScript in the browser and Node.js
Workflow as a Service DOJO
Starting point for commit viewer
driverpt/CoreUI-Free-Bootstrap-Admin-Template 0
CoreUI is free bootstrap admin template with Angular2, AngularJS, React.js & Vue.js support.
Open source clone of Theme Hospital
pull request commentgoogle/iosched
@manuelvicnt Thank you for taking valuable time on this, those are really great findings and should give insights to developers in tests! I also played around a bit with Startup but unfortunately kept getting errors. Hope @tikurahul will rescue us 🤞
comment created time in 6 hours
pull request commentgoogle/iosched
Hi @nuhkoca ! Tried locally and yes, the tests keep failing but for a different reason now. EarlyEntryPoints fixes the problem when accessing the graph in tests.
As initializers run automatically, by the time AnalyticsHelperInitializer run and tries to access the context, there's no context because the test hasn't even started yet. And that throws the following runtime exception.
androidx.startup.StartupException: java.lang.IllegalStateException: No instrumentation registered! Must run under a registering instrumentation.
I thought about removing the automatic initialization for tests and then activating them manually in MainTestApplication, but I couldn't get it to work. Following the [App Startup documentation], I added a new AndroidManifest.xml file in the androidTest folder and added:
<application>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="remove"/>
</application>
But that does NOT work either! Because ${applicationId} = com.google.samples.apps.iosched.test and the authority in the main app is com.google.samples.apps.iosched. And if you try to hardcode com.google.samples.apps.iosched in there doesn't work as the provider is not the same. It gives a The application could not be installed: INSTALL_FAILED_CONFLICTING_PROVIDER compilation error.
@tikurahul can you help here? Not wanting to run initializers during integration tests seems to be a common use case the community can face.
comment created time in 7 hours
pull request commentawspring/spring-cloud-aws
CloudMap support for spring aws applications
It's been a long time since the required changes were submitted, any chance of reviewing? Eagerly waiting for these changes to be merged! Pinging @eddumelendez @maciejwalkowiak
comment created time in 7 hours
issue commentCorsixTH/CorsixTH
Allow music control from main menu
Update config_finder.lua to set the default. It doesn't affect people that have already launched the game.
comment created time in 12 hours
pull request commentgoogle/iosched
Let me take a look tomorrow. No need to push your changes with EarlyEntryPoint though :D
comment created time in 18 hours
Pull request review commentgoogle/iosched
+/*+ * Copyright 2021 Google LLC+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.google.samples.apps.iosched.util.initializers++import android.content.Context+import androidx.startup.Initializer+import com.google.samples.apps.iosched.di.InitializerEntryPoint+import com.google.samples.apps.iosched.shared.analytics.AnalyticsHelper+import javax.inject.Inject++class AnalyticsHelperInitializer : Initializer<Unit> {++ @Inject+ lateinit var analyticsHelper: AnalyticsHelper++ override fun create(context: Context) {+ InitializerEntryPoint.resolve(context).inject(this)
Yeah, sorry, meant analyticsHelper = InitializerEntryPoint.resolve(context). analyticsHelper() instead
comment created time in 18 hours
Pull request review commentgoogle/iosched
+/*+ * Copyright 2021 Google LLC+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.google.samples.apps.iosched.di++import android.content.Context+import com.google.samples.apps.iosched.util.initializers.AnalyticsHelperInitializer+import dagger.hilt.EntryPoint+import dagger.hilt.InstallIn+import dagger.hilt.android.EntryPointAccessors+import dagger.hilt.components.SingletonComponent++@EntryPoint+@InstallIn(SingletonComponent::class)+interface InitializerEntryPoint {++ companion object {+ fun resolve(context: Context): InitializerEntryPoint {+ return EntryPointAccessors.fromApplication(+ context,+ InitializerEntryPoint::class.java+ )+ }+ }++ fun inject(initializer: AnalyticsHelperInitializer)
Yes, sorry! I meant to say analyticsHelper instead :) thank you!
comment created time in 18 hours
pull request commentgoogle/iosched
@manuelvicnt Thanks a lot for your review. I did the same what you and documentation mentioned but tests still fail. So I need your help here :D Shall I push changes?
comment created time in 18 hours
Pull request review commentgoogle/iosched
+/*+ * Copyright 2021 Google LLC+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.google.samples.apps.iosched.util.initializers++import android.content.Context+import androidx.startup.Initializer+import com.google.samples.apps.iosched.di.InitializerEntryPoint+import com.google.samples.apps.iosched.shared.analytics.AnalyticsHelper+import javax.inject.Inject++class AnalyticsHelperInitializer : Initializer<Unit> {++ @Inject+ lateinit var analyticsHelper: AnalyticsHelper++ override fun create(context: Context) {+ InitializerEntryPoint.resolve(context).inject(this)
Sorry, I didn't get this, why EntryPoint returns initializer instance instead of dependency which is AnalyticsHelper in this class?
comment created time in 18 hours
Pull request review commentgoogle/iosched
+/*+ * Copyright 2021 Google LLC+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.google.samples.apps.iosched.di++import android.content.Context+import com.google.samples.apps.iosched.util.initializers.AnalyticsHelperInitializer+import dagger.hilt.EntryPoint+import dagger.hilt.InstallIn+import dagger.hilt.android.EntryPointAccessors+import dagger.hilt.components.SingletonComponent++@EntryPoint+@InstallIn(SingletonComponent::class)+interface InitializerEntryPoint {++ companion object {+ fun resolve(context: Context): InitializerEntryPoint {+ return EntryPointAccessors.fromApplication(+ context,+ InitializerEntryPoint::class.java+ )+ }+ }++ fun inject(initializer: AnalyticsHelperInitializer)
I think analyticsHelperInitializer should be analyticsHelper instead, right? Cause we have an instance of AnalyticsHelper from the graph.
comment created time in 18 hours
pull request commentawspring/spring-cloud-aws
Add how to format source code with maven to documentation
Hi, didn't see that. Horrible documentation 😂 Anyway it was worth a try.
comment created time in 19 hours
PR opened CorsixTH/CorsixTH
Describe what the proposed change does
- Allow handymen to move around at their regular speed in training rooms -- as per the original game.
pr created time in 20 hours
issue commentCorsixTH/CorsixTH
Allow music control from main menu
Thanks, probably set music vol to 10% or 20% then.
Though I'm not sure how you really update the config.txt code
comment created time in 21 hours
issue closedCorsixTH/CorsixTH
[Bug] Queue warnings error on crashed rooms
Describe the issue
#1807 introduced queue length warning, but in the instance of a crashed room, the queue is nil from Door:closeDoor.
Steps to Reproduce
- Load save game from #1462 for example and wait til the 10th day of month
Save Game
See #1462
Expected Behavior
Should skip over crashed rooms
System Information
CorsixTH Version: e.g. 0.50 or 7d886f35ca
Operating System: e.g. Windows 10
Theme Hospital Version: CD, GOG.com, Origin, or Demo
Gamelog.txt
Savegame version is 155 (Trunk), originally it was 155 (Trunk).
Error in timer handler:
Lua\hospitals\player_hospital.lua:344: attempt to get length of a nil value (field 'queue')
stack traceback:
Lua\hospitals\player_hospital.lua:344: in method 'warnForLongQueues'
Lua\hospitals\player_hospital.lua:184: in method 'dailyAdviceChecks'
Lua\hospitals\player_hospital.lua:374: in method 'onEndDay'
Lua\world.lua:1043: in method 'onTick'
Lua\app.lua:1131: in function <Lua\app.lua:1128>
(...tail calls...)
Lua\app.lua:1031: in function <Lua\app.lua:1026>
Additional Info
@tobylane had mentioned in irc the 'fixed' line was failing
The line "if room.door.queue and #room.door.queue then" causes an error saying attempt to get length of nil value. That sounds impossible, why did the first part return true?
Maybe testing against the code before the fix or forgot to push an update or something else.
closed time in 21 hours
mugmuggyissue commentCorsixTH/CorsixTH
[Bug] Queue warnings error on crashed rooms
Fixed
comment created time in 21 hours
pull request commentgoogle/iosched
Hi @nuhkoca ! The problem with the tests are due to EntryPoints being used. In tests, Hilt's SingletonComponent is scoped to the lifetime of the test case instead of the lifetime of the Application.
To get this fixed, you need to use @EarlyEntryPoints instead of @EntryPoints in the different initializers.
More info here: https://dagger.dev/hilt/early-entry-point.html
Let me know if you need more help :D thank you!
comment created time in a day
Pull request review commentgoogle/iosched
+/*+ * Copyright 2021 Google LLC+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.google.samples.apps.iosched.util.initializers++import android.content.Context+import androidx.startup.Initializer+import com.google.samples.apps.iosched.di.InitializerEntryPoint+import com.google.samples.apps.iosched.shared.analytics.AnalyticsHelper+import javax.inject.Inject++class AnalyticsHelperInitializer : Initializer<Unit> {++ @Inject+ lateinit var analyticsHelper: AnalyticsHelper++ override fun create(context: Context) {+ InitializerEntryPoint.resolve(context).inject(this)
analyticsHelperInitializer = InitializerEntryPoint.resolve(context). analyticsHelperInitializer()
As commented above, I'd rather not have entry points behave like Dagger components. Also, the @Inject from analyticsHelper can be removed and can be made private.
Thanks!
comment created time in a day
Pull request review commentgoogle/iosched
+/*+ * Copyright 2021 Google LLC+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * https://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */++package com.google.samples.apps.iosched.di++import android.content.Context+import com.google.samples.apps.iosched.util.initializers.AnalyticsHelperInitializer+import dagger.hilt.EntryPoint+import dagger.hilt.InstallIn+import dagger.hilt.android.EntryPointAccessors+import dagger.hilt.components.SingletonComponent++@EntryPoint+@InstallIn(SingletonComponent::class)+interface InitializerEntryPoint {++ companion object {+ fun resolve(context: Context): InitializerEntryPoint {+ return EntryPointAccessors.fromApplication(+ context,+ InitializerEntryPoint::class.java+ )+ }+ }++ fun inject(initializer: AnalyticsHelperInitializer)
fun analyticsHelperInitializer(): AnalyticsHelperInitializer
I understand this works as you expect and is nice to read. However, an entry point's responsibility is not injecting classes, entry points expose instances from the graph.
comment created time in a day
pull request commentgoogle/iosched
@JoseAlcerreca can you help me for UI tests? After moving AnalyticsHelper out of application and inject it in the Initializer class, UI tests have start to fail and I don't know how to get it to working with Hilt.
comment created time in a day
Pull request review commentgoogle/iosched
dependencies { implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) implementation(Libs.CORE_KTX)+ implementation(Libs.APP_STARTUP)
Right of course!
comment created time in a day
pull request commentawspring/spring-cloud-aws
@maciejwalkowiak reference docs are updated to include FIFO SNS topic
comment created time in a day
Pull request review commentawspring/spring-cloud-aws
Fix Customizing the Bootstrap Configuration link
errors if the properties are not configured at all. The Parameter Store and Secrets Manager Configuration support uses a bootstrap context to configure a default `AWSSimpleSystemsManagement` client, which uses a `com.amazonaws.auth.DefaultAWSCredentialsProviderChain` and `com.amazonaws.regions.DefaultAwsRegionProviderChain`. If you want to override this, then you need to-https://cloud.spring.io/spring-cloud-static/Edgware.SR2/multi/multi__spring_cloud_context_application_context_services.html#_customizing_the_bootstrap_configuration[define your own Spring Cloud bootstrap configuration class]+https://projects.spring.io/spring-cloud/spring-cloud.html#_customizing_the_bootstrap_configuration[define your own Spring Cloud bootstrap configuration class]
Updated. There are too many different ways to access various versions of the documentation.
comment created time in a day
issue commentCorsixTH/CorsixTH
Allow music control from main menu
There was some opposition on discord to that idea. I think the real takeaway here is to default the volume < 100%
comment created time in a day
Pull request review commentawspring/spring-cloud-aws
Introduce optional before each value.
public boolean isResolvable(ConfigDataLocationResolverContext context, ConfigDat AwsSecretsManagerPropertySources propertySources = new AwsSecretsManagerPropertySources(properties, log); - List<String> contexts = location.getValue().equals(PREFIX)- ? propertySources.getAutomaticContexts(profiles.getAccepted())- : getCustomContexts(location.getNonPrefixedValue(PREFIX));- List<AwsSecretsManagerConfigDataResource> locations = new ArrayList<>();- contexts.forEach(- propertySourceContext -> locations.add(new AwsSecretsManagerConfigDataResource(propertySourceContext,- location.isOptional(), propertySources)));+ if (location.getValue().equals(PREFIX)) {+ List<String> contexts = propertySources.getAutomaticContexts(profiles.getAccepted());+ contexts.forEach(propertySourceContext -> locations.add(new AwsSecretsManagerConfigDataResource(+ propertySourceContext, location.isOptional(), propertySources)));+ return locations;+ }++ Map<String, Boolean> mapOfLocation = getCustomContexts(location.getNonPrefixedValue(PREFIX));+ mapOfLocation.forEach((variable, optional) -> locations+ .add(new AwsSecretsManagerConfigDataResource(variable, optional, propertySources))); return locations; } - private List<String> getCustomContexts(String keys) {+ private Map<String, Boolean> getCustomContexts(String keys) {+ String optionalString = "optional";+ Map<String, Boolean> mapOfValuesWithOptional = new HashMap<>(); if (StringUtils.hasLength(keys)) {- return Arrays.asList(keys.split(";"));+ List<String> listOfFields = Arrays.asList(keys.split(";"));+ listOfFields.forEach(field -> {+ if (field.length() > 8 && field.toLowerCase().substring(0, 8).equals(optionalString)) {
This gets too low level. I think we could have a dedicated class CustomContext that would take a string as an argument, and have methods like isOptional, getName. Then getCustomContexts would return just a list of these objects.
If its not clear enough, we can pair on this one.
comment created time in a day
Pull request review commentawspring/spring-cloud-aws
Introduce optional before each value.
void testResolveProfileSpecificWithCustomPaths() { assertThat(toContexts(locations)).containsExactly("/mypath1", "/mypath2", "/mypath3"); } + @Test+ void testResolveProfileSpecificWithCustomPathsOptional() {+ String location = "aws-secretsmanager:optional /mypath1;/mypath2;optional /mypath3";
Why a space? Isn't it idiomatic to support: aws-secretsmanager:optional:/mypath1;/mypath2;optional:/mypath3?
comment created time in a day
Pull request review commentawspring/spring-cloud-aws
Fix Customizing the Bootstrap Configuration link
errors if the properties are not configured at all. The Parameter Store and Secrets Manager Configuration support uses a bootstrap context to configure a default `AWSSimpleSystemsManagement` client, which uses a `com.amazonaws.auth.DefaultAWSCredentialsProviderChain` and `com.amazonaws.regions.DefaultAwsRegionProviderChain`. If you want to override this, then you need to-https://cloud.spring.io/spring-cloud-static/Edgware.SR2/multi/multi__spring_cloud_context_application_context_services.html#_customizing_the_bootstrap_configuration[define your own Spring Cloud bootstrap configuration class]+https://projects.spring.io/spring-cloud/spring-cloud.html#_customizing_the_bootstrap_configuration[define your own Spring Cloud bootstrap configuration class]
Even more up to date links is: https://docs.spring.io/spring-cloud-commons/docs/current/reference/html/#customizing-the-bootstrap-configuration
comment created time in a day
PR closed awspring/spring-cloud-aws
:loudspeaker: Type of change
<!--- Put an x in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
:scroll: Description
Adding how to format source with maven to readme
:bulb: Motivation and Context
Every time i want to contribute i am struggling with how to format the source code without changing my Intellij settings
:green_heart: How did you test it?
i read it
:pencil: Checklist
<!--- Put an x in the boxes that apply -->
- [x] I reviewed submitted code
- [ ] I added tests to verify changes
- [ ] I updated reference documentation to reflect the change
- [ ] All tests passing
- [x] No breaking changes
:crystal_ball: Next steps
pr closed time in a day
pull request commentawspring/spring-cloud-aws
Add how to format source code with maven to documentation
@tekener our readme is partially generated from Spring Cloud docs (look at the top of readme file). If you believe this change should be added to other Spring Cloud projects, consider creating a PR to: https://github.com/spring-cloud/spring-cloud-build/blob/main/docs/src/main/asciidoc/contributing.adoc
I am strongly considering migrating away from Spring Javaformat to Spotless
comment created time in a day
pull request commentawspring/spring-cloud-aws
@codingtim thanks for the PR! Are you also able to update the reference docs? It would be great to add a section explaining how to use FIFO SNS topics.
comment created time in a day
Pull request review commentawspring/spring-cloud-aws
*/ public static final String NOTIFICATION_SUBJECT_HEADER = "NOTIFICATION_SUBJECT_HEADER"; + /**+ * Message group id for SNS message (applies only to FIFO queue).+ */+ public static final String MESSAGE_GROUP_ID_HEADER = "MessageGroupId";
I would be in for keeping consistency with AWS naming, but since SQS has been implemented already like that 4 years ago, lets keep it in sync with SQS implementation.
We can reconsider for 3.0
comment created time in a day