-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(CustomMetrics): Allow Different App to Send Custom Metrics #3211
Open
asalan316
wants to merge
6
commits into
main
Choose a base branch
from
neighbour-app-cutom-metrics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
from
September 17, 2024 10:08
fae6122
to
9859b16
Compare
asalan316
added
the
allow-acceptance-tests
This label needs to be added to enable the acceptance tests to run.
label
Sep 17, 2024
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
3 times, most recently
from
September 20, 2024 12:59
3edfa26
to
c217dd7
Compare
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
from
September 27, 2024 14:18
a4de8af
to
f63ba3c
Compare
asalan316
commented
Sep 30, 2024
asalan316
commented
Sep 30, 2024
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
8 times, most recently
from
October 2, 2024 14:32
b30a9fc
to
200be0b
Compare
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
7 times, most recently
from
October 17, 2024 13:03
31ee44d
to
2e9256a
Compare
asalan316
changed the title
Neighbour app custom metrics
Allow Different App to Send Custom Metrics
Oct 17, 2024
asalan316
changed the title
Allow Different App to Send Custom Metrics
feat(CustomMetrics): Allow Different App to Send Custom Metrics
Oct 17, 2024
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
5 times, most recently
from
October 18, 2024 12:46
1fb8dce
to
840fa60
Compare
wip check if producer app is bound to same autoscaler instance
save binding config in database
use varchar in db allow neighbour app to send custom metrics without policy allow neighbour app to send custom metrics without policy
fix api->broker tests fix acceptance test add some logging fix test fix db add acceptance tests fix db test by setting default to same_app custom metric strategy should be at the scaling side add some tests and refactor fix linters refactor naming
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
3 times, most recently
from
October 18, 2024 14:07
c5d8a30
to
18a84ce
Compare
• [FAILED] [0.063 seconds] BindingSqldb CreateServiceBinding When service instance exists When service binding is being created first time [It] should succeed /__w/app-autoscaler-release/app-autoscaler-release/src/autoscaler/db/sqldb/binding_sqldb_test.go:374 Timeline >> {"timestamp":"1729248292.991818190","source":"binding-sqldb-test","message":"binding-sqldb-test.Cleaning service binding test-binding-id-4 failed:doesn't exist","log_level":1,"data":{}} {"timestamp":"1729248292.992060423","source":"binding-sqldb-test","message":"binding-sqldb-test.Cleaning service binding test-binding-id-42 failed:doesn't exist","log_level":1,"data":{}} {"timestamp":"1729248292.992296696","source":"binding-sqldb-test","message":"binding-sqldb-test.Cleaning service binding test-binding-id-43 failed:doesn't exist","log_level":1,"data":{}} {"timestamp":"1729248293.024851084","source":"binding-sqldb-test","message":"binding-sqldb-test.Cleaning service instance test-instance-id-42 failed:doesn't exist","log_level":1,"data":{}} {"timestamp":"1729248293.025138617","source":"binding-sqldb-test","message":"binding-sqldb-test.Cleaning service instance test-instance-id-43 failed:doesn't exist","log_level":1,"data":{}} {"timestamp":"1729248293.026132822","source":"binding-sqldb-test","message":"binding-sqldb-test.get-service-instance","log_level":2,"data":{"error":"sql: no rows in result set","query":"SELECT * FROM service_instance WHERE service_instance_id = $1","serviceInstanceId":"test-instance-id-4"}} {"timestamp":"1729248293.028556824","source":"binding-sqldb-test","message":"binding-sqldb-test.create-service-binding","log_level":2,"data":{"appid":"test-app-id-4","bindingid":"test-binding-id-4","customMetricsStrategy":"","error":"ERROR: insert or update on table \"binding\" violates foreign key constraint \"fk_binding_custom_metrics_strategy\" (SQLSTATE 23503)","query":"INSERT INTO binding(binding_id, service_instance_id, app_id, created_at, custom_metrics_strategy) VALUES($1, $2, $3, $4,$5)","serviceinstanceid":"test-instance-id-4"}} [FAILED] in [It] - /__w/app-autoscaler-release/app-autoscaler-release/src/autoscaler/db/sqldb/binding_sqldb_test.go:375 @ 10/18/24 11:44:53.029 << Timeline [FAILED] Unexpected error: <*pgconn.PgError | 0xc0003be200>: ERROR: insert or update on table "binding" violates foreign key constraint "fk_binding_custom_metrics_strategy" (SQLSTATE 23503) { Severity: "ERROR", SeverityUnlocalized: "ERROR", Code: "23503", Message: "insert or update on table \"binding\" violates foreign key constraint \"fk_binding_custom_metrics_strategy\"", Detail: "Key (custom_metrics_strategy)=() is not present in table \"metrics_submission\".", Hint: "", Position: 0, InternalPosition: 0, InternalQuery: "", Where: "", SchemaName: "public", TableName: "binding", ColumnName: "", DataTypeName: "", ConstraintName: "fk_binding_custom_metrics_strategy", File: "ri_triggers.c", Line: 2608, Routine: "ri_ReportViolation", } occurred In [It] at: /__w/app-autoscaler-release/app-autoscaler-release/src/autoscaler/db/sqldb/binding_sqldb_test.go:375 @ 10
asalan316
force-pushed
the
neighbour-app-cutom-metrics
branch
from
October 18, 2024 14:31
18a84ce
to
8e4bf83
Compare
Quality Gate failedFailed conditions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, only the application sending custom metrics to the autoscaler could be scaled.
The new feature enables users to scale an application based on custom metrics sent by an arbitrary app (Custom Metrics Producer), This is achievable if:
"metric_submission_strategy.allow_from"
set tobound_app
during the binding processHow It Works
To enable this feature, specify the
metric_submission_strategy.allow_from : "bound_app"
parameter in the configuration object during the binding process with the application to be scaled (as shown below)Binding Configuration (aka.scaling policy)
Bind to Applications
Other Changes
bindingDB
in metricsforwarder service to retrieve binding informationbound_app
andsame_app
(default)