Code Monkey home page Code Monkey logo

zync's Introduction

Zync - the sync tool

Zync is going to take your 3scale data and pushes it somewhere else, reliably. Offers only one directional sync (from 3scale to other systems).

Building from Source

This component is deployed as part of the overall 3scale API Management solution.

Please see these instructions and Quickstart guide on how to set up your development environment locally and these instructions to integrate it with Porta and Keycloak.

Terminology

Before describing the design it is important to define the terms.

  • Zync - deployment of this project, Web API.

  • 3scale - 3scale API Manager (Porta).

  • Tenant - mapping of Provider id registered in 3scale API Manager to the domain and access token.

  • Model - relevant object in 3scale like Application, Limit, Metric, Service.

  • Notification - Message sent to Zync describing the model that changed and having all required properties to fetch it from the API later.

    • Example: Application 3456, tenant_id: 26
    • Example: Limit 4566, metric_id: 36, application_id: 46, tenant_id: 16
  • Update - Zync fetches updated Model from the Notifier via the API using the information provided by the Notification.

  • Lock - the mechanism that prevents concurrent data access to the same scope.

    • Example: Tenant Lock would mean only one can be running for one Tenant.
    • Example: Model Lock - only one per uniquely identified Model.
  • Entry - The information from the API provided by the Update.

  • Log - ordered list of Entries as they were received.

  • Push - a call from Zync to external service updating model data

  • Integration - code that pushes Log entries one-by-one for the same Model to some external service.

    • Integration can access the entries log to fetch more data and for example handle model dependencies by accessing all dependent models and delete them before deleting the parent.
    • Integration keeps Status of each model synchronization state. If a push fails status should be updated to reflect that and keep trying.
  • Integration Configuration - configuration for each instance of Integration for each Tenant. It is populated the same way as Model - by Notification and Fetch.

Design

Zync is meant to synchronize data from 3scale to external systems (like IDPs). Some people use Web-hooks for this but without further logic, they can be unreliable and arrive out of order. This tool is meant to synchronize the final state to a different system.

The flow is defined as 3scale -> Zync ( <- 3scale) -> Integration. So 3scale notifies Zync there was a change to a model but does not say more than the primary key and information required to fetch it from the 3scale API. In some cases model needs just its primary key (id) and in some, it needs other metadata (usually primary keys of its parents) to compose the API call (service_id, metric_id, โ€ฆ).

Zync upon receiving the notification will acquire an update model lock and try to perform an update. Any information received this way is added as an entry to the log and the model lock is released. That entry can be either new data or information that the record is no longer there (404 from the API). If new notification came when the model lock was acquired, it is going to be processed after the lock is released.

After adding entry to the log an integration is triggered and acquires an integration model lock so it will process only one (latest) entry for a model at a time. After the integration finishes (with both failure or success) it will release the lock and trigger another run if failed.

Properties

Given the locking on the model there will be some parallelization, but also updates to one object will be serialized. This needs to be done to limit the network issues and ensure the request was delivered before issuing a new one.

Because Zync will keep a log of events it will be able to replay changes and recover the last state just taking last revisions of each model and even remove the ones that have been created before but have been deleted.

Data Model

Record types are for enforcing correctness of data on the database level and referential integrity. There is one relationship (Model -> Record) that can't have foreign constraints but can be recreated from other data.

Tenant

id (pk) domain access_token
bigint string string

Notification

id (pk) model_class model_id (fk) data tenant_id (fk)
uuid string bigint json bigint

Application (Record)

id (pk) account_id tenant_id (fk)
string bigint bigint

Service (Record)

id (pk) tenant_id (fk)
string bigint

Metric (Record)

id (pk) service_id (fk) tenant_id (fk)
string bigint bigint

UsageLimit (Record)

id (pk) metric_id (fk) plan_id tenant_id (fk)
string bigint bigint bigint

Model

id (pk) record_id (fk) tenant_id (fk)
uuid bigint bigint

Update

id (pk) model_id (fk) tenant_id (fk)
uuid uuid bigint

Entry

id (pk) update_id (fk) data tenant_id (fk)
uuid uuid json bigint

Status

id (pk) integration_id (fk) model_id (fk) tenant_id (fk)
uuid uuid uuid bigint

zync's People

Contributors

akostadinov avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar depfu[bot] avatar duduribeiro avatar gsaslis avatar guicassolato avatar hallelujah avatar hemahg avatar jamaga avatar jjkiely avatar jlledom avatar josemigallas avatar krishvoor avatar macejmic avatar martouta avatar mayorova avatar mikz avatar poojachandak avatar raelga avatar slopezz avatar velemas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zync's Issues

ActiveRecord::StatementInvalid in bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:614

Error in Zync

ActiveRecord::StatementInvalid in bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:614
PG::QueryCanceled: ERROR: canceling statement due to statement timeout
CONTEXT: while locking tuple (9060,22) in relation "models"
: SELECT "models".* FROM "models" WHERE "models"."id" = $1 LIMIT $2 FOR NO KEY UPDATE

View on Bugsnag

Stacktrace

bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:614 - async_exec
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:614 - block (2 levels) in exec_no_cache
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies/interlock.rb:46 - block in permit_concurrent_loads
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/concurrency/share_lock.rb:185 - yield_shares
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/dependencies/interlock.rb:45 - permit_concurrent_loads
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:613 - block in exec_no_cache
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:612 - block (2 levels) in log
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:611 - block in log
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications/instrumenter.rb:21 - instrument
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract_adapter.rb:603 - log
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:612 - exec_no_cache
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql_adapter.rb:601 - execute_and_clear
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:79 - exec_query
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:371 - select
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:42 - select_all
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/query_cache.rb:97 - select_all
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/querying.rb:39 - find_by_sql
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation.rb:659 - exec_queries
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation.rb:546 - load
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation.rb:255 - records
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation/finder_methods.rb:518 - find_take
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation/finder_methods.rb:100 - take
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation/finder_methods.rb:468 - find_one
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation/finder_methods.rb:450 - find_with_ids
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation/finder_methods.rb:66 - find
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/persistence.rb:460 - block in reload
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/scoping/default.rb:35 - block in unscoped
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/relation.rb:336 - scoping
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/scoping/default.rb:35 - unscoped
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/persistence.rb:460 - reload
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/attribute_methods/dirty.rb:50 - reload
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/associations.rb:283 - reload
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/autosave_association.rb:236 - reload
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/aggregations.rb:13 - reload
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/locking/pessimistic.rb:70 - lock!
app/models/model.rb:13 - weak_lock
app/models/update_state.rb:10 - block in acquire_lock
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - block in transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/transaction.rb:194 - block in within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/transaction.rb:191 - within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/transactions.rb:210 - transaction
app/models/update_state.rb:9 - acquire_lock
app/jobs/update_job.rb:19 - perform
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:37 - block in perform_now
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:108 - block in run_callbacks
bundle/ruby/2.4.0/gems/i18n-0.8.6/lib/i18n.rb:257 - with_locale
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/translation.rb:7 - block (2 levels) in <module:Translation>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:24 - block (4 levels) in <module:Logging>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - block in instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications/instrumenter.rb:21 - instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - instrument
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:23 - block (3 levels) in <module:Logging>
lib/lograge/job_log_subscriber.rb:14 - tag_logger
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:20 - block (2 levels) in <module:Logging>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:135 - run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:33 - perform_now
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:22 - block in execute
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:108 - block in run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/railtie.rb:26 - block (4 levels) in <class:Railtie>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:85 - wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/reloader.rb:68 - block in wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:81 - wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/reloader.rb:67 - wrap
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/railtie.rb:25 - block (3 levels) in <class:Railtie>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:135 - run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:20 - execute
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/queue_adapters/que_adapter.rb:32 - run
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:17 - _run
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:129 - block in work
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:7 - block in checkout
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:408 - with_connection
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:67 - block in checkout_activerecord_adapter
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:85 - wrap
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:66 - checkout_activerecord_adapter
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:7 - checkout
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:111 - work
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:80 - block in work_loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:75 - loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:75 - work_loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:19 - block in initialize

View full stacktrace

Created by 3scale via Bugsnag

Add automated license checking

Add automated license checking to this project using License Finder that checks all dependencies are using approved licenses, and fails the build if any non-approved license is introduced via a direct or transitive dependency.

OK to add any license initially that has already been approved in other similar projects, to start the approvals list of license_finder.

Enable ppc64le arch on zync

Hi,

Thanks for the well articulated documentation that helped me build zync from source and run the tests outlined successfully on
IBM Power architecture (in short, ppc64le).

What is IBM Power architecture?
It is a RISC architecture and is IBM's prodigy, IBM has recently made its ISA (Instruction Set Architecture) opensource and in doing
so, they have significantly contributed back to the opensource community at large. Many of the pioneers of banking and HPC
industries today run on ppc64le architecture.

As an ongoing effort to enable open-source projects where Power architecture can add value, we are trying to enable this
project. We have seen absolutely no deviation in build/test instructions. I plan to submit a PR to enable build/testing on ppc64le.

What would it take from us to enable ppc64le in the CI/CD pipeline?
I see CircleCI is being used for the CI pipeline of this project. As of now, this is not supported for native compilation on ppc64le.
However, currently, we are enabled/certified on Travis & Jenkins and lots of open source communities have successfully used these
as CI/CD for ppc64le.

zync resync domain issues

I had OpenShift 3.11 and 3scale 2.5 environment.
Recently i have upgraded to 3scale 2.6. Based on documentation at the end of migration process i have removed all routes and run zync domain resync with following command:

SYSTEM_SIDEKIQ_POD=$(oc get pods | grep sidekiq | awk '{print $1}')
echo ${SYSTEM_SIDEKIQ_POD}
oc exec -it ${SYSTEM_SIDEKIQ_POD} -- bash -c 'bundle exec rake zync:resync:domains'

After that I'v got many routes with "HostAlreadyClaimed" in my project:
oc get routes:
zync-3scale-api-2m5m4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-2tjhb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4dhsx HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4w586 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-56bkj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-56gcm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5br9g HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5ccbj brw-api-prod-brw-apicast-production. apicast-production gateway edge/Redirect None
zync-3scale-api-5cftp HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5vx2b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5whgm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5x2xq api-brw-apicast-staging. apicast-staging gateway edge/Redirect None
zync-3scale-api-6kpdw HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-6t9tl HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-7t665 apicast-brw.icdc.io apicast-production gateway edge/Redirect None
zync-3scale-api-br694 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-cxbr4 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-czlm4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-d4c7b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jmp8c HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jnrcb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jxdpj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-km78n HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-kq2nf HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-lzh86 HostAlreadyClaimed apicast-staging gateway edge/Redirect None

And so on. Look like because we are using path routing in our environment and public host is the same for many apis domain sync tries to create them with the same hostname. It seem this is not neccessary and should be fixed.

Using system-provider service only resolves to first tenant API

Hi,

I'm trying to communicate with one tenant API from APICast Pod in multi-tenant setup.

Instead of hitting external route for the API, and since I'm in same oc namespace with system-app, I want to call curl http://system-provider:3000/admin/api directly but it only resolves to the first or master tenant and gives 404 - Not found as response.

I tried to set HOST header with route of tenant, but it didn't work and I receive 301 - Moved Permanently (?)

zync resync domain issues

I had OpenShift 3.11 and 3scale 2.5 environment.
Recently i have upgraded to 3scale 2.6. Based on documentation at the end of migration process i have removed all routes and run zync domain resync with following command:

SYSTEM_SIDEKIQ_POD=$(oc get pods | grep sidekiq | awk '{print $1}')
echo ${SYSTEM_SIDEKIQ_POD}
oc exec -it ${SYSTEM_SIDEKIQ_POD} -- bash -c 'bundle exec rake zync:resync:domains'

After that I'v got many routes with "HostAlreadyClaimed" in my project:
oc get routes:
zync-3scale-api-2m5m4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-2tjhb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4dhsx HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4w586 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-56bkj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-56gcm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5br9g HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5ccbj brw-api-prod-brw-apicast-production. apicast-production gateway edge/Redirect None
zync-3scale-api-5cftp HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5vx2b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5whgm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5x2xq api-brw-apicast-staging. apicast-staging gateway edge/Redirect None
zync-3scale-api-6kpdw HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-6t9tl HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-7t665 apicast-brw.icdc.io apicast-production gateway edge/Redirect None
zync-3scale-api-br694 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-cxbr4 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-czlm4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-d4c7b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jmp8c HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jnrcb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jxdpj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-km78n HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-kq2nf HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-lzh86 HostAlreadyClaimed apicast-staging gateway edge/Redirect None

And so on. Look like because we are using path routing in our environment and public host is the same for many apis domain sync tries to create them with the same hostname. It seem this is not neccessary and should be fixed.

Add instructions on how to contribute

Add instructions to prospective contributors how they can contribute to this project, probably by writing a CONTRIBUTING.md file in the root and linking to it from README.md

zync resync domain issues

I had OpenShift 3.11 and 3scale 2.5 environment.
Recently i have upgraded to 3scale 2.6. Based on documentation at the end of migration process i have removed all routes and run zync domain resync with following command:

SYSTEM_SIDEKIQ_POD=$(oc get pods | grep sidekiq | awk '{print $1}')
echo ${SYSTEM_SIDEKIQ_POD}
oc exec -it ${SYSTEM_SIDEKIQ_POD} -- bash -c 'bundle exec rake zync:resync:domains'

After that I'v got many routes with "HostAlreadyClaimed" in my project:
oc get routes:
zync-3scale-api-2m5m4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-2tjhb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4dhsx HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4w586 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-56bkj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-56gcm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5br9g HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5ccbj brw-api-prod-brw-apicast-production. apicast-production gateway edge/Redirect None
zync-3scale-api-5cftp HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5vx2b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5whgm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5x2xq api-brw-apicast-staging. apicast-staging gateway edge/Redirect None
zync-3scale-api-6kpdw HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-6t9tl HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-7t665 apicast-brw.icdc.io apicast-production gateway edge/Redirect None
zync-3scale-api-br694 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-cxbr4 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-czlm4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-d4c7b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jmp8c HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jnrcb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jxdpj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-km78n HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-kq2nf HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-lzh86 HostAlreadyClaimed apicast-staging gateway edge/Redirect None

And so on. Look like because we are using path routing in our environment and public host is the same for many apis domain sync tries to create them with the same hostname. It seem this is not neccessary and should be fixed.

Keycloak::AuthenticationError in app/adapters/keycloak.rb:226

Error in Zync

Keycloak::AuthenticationError in app/adapters/keycloak.rb:226
execution expired

View on Bugsnag

Stacktrace

app/adapters/keycloak.rb:226 - rescue in access_token
app/adapters/keycloak.rb:224 - access_token
app/adapters/keycloak.rb:140 - headers
app/adapters/keycloak.rb:53 - test
app/services/integration/keycloak_service.rb:36 - handle_test
app/services/integration/keycloak_service.rb:14 - call
app/jobs/process_integration_entry_job.rb:29 - call
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - block in instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications/instrumenter.rb:21 - instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - instrument
app/jobs/process_integration_entry_job.rb:8 - instrument
app/jobs/process_integration_entry_job.rb:76 - call
app/jobs/process_integration_entry_job.rb:16 - block in perform
app/jobs/process_integration_entry_job.rb:71 - block in invoke
app/models/integration_state.rb:14 - block in acquire_lock
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - block in transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/transaction.rb:194 - block in within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/transaction.rb:191 - within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/transactions.rb:210 - transaction
app/models/integration_state.rb:11 - acquire_lock
app/jobs/process_integration_entry_job.rb:67 - invoke
app/jobs/process_integration_entry_job.rb:13 - perform
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:37 - block in perform_now
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:108 - block in run_callbacks
bundle/ruby/2.4.0/gems/i18n-0.8.6/lib/i18n.rb:257 - with_locale
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/translation.rb:7 - block (2 levels) in <module:Translation>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:24 - block (4 levels) in <module:Logging>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - block in instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications/instrumenter.rb:21 - instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - instrument
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:23 - block (3 levels) in <module:Logging>
lib/lograge/job_log_subscriber.rb:14 - tag_logger
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:20 - block (2 levels) in <module:Logging>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:135 - run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:33 - perform_now
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:22 - block in execute
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:108 - block in run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/railtie.rb:26 - block (4 levels) in <class:Railtie>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:85 - wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/reloader.rb:68 - block in wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:81 - wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/reloader.rb:67 - wrap
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/railtie.rb:25 - block (3 levels) in <class:Railtie>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:135 - run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:20 - execute
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/queue_adapters/que_adapter.rb:32 - run
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:17 - _run
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:129 - block in work
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:7 - block in checkout
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:408 - with_connection
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:67 - block in checkout_activerecord_adapter
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:85 - wrap
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:66 - checkout_activerecord_adapter
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:7 - checkout
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:111 - work
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:80 - block in work_loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:75 - loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:75 - work_loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:19 - block in initialize

View full stacktrace

Created by 3scale via Bugsnag

Installation instructions

Hi,

Please provide installation instructions for the tool. Great if we can have a docker image.

I'll be happy to test it against rhsso.

Best Regards,
Vinay

zync resync domain issues

I had OpenShift 3.11 and 3scale 2.5 environment.
Recently i have upgraded to 3scale 2.6. Based on documentation at the end of migration process i have removed all routes and run zync domain resync with following command:

SYSTEM_SIDEKIQ_POD=$(oc get pods | grep sidekiq | awk '{print $1}')
echo ${SYSTEM_SIDEKIQ_POD}
oc exec -it ${SYSTEM_SIDEKIQ_POD} -- bash -c 'bundle exec rake zync:resync:domains'

After that I'v got many routes with "HostAlreadyClaimed" in my project:
oc get routes:
zync-3scale-api-2m5m4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-2tjhb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4dhsx HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4w586 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-56bkj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-56gcm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5br9g HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5ccbj brw-api-prod-brw-apicast-production. apicast-production gateway edge/Redirect None
zync-3scale-api-5cftp HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5vx2b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5whgm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5x2xq api-brw-apicast-staging. apicast-staging gateway edge/Redirect None
zync-3scale-api-6kpdw HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-6t9tl HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-7t665 apicast- apicast-production gateway edge/Redirect None
zync-3scale-api-br694 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-cxbr4 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-czlm4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-d4c7b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jmp8c HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jnrcb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jxdpj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-km78n HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-kq2nf HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-lzh86 HostAlreadyClaimed apicast-staging gateway edge/Redirect None

And so on. Look like because we are using path routing in our environment and public host is the same for many apis domain sync tries to create them with the same hostname. It seem this is not neccessary and should be fixed.

Setup Airbrake for your Ruby application

Installation

Using bundler

Add the Airbrake Ruby gem to your Gemfile:

gem 'airbrake-ruby', '~> 2.4'

Manual

Invoke the following command from your terminal:

gem install airbrake-ruby

Example

This is the minimal example that you can use to test Airbrake Ruby with your project (You can find your project ID and API KEY with your project's settings):

require 'airbrake-ruby'

Airbrake.configure do |c|
  c.project_id = <Your project ID>
  c.project_key = '<Your project API KEY>'
end

# Synchronous error delivery.
begin
  1/0
rescue ZeroDivisionError => ex
  # Return value is a Hash.
  response = Airbrake.notify_sync(ex)
end

puts 'A ZeroDivisionError was sent to Airbrake synchronously!',
     "See it at #{response['url']}\n"

# Asynchronous error delivery.
begin
  1/0
rescue ZeroDivisionError => ex
  Airbrake.notify(ex).then do |resp|
    puts 'A ZeroDivisionError was sent to Airbrake asynchronously!',
         "See it at #{resp['url']}"
  end
end

Airbrake.close

Configuration

For advanced configuration options like error filtering or custom parameters, please visit our official GitHub repo.

Provide internal stats for better monitoring/alerting

While trying to monitor Zync, we can only rely on using the "/status/live" endpoint, which doesn't provide internal information...

So, my question:

  • Would be possible to provide internal stats (retries, requests, failed request, latencies...) ?

Some ideas:

Thanks.

Create APIcast Proxy Configuration objects on OpenShift as ConfigMap/CustomResource

Making OpenShift the canonical store for APIcast configuration would help decouple APIcast from the API Manager.

Zync already listens on several events, so it can hook into changes to the proxy configuration and create/update/delete OpenShift ConfigMap/CustomResource. Then that ConfigMap can be mounted as a volume to the APIcast deployment and can be accessed by reading a file.

Cert manager https routes

I am using openshift to deploy 3scale and our cluster does not utilize a wildcard cert for the apps domain. We use cert manager to explicitly create signed certs by our internal ca and then use cert utils operator to attach the certs to our routes. Is it possible to add custom annotations to the generated routes so that we can utilize the cert utils operator with these routes?

Generic HTTP integration

Zync should integrate with other IDPs than Keycloak.

The current approach would be to extend zync and write the integration in Ruby.
However, that might be causing too much stress on this project and it might be more efficient to create a generic interface, so the implementation can be done in any other language. Possibly even using Fuse/Camel to map & call other IDPs.

The draft of the OpenAPI spec is in 1228d79

See documentation in #212

zync resync domain issues

I had OpenShift 3.11 and 3scale 2.5 environment.
Recently i have upgraded to 3scale 2.6. Based on documentation at the end of migration process i have removed all routes and run zync domain resync with following command:

SYSTEM_SIDEKIQ_POD=$(oc get pods | grep sidekiq | awk '{print $1}')
echo ${SYSTEM_SIDEKIQ_POD}
oc exec -it ${SYSTEM_SIDEKIQ_POD} -- bash -c 'bundle exec rake zync:resync:domains'

After that I'v got many routes with "HostAlreadyClaimed" in my project:
oc get routes:
zync-3scale-api-2m5m4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-2tjhb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4dhsx HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-4w586 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-56bkj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-56gcm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5br9g HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5ccbj brw-api-prod-brw-apicast-production. apicast-production gateway edge/Redirect None
zync-3scale-api-5cftp HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5vx2b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5whgm HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-5x2xq api-brw-apicast-staging. apicast-staging gateway edge/Redirect None
zync-3scale-api-6kpdw HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-6t9tl HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-7t665 apicast-brw.icdc.io apicast-production gateway edge/Redirect None
zync-3scale-api-br694 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-cxbr4 HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-czlm4 HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-d4c7b HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jmp8c HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jnrcb HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-jxdpj HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-km78n HostAlreadyClaimed apicast-staging gateway edge/Redirect None
zync-3scale-api-kq2nf HostAlreadyClaimed apicast-production gateway edge/Redirect None
zync-3scale-api-lzh86 HostAlreadyClaimed apicast-staging gateway edge/Redirect None

And so on. Look like because we are using path routing in our environment and public host is the same for many apis domain sync tries to create them with the same hostname. It seem this is not neccessary and should be fixed.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "prometheus-client":
  In snapshot (Gemfile.lock):
    prometheus-client (= 0.9.0)

  In Gemfile:
    prometheus-client

    yabeda-prometheus (>= 0.1.4, <= 0.6.1) was resolved to 0.5.0, which depends on
      prometheus-client (~> 1.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "url":
  In Gemfile:
    codecov was resolved to 0.1.16, which depends on
      url

Could not find gem 'url', which is required by gem 'codecov', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "prometheus-client":
  In snapshot (Gemfile.lock):
    prometheus-client (= 0.9.0)

  In Gemfile:
    prometheus-client

    yabeda-prometheus (>= 0.1.4, <= 0.6.1) was resolved to 0.5.0, which depends on
      prometheus-client (~> 1.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "url":
  In Gemfile:
    codecov was resolved to 0.1.16, which depends on
      url

Could not find gem 'url', which is required by gem 'codecov', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

ErrImagePull and Error ImagePullBackOff

Hello,

Today, when i start the openshift and the 3scale platform I received this message at the level of the different containers: Zync - porta - apicast - ...

Failed Error: ErrImagePull
Back-off pulling image "quay.io/3scale/porta@sha256:375da101e660055962bbf4ea8e42acac145bc224fc1ba01c3e1dd5aef02dbc4d"
Error: ImagePullBackOff

If I made a test at the level of docker...
docker pull quay.io/3scale/porta
Using default tag: latest
Trying to pull repository quay.io/3scale/porta ...
manifest for quay.io/3scale/porta:latest not found

After checking on quay.io, I observed that an update was made 17 hours ago. only the nightly is present
image

Could you please update the registry to make the installation working again.

Thanks

Olivier

NoMethodError in notifications#update (undefined method `find_or_create_by!' for #<OpenStruct attribute_names=[]>)

Error in Zync

**NoMethodError** in **notifications#update** undefined method find_or_create_by!' for #<OpenStruct attribute_names=[]>

View on Bugsnag

Stacktrace

app/models/notification.rb:35 - block in create_model
app/models/application_record.rb:10 - block in retry_record_not_unique
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - block in transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:194 - block in within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:191 - within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210 - transaction
app/models/application_record.rb:9 - retry_record_not_unique
app/models/application_record.rb:22 - retry_record_not_unique
app/models/notification.rb:34 - create_model
app/services/incoming_notification_service.rb:16 - block in call
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - block in transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:194 - block in within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:191 - within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/transactions.rb:210 - transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/transactions.rb:299 - transaction
app/services/incoming_notification_service.rb:15 - call
app/controllers/notifications_controller.rb:6 - update
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal/basic_implicit_render.rb:4 - send_action
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:186 - process_action
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal/rendering.rb:30 - process_action
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:20 - block in process_action
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:131 - run_callbacks
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/abstract_controller/callbacks.rb:19 - process_action
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal/rescue.rb:20 - process_action
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:32 - block in process_action
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166 - block in instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/notifications/instrumenter.rb:21 - instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/notifications.rb:166 - instrument
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal/instrumentation.rb:30 - process_action
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal/params_wrapper.rb:252 - process_action
bundle/ruby/2.4.0/gems/activerecord-5.1.6/lib/active_record/railties/controller_runtime.rb:22 - process_action
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/abstract_controller/base.rb:124 - process
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal.rb:189 - dispatch
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_controller/metal.rb:253 - dispatch
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:49 - dispatch
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:31 - serve
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:50 - block in serve
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33 - each
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/journey/router.rb:33 - serve
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/routing/route_set.rb:844 - call
bundle/ruby/2.4.0/gems/message_bus-2.1.4/lib/message_bus/rack/middleware.rb:63 - call
bundle/ruby/2.4.0/gems/prometheus-client-0.7.1/lib/prometheus/middleware/exporter.rb:32 - call
bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/etag.rb:25 - call
bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/conditional_get.rb:38 - call
bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/head.rb:12 - call
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:26 - block in call
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/callbacks.rb:97 - run_callbacks
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/callbacks.rb:24 - call
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/debug_exceptions.rb:59 - call
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/show_exceptions.rb:31 - call
bundle/ruby/2.4.0/gems/lograge-0.10.0/lib/lograge/rails_ext/rack/logger.rb:15 - call_app
bundle/ruby/2.4.0/gems/railties-5.1.6/lib/rails/rack/logger.rb:24 - block in call
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/tagged_logging.rb:69 - block in tagged
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/tagged_logging.rb:26 - tagged
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/tagged_logging.rb:69 - tagged
bundle/ruby/2.4.0/gems/railties-5.1.6/lib/rails/rack/logger.rb:24 - call
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/remote_ip.rb:79 - call
bundle/ruby/2.4.0/gems/request_store-1.4.1/lib/request_store/middleware.rb:19 - call
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/request_id.rb:25 - call
bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/runtime.rb:22 - call
bundle/ruby/2.4.0/gems/activesupport-5.1.6/lib/active_support/cache/strategy/local_cache_middleware.rb:27 - call
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/executor.rb:12 - call
bundle/ruby/2.4.0/gems/rack-2.0.5/lib/rack/sendfile.rb:111 - call
bundle/ruby/2.4.0/gems/actionpack-5.1.6/lib/action_dispatch/middleware/debug_locks.rb:39 - call
bundle/ruby/2.4.0/gems/railties-5.1.6/lib/rails/engine.rb:522 - call
bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/configuration.rb:225 - call
bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/server.rb:632 - handle_request
bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/server.rb:446 - process_client
bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/server.rb:306 - block in run
bundle/ruby/2.4.0/gems/puma-3.11.4/lib/puma/thread_pool.rb:120 - block in spawn_thread

View full stacktrace

Created by Michal Cichra via Bugsnag

OpenShift Routes: Custom hostnames possible?

Hi all

Forgive me if this seems like a "should have RFTM"-type question, but I cannot find any detail on this, despite best efforts.

I would like to be able to use custom route hostnames in OpenShift, as per this yaml template - how can I pass in $HOST via OpenShift?

Currently, i'm patching and annotating each of my ~6 routes, but this doesn't seem like the right way to go about things. Is this even possible?

Many thanks for any advice,

NoMethodError in app/jobs/process_entry_job.rb:40

Error in Zync

NoMethodError in app/jobs/process_entry_job.rb:40
undefined method `[]' for nil:NilClass

View on Bugsnag

Stacktrace

app/jobs/process_entry_job.rb:40 - endpoint
app/jobs/process_entry_job.rb:62 - find_integration
app/jobs/process_entry_job.rb:45 - block in call
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:233 - transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/transactions.rb:210 - transaction
app/jobs/process_entry_job.rb:53 - transaction
app/jobs/process_entry_job.rb:44 - call
app/jobs/process_entry_job.rb:20 - block in model_integrations_for
app/models/application_record.rb:10 - block in retry_record_not_unique
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - block in transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/transaction.rb:194 - block in within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/transaction.rb:191 - within_new_transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/database_statements.rb:235 - transaction
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/transactions.rb:210 - transaction
app/models/application_record.rb:9 - retry_record_not_unique
app/jobs/process_entry_job.rb:17 - model_integrations_for
app/jobs/process_entry_job.rb:9 - perform
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:37 - block in perform_now
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:108 - block in run_callbacks
bundle/ruby/2.4.0/gems/i18n-0.8.6/lib/i18n.rb:257 - with_locale
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/translation.rb:7 - block (2 levels) in <module:Translation>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:24 - block (4 levels) in <module:Logging>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - block in instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications/instrumenter.rb:21 - instrument
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/notifications.rb:166 - instrument
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:23 - block (3 levels) in <module:Logging>
lib/lograge/job_log_subscriber.rb:14 - tag_logger
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/logging.rb:20 - block (2 levels) in <module:Logging>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:135 - run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:33 - perform_now
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:22 - block in execute
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:108 - block in run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/railtie.rb:26 - block (4 levels) in <class:Railtie>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:85 - wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/reloader.rb:68 - block in wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:81 - wrap
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/reloader.rb:67 - wrap
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/railtie.rb:25 - block (3 levels) in <class:Railtie>
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - instance_exec
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:117 - block in run_callbacks
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/callbacks.rb:135 - run_callbacks
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/execution.rb:20 - execute
bundle/ruby/2.4.0/gems/activejob-5.1.3/lib/active_job/queue_adapters/que_adapter.rb:32 - run
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:17 - _run
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:129 - block in work
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:7 - block in checkout
bundle/ruby/2.4.0/gems/activerecord-5.1.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:408 - with_connection
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:67 - block in checkout_activerecord_adapter
bundle/ruby/2.4.0/gems/activesupport-5.1.3/lib/active_support/execution_wrapper.rb:85 - wrap
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:66 - checkout_activerecord_adapter
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/adapters/active_record.rb:7 - checkout
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/job.rb:111 - work
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:80 - block in work_loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:75 - loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:75 - work_loop
bundle/ruby/2.4.0/gems/que-0.13.1/lib/que/worker.rb:19 - block in initialize

View full stacktrace

Created by 3scale via Bugsnag

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "prometheus-client":
  In snapshot (Gemfile.lock):
    prometheus-client (= 0.9.0)

  In Gemfile:
    prometheus-client

    yabeda-prometheus (>= 0.1.4, <= 0.6.1) was resolved to 0.5.0, which depends on
      prometheus-client (~> 1.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "url":
  In Gemfile:
    codecov was resolved to 0.1.16, which depends on
      url

Could not find gem 'url', which is required by gem 'codecov', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

ExampleException in home#example

Test error in Example.com

ExampleException in home#example
Something really bad happened

View on Bugsnag

Stacktrace

app/controllers/home_controller.rb:123 - example
app/controllers/other_controller.rb:12 - broken
lib/important/magic.rb:4 - load_something

View full stacktrace

Created by 3scale via Bugsnag

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "url":
  In Gemfile:
    codecov was resolved to 0.1.16, which depends on
      url

Could not find gem 'url', which is required by gem 'codecov', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "url":
  In Gemfile:
    codecov was resolved to 0.1.16, which depends on
      url

Could not find gem 'url', which is required by gem 'codecov', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Zync should disable (not delete) Keycloak when Application is scheduled for deletion

Keycloak has an enabled for client that we need to be false when Application is scheduled for deletion, and true if the Application is unscheduled.
This will only work with Keycloak (dunno about other future OIDC integration).

If the Application is deleted for real, the Keycloak should be deleted for real too.

We will try to contribute by writing a PR ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.