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

[MAINTENANCE] Ensure that validation operators are omitted from Cloud variables payload #5510

Merged

Conversation

cdkini
Copy link
Member

@cdkini cdkini commented Jul 14, 2022

Changes proposed in this pull request:

  • Add validation operators to exclude list
  • Add basic logging for debugging purposes

Definition of Done

Please delete options that are not relevant.

@cdkini cdkini self-assigned this Jul 14, 2022
@netlify
Copy link

netlify bot commented Jul 14, 2022

Deploy Preview for niobium-lead-7998 ready!

Name Link
🔨 Latest commit d073964
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/62d169b322f9cc00080f14ed
😎 Deploy Preview https://deploy-preview-5510--niobium-lead-7998.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@ghost
Copy link

ghost commented Jul 14, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

Comment on lines +48 to +52
if attr in payload:
payload.pop(attr)
logger.debug(
f"Removed {attr} from DataContextConfig while serializing to JSON"
)
Copy link
Member

@Kilo59 Kilo59 Jul 15, 2022

Choose a reason for hiding this comment

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

Could also do it like this.
Not necessarily better, feel free to leave it as you have it.
Too bad we can't use the := operator here 😢

Suggested change
if attr in payload:
payload.pop(attr)
logger.debug(
f"Removed {attr} from DataContextConfig while serializing to JSON"
)
removed = payload.pop(attr, None)
if removed:
logger.debug(
f"Removed {attr} from DataContextConfig while serializing to JSON"
)

@cdkini cdkini enabled auto-merge (squash) July 15, 2022 13:21
@cdkini cdkini merged commit d8ae23c into develop Jul 15, 2022
@cdkini cdkini deleted the maintenance/great-889/clean-up-cloud-payload-for-variables branch July 15, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants