Skip to content
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

bug: fix sink retain ordering and ignore custom runtime options server set vals #112

Merged
merged 10 commits into from
Jan 12, 2024

Conversation

freeznet
Copy link
Member

@freeznet freeznet commented Jan 5, 2024

Fixes #110

(or if this PR is one task of a github issue, please add Master Issue: #<xyz> to link to the master issue.)

Master Issue: #

Motivation

Explain here the context, and why you're making that change. What is the problem you're trying to solve.

Modifications

  • this PR introduces a breaking change on resource configs for functions and connectors. Before this PR, the cpu/memory/disk having the default values from the terraform variable configs. This PR removes the default value and changed the fields to computed, because the resources configs may changed by the worker service and we should use the returned value to the state.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@freeznet freeznet self-assigned this Jan 5, 2024
@freeznet freeznet requested a review from a team as a code owner January 5, 2024 11:16
Copy link

github-actions bot commented Jan 5, 2024

@freeznet:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added the doc-info-missing This pr needs to mark a document option in description label Jan 5, 2024
@freeznet freeznet marked this pull request as draft January 5, 2024 11:17
@freeznet freeznet marked this pull request as ready for review January 8, 2024 14:58
@freeznet freeznet requested a review from a team January 8, 2024 14:58
Description: resourceFunctionDescriptions[resourceFunctionSubscriptionPositionKey],
ValidateFunc: func(val interface{}, key string) ([]string, []error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems can use a common method for functions/sins both

@@ -327,19 +351,19 @@ func resourcePulsarFunction() *schema.Resource {
resourceFunctionCPUKey: {
Type: schema.TypeFloat,
Optional: true,
Default: 0.5,
Computed: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the default value is removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the resources will be returned by worker service apis and it may changed by the worker service, so it should be marked as computed to prevent the resources been frequently update.

@nlu90 nlu90 merged commit cbce5c2 into master Jan 12, 2024
3 checks passed
@nlu90 nlu90 deleted the freeznet/fix-sink-updat branch January 12, 2024 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-info-missing This pr needs to mark a document option in description
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error When Updating Sinks - Retain Ordering
4 participants